• Step 1:

    create a batch file : for eg sqlcmd_start.bat and enter these lines :

    cd "Program Files"\"Microsoft SQL Server"\90\Tools\Binn

    sqlcmd.exe -E -Sabhay\Orion -q "use master"

    The above lines are 2 lines and not word wrapped to 2 lines stuff .You need to copy it as it is.

    change the servername\instancename .for default insttance need not to give any instance or just type mssqlserver

    Step 2 :

    Create a scheduled task and schedule a time for it .

    Abhay Chaudhary
    Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)