Twitter Updates

    follow me on Twitter

    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)).

    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.




    Free Training - Exforsys

    Op de website van Exforsys staan een hele boel gratis tutorials, o.a. over SQL Server 2005 en Analysis Services.

    Saturday, March 11, 2006

    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

    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.

    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

    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

    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')

    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.

    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!!