Author |
Topic |
JoshBrigade
Starting Member
28 Posts |
Posted - 2009-11-04 : 09:10:15
|
HI,I have SQL code that works, and i saved it as a file from Query Analyser. I set a scheduled task to run the file, but all it does is open the file it doesn't run it like it would have if it were in Query Analyser. So my question is, do i run Query Analyser as a task? and if so how can i specify the file? or do i do it another way. Thanks,Josh |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-11-04 : 09:26:07
|
Which Version of SQL Server? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
JoshBrigade
Starting Member
28 Posts |
Posted - 2009-11-04 : 09:35:20
|
We use SQL server 2000 version 8 |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-11-04 : 10:11:49
|
In Jobstep OSsystem task:isql -SYour_Servername -dYour_DBname -UYour_User -PYour_Pwd -iyour_filename_with_Path No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
JoshBrigade
Starting Member
28 Posts |
Posted - 2009-11-04 : 13:57:38
|
I'm not sure i understand, i don't see a jobstep ossystemtask the the task manager, or the query analyzer. Or are you talking about something else? |
 |
|
JoshBrigade
Starting Member
28 Posts |
Posted - 2009-11-04 : 14:03:20
|
or more to the point, how would you get a query analyzer script to run at a certain time? |
 |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-11-04 : 14:09:10
|
Make it a stored procedure. You can then execute the sproc from the job.JimEveryday I learn something that somebody else already knew |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-11-04 : 14:14:10
|
the tool's name in 2000 is enterprise manager if I remember correct.There you can schedule jobs No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
JoshBrigade
Starting Member
28 Posts |
Posted - 2009-11-04 : 16:00:05
|
Yes, indeed that is the right thing to do. Thanks to all!-jb |
 |
|
|