Wednesday, March 29, 2006
Solving Sudoku with SQL
Onder het motto I Can do everything with T-SQL.... Hier vind je een artikel hoe je een Sudoku kan oplossen met T-SQL. Solving Sudoku with SQL. Funny :-)
Saturday, March 25, 2006
Replication Monitor - Tracer Tokens
De Database Mirroring Monitor is leuk speelgoed in SQL Server 2005. Voor replicatie bestaat er een gelijkaardige tool, namelijk de Replication Monitor.

Replication Monitor maakt het heel makkelijk om latency in je replicatie te traceren. Door tracer tokens weg te schrijven in de transactie logfile kan je heel makkelijk te weten komen wat de latency is tussen publisher en distributor, tussen distributor en subscriber, en de totale latency.
Meer info vind je in BOL (How to: Measure Latency and Validate Connections for Transactional Replication (Replication Monitor)).

Replication Monitor maakt het heel makkelijk om latency in je replicatie te traceren. Door tracer tokens weg te schrijven in de transactie logfile kan je heel makkelijk te weten komen wat de latency is tussen publisher en distributor, tussen distributor en subscriber, en de totale latency.
Meer info vind je in BOL (How to: Measure Latency and Validate Connections for Transactional Replication (Replication Monitor)).
Friday, March 24, 2006
Database Mirroring Monitor - screenshots
Het ziet er naar uit dat database mirroring met de komst van SQL Server 2005 Service Pack 1 officiëel gesupporteerd zal worden. Het al dan niet opzetten van trace flag 1400 heeft in de March CTP geen belang meer.
Nieuw en zeer leuk is de Database Mirroring Monitor. Hiermee kan je alles in het oog houden. Je kan ook tresholds gaan definiëren. Bij het overschrijven van die tresholds wordt er een boodschap geschreven in de event log en die kan je dan gaan opvangen met de SQL Server Agent of MOM (of een andere monitoring tool).
Ook nieuw is sp_dbmmonitorresults. Deze system stored procedure toont je snel de status van een mirrored database.
exec msdb..sp_dbmmonitorresults 'AdventureWorks'
Hieronder een paar screenshots van het nieuwe speelgoed.



Nieuw en zeer leuk is de Database Mirroring Monitor. Hiermee kan je alles in het oog houden. Je kan ook tresholds gaan definiëren. Bij het overschrijven van die tresholds wordt er een boodschap geschreven in de event log en die kan je dan gaan opvangen met de SQL Server Agent of MOM (of een andere monitoring tool).
Ook nieuw is sp_dbmmonitorresults. Deze system stored procedure toont je snel de status van een mirrored database.
exec msdb..sp_dbmmonitorresults 'AdventureWorks'
Hieronder een paar screenshots van het nieuwe speelgoed.



Free Training - Exforsys
Op de website van Exforsys staan een hele boel gratis tutorials, o.a. over SQL Server 2005 en Analysis Services.
Thursday, March 16, 2006
SQL Server 2005 SP1 CTP beschikbaar
De beta van SP1 was al een tijdje (beperkt) beschilbaar maar nu heeft Microsoft ook een CTP publiek beschikbaar gesteld.
http://www.microsoft.com/sql/ctp_sp1.mspx
SQL Server 2005 Service Pack 1 - Community Technology Preview (CTP) March 2006
SQL Server 2005 Books Online Service Pack 1 Community Technology Preview (March 2006)
http://www.microsoft.com/sql/ctp_sp1.mspx
SQL Server 2005 Service Pack 1 - Community Technology Preview (CTP) March 2006
SQL Server 2005 Books Online Service Pack 1 Community Technology Preview (March 2006)
Monday, March 13, 2006
Top 10 things I hate about SQL Server
Een schitterende post op de blog van Jeff Smith. Zeker ook eens de comments en zijn follow-up post lezen.
meer dan 140 leuke online tools
Een lijst met meer dan 140 leuke online tools, generators en checkers. Meer leuke lijstjes vind je op de homepage van listible.com.
Saturday, March 11, 2006
SQL Server Podcasts
Podcasts are hot. De mensen van SQLDownUnder posten regelmatig een podcast over SQL Server. Hun RSS feed vind je op http://www.sqldownunder.com/sqldownundermp3feed.xml
Friday, March 10, 2006
Belgische SQL Server User Group
Peter De Seranno werkt met vol enthousiasme aan de oprichting van een Belgische SQL Server User Group. Alle info en binnnkort ongetwijfeld veel meer vind je op http://www.sqlug.be
Freemind is Project of the month
SourceForge koos in februari Freemind als project of the month.
http://sourceforge.net/potm/potm-2006-02.php
http://sourceforge.net/potm/potm-2006-02.php
Sunday, March 05, 2006
SchemaSpy
SchemSapy is a Java-based tool that analyzes the metadata of a schema in a database and generates a visual representation of it in a browser-displayable format. It lets you click through the hierarchy of database tables via child and parent table relationships. The browsing through relationships can occur though HTML links and/or though the graphical representation of the relationships. It's also designed to help resolve the obtuse errors that a database sometimes gives related to failures due to constraints.
Als je ook dot van Graphviz installeert en in je PATH (C:\Program Files\ATT\Graphviz\bin\) zet genereert het tooltje ook grafish de relaties tussen de tabellen.
Zorg er ook voor dat je de SQL Server 2000 JDBC driver geïnstalleerd hebt (default locatie is C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib).
Het volgende commando genereert de documentatie voor het Sales schema in de SQL 2005 AdventureWorks database.
java -jar schemaSpy.jar -t mssql -db adventureworks -host localhost -port 1433 -u sa -p pwd -s Sales -o AWSales
De output vind je hier.
Als je ook dot van Graphviz installeert en in je PATH (C:\Program Files\ATT\Graphviz\bin\) zet genereert het tooltje ook grafish de relaties tussen de tabellen.
Zorg er ook voor dat je de SQL Server 2000 JDBC driver geïnstalleerd hebt (default locatie is C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib).
Het volgende commando genereert de documentatie voor het Sales schema in de SQL 2005 AdventureWorks database.
java -jar schemaSpy.jar -t mssql -db adventureworks -host localhost -port 1433 -u sa -p pwd -s Sales -o AWSales
De output vind je hier.
Thursday, March 02, 2006
Reporting Services Server Management Reports
Bij SQL Server 2000 Reporting Services zit er een DTS pakketje waarmee je de data uit de ExecutionLog tabel kan overzetten naar een meer gestructureerde en bruikbare structuur. Kijk eens in c:\Program Files\Microsoft SQL Server\80\Tools\Reporting Services\ExecutionLog.
In 2005 is dit DTS pakketje een SSIS pakketje geworden en hebben ze er nog eens 3 interessante sample rapportjes bijgestoken.
Al dit speelgoed is te vinden in c:\Program Files\Microsoft SQL Server\90\Samples\Reporting Services\Report Samples\Server Management Sample Reports\Execution Log Sample Reports.
Meer info: http://msdn2.microsoft.com/en-us/library/ms161561.aspx
In 2005 is dit DTS pakketje een SSIS pakketje geworden en hebben ze er nog eens 3 interessante sample rapportjes bijgestoken.
Al dit speelgoed is te vinden in c:\Program Files\Microsoft SQL Server\90\Samples\Reporting Services\Report Samples\Server Management Sample Reports\Execution Log Sample Reports.
Meer info: http://msdn2.microsoft.com/en-us/library/ms161561.aspx
Thursday, February 23, 2006
TNT Technet Sessies
Regelmatig post Microsoft een hele boel Technet presentaties en demo's op hun download site. Er zitten veel interessante zaken tussen, rond SQL Server maar ook over andere technologieën.
Search MS download site for Technet sessions
Search MS download site for Technet sessions
Tuesday, February 21, 2006
Renaming database objects in SQL Server 2005
Naming conventions zijn goed. Alleen jammer als je achteraf alles moet aanpassen. Hieronder vind je een paar scripts om kolommen, tabellen en constraints te renamen.
--Rename primary keys
--Remove Dim from column name
SELECT
'EXEC sp_rename ''HR.' + TABLE_NAME + '.'
+ COLUMN_NAME + ''', ''' + SUBSTRING(COLUMN_NAME,4, 64) + ''', ''COLUMN'''
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'HR'
AND TABLE_NAME LIKE 'Dim%'
AND ORDINAL_POSITION = 1
--Rename tables
--Remove Dim from table name
SELECT
'EXEC sp_rename ''HR.' + TABLE_NAME +
''', ''' + SUBSTRING(TABLE_NAME,4, 64) + ''', ''OBJECT'''
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'HR'
AND TABLE_NAME LIKE 'Dim%'
AND ORDINAL_POSITION = 1
--Rename foreign keys
--FK_ChildTable_ParentTable
SELECT 'exec sp_rename ''HR.' + name + ' '',''FK_'
+ object_name(parent_object_id) + '_'
+ object_name(referenced_object_id) + ''''
FROM sys.foreign_keys
WHERE SCHEMA_ID = SCHEMA_ID('HR')
--Rename Primary keys
--PK_Table
SELECT 'exec sp_rename ''HR.' + name + ' '',''PK_'
+ object_name(parent_object_id) + ''''
FROM sys.key_constraints
WHERE SCHEMA_ID = SCHEMA_ID('HR')
AND [TYPE] = 'PK'
--Rename default
--DF_Table_Column
SELECT 'exec sp_rename ''HR.' + d.name + ' '',''DF_' +
+ object_name(parent_object_id) + '_' + c.name +''''
FROM sys.default_constraints d
INNER JOIN sys.columns c
ON d.parent_object_id = c.object_id
AND d.parent_column_id = c.column_id
WHERE SCHEMA_ID = SCHEMA_ID('HR')
--Rename primary keys
--Remove Dim from column name
SELECT
'EXEC sp_rename ''HR.' + TABLE_NAME + '.'
+ COLUMN_NAME + ''', ''' + SUBSTRING(COLUMN_NAME,4, 64) + ''', ''COLUMN'''
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'HR'
AND TABLE_NAME LIKE 'Dim%'
AND ORDINAL_POSITION = 1
--Rename tables
--Remove Dim from table name
SELECT
'EXEC sp_rename ''HR.' + TABLE_NAME +
''', ''' + SUBSTRING(TABLE_NAME,4, 64) + ''', ''OBJECT'''
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'HR'
AND TABLE_NAME LIKE 'Dim%'
AND ORDINAL_POSITION = 1
--Rename foreign keys
--FK_ChildTable_ParentTable
SELECT 'exec sp_rename ''HR.' + name + ' '',''FK_'
+ object_name(parent_object_id) + '_'
+ object_name(referenced_object_id) + ''''
FROM sys.foreign_keys
WHERE SCHEMA_ID = SCHEMA_ID('HR')
--Rename Primary keys
--PK_Table
SELECT 'exec sp_rename ''HR.' + name + ' '',''PK_'
+ object_name(parent_object_id) + ''''
FROM sys.key_constraints
WHERE SCHEMA_ID = SCHEMA_ID('HR')
AND [TYPE] = 'PK'
--Rename default
--DF_Table_Column
SELECT 'exec sp_rename ''HR.' + d.name + ' '',''DF_' +
+ object_name(parent_object_id) + '_' + c.name +''''
FROM sys.default_constraints d
INNER JOIN sys.columns c
ON d.parent_object_id = c.object_id
AND d.parent_column_id = c.column_id
WHERE SCHEMA_ID = SCHEMA_ID('HR')
Wednesday, February 08, 2006
Colibri

Colibri is een fantastisch alternatief voor het gewone Start Menu.
Colibri combines the raw power of the command line with the intuitive nature of a modern graphical user interface to define a revolutionary new way of managing your computer.
Een fantastisch tooltje voor de kings of the keyboard.
Alle info op http://colibri.leetspeak.org/
Tuesday, January 24, 2006
Backup OLAP 2000 databases
Een VBS Scriptje dat een archive neemt van elke OLAP database in een Analysis Services 2000 installatie.
Set dsoServer = CreateObject("DSO.Server")
Set dsoDatabase = CreateObject("DSO.MDStore")
Set objShell = WScript.CreateObject("WScript.Shell")
ServerName = "mySERVER"
msmdarchPath = "c:\Program Files\Microsoft Analysis Services\Bin\msmdarch"
OlapPath = "c:\Program Files\Microsoft Analysis Services\data\"
BackupPath = "c:\temp\"
dsoServer.Connect ServerName
For each dsoDB in dsoServer.MDStores
cmd = """" & msmdarchPath & """" & " /a " & ServerName & " """ _
& OlapPath & """ """ & dsoDB.Name & """ """ & BackupPath & dsoDB.Name & ".CAB"""
objShell.run cmd, 6, True
'wscript.echo cmd
Next
Thursday, January 19, 2006
Microsoft SQL Server 2005 JDBC Driver
Microsoft heeft een nieuwe JDBC driver voor SQL Server 2005 uitgebracht.
In its continued commitment to interoperability, Microsoft has released a new Java Database Connectivity (JDBC) driver with SQL Server 2005. The SQL Server 2005 JDBC Driver download is available to all SQL Server users at no additional charge, and provides access to SQL Server 2000 and SQL Server 2005 from any Java application, application server, or Java-enabled applet. This is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in J2EE (Java2 Enterprise Edition).
The SQL Server 2005 JDBC Driver is JDBC 3.0 compliant and runs on the Java Development Kit (JDK) version 1.4 and higher. It has been tested against all major application servers including BEA WebLogic, IBM WebSphere, JBoss, and Sun.
In its continued commitment to interoperability, Microsoft has released a new Java Database Connectivity (JDBC) driver with SQL Server 2005. The SQL Server 2005 JDBC Driver download is available to all SQL Server users at no additional charge, and provides access to SQL Server 2000 and SQL Server 2005 from any Java application, application server, or Java-enabled applet. This is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in J2EE (Java2 Enterprise Edition).
The SQL Server 2005 JDBC Driver is JDBC 3.0 compliant and runs on the Java Development Kit (JDK) version 1.4 and higher. It has been tested against all major application servers including BEA WebLogic, IBM WebSphere, JBoss, and Sun.
Thursday, January 05, 2006
kbAlertz.com
Weer zo'n tooltje dat doet wat het moet doen, niets meer en uiteraard niets minder: kbAlertz.com
kbAlertz.com is an e-mail notification system that scans the entire Microsoft Knowledge Base every night, and e-mails you when updates or additions are made to the technologies you subscribe to.
Meer moet dat niet zijn: tooltje van de week dus!!
kbAlertz.com is an e-mail notification system that scans the entire Microsoft Knowledge Base every night, and e-mails you when updates or additions are made to the technologies you subscribe to.
Meer moet dat niet zijn: tooltje van de week dus!!
Tuesday, December 20, 2005
Sunday, December 18, 2005
Cumulative Hotfix for SQL Server 2000 Service Pack 4 - Build 2162 for x86 and x64 Based Systems
Microsoft heeft Cumulative Hotfix for SQL Server 2000 Service Pack 4 - Build 2162 for x86 and x64 Based Systems uitgebracht.
Een lijst met alle fixes vind je op http://support.microsoft.com/kb/894905
Ook de fix voor de vervelende AWE bug in SP4 zit in deze cummulative hotfix.
Een lijst met alle fixes vind je op http://support.microsoft.com/kb/894905
Ook de fix voor de vervelende AWE bug in SP4 zit in deze cummulative hotfix.
Subscribe to:
Posts (Atom)