krish270486 (6/6/2009)
Hey..can u able to explain the code in little bit brief once...
because It is not working in my system.. while try to connect the remote server and as well as local system also...
check below
ECHO Executing job
ECHO.
pause
osql -S "ws-1" -E -Q"exec msdb.dbo.sp_start_job 'BACKUPTEST' "
ECHO Job execution completed
pause
CLS
EXIT
Note : ws-1 is my server name when i open sql2005 it displays (ws-1\sqlexpress).. which one is correct...
No, you did it wrong. You must not enter the server name but the instance name for example servername\instancename.
osql -S "Put instance name here e.g. serverName\instance" -E -Q"exec msdb.dbo.sp_start_job 'BACKUPTEST' "
:-PManie Verster
Developer
Johannesburg
South Africa
I can do all things through Christ who strengthens me. - Holy Bible
I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)