Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Job Schedule

Author  Topic 

jgrant
Yak Posting Veteran

69 Posts

Posted - 2007-03-16 : 16:03:42
I have almost completed a full project by myself which is soooo exciting. The last thing I need to do is schedule a job to run the query on a specific day and time. So how do I do this? It asks me for a command and I am not sure what I am supposed to enter in here.

The Yak Village Idiot

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-03-16 : 16:04:57
The command is the query that you want to run each day.

What is the query doing?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

jgrant
Yak Posting Veteran

69 Posts

Posted - 2007-03-16 : 16:17:16
The query essentially takes data from the database from different tables, combines key parts into a single transaction and then inserts them into another database table. Because of the way the database is set up, my company has essentially manipulated the software to do what they need it to do, but because of it, it requires that this query that I have developed to be run everyday.

The Yak Village Idiot
Go to Top of Page

jgrant
Yak Posting Veteran

69 Posts

Posted - 2007-03-16 : 16:18:41
I can send you the script if you want a good laugh and a lot more detail. I am a raw beginner. I have been writing sql scripts since like the end of january or the beginning of february. I learn quickly though, but I am learning on my own and the help of teamsql.

The Yak Village Idiot
Go to Top of Page

MohammedU
Posting Yak Master

145 Posts

Posted - 2007-03-17 : 11:17:35
Are you on sql 2000 or 2005?
In 2000 expand the server/Management folder/sql server agent/jobs/
Right click the job and click new job then follow the wizard...

OR
you can do through script also...
Check BOL for sp_add_job and sp_add_jobstep procedures ect...


MohammedU
Go to Top of Page

jgrant
Yak Posting Veteran

69 Posts

Posted - 2007-03-19 : 14:12:40
okay, I am in process of setting up a new job and I get an error message saying that the file is larger than the free space in the job step command. I can either cancel or continue but if I continue it says it will truncate the contents of the file. Any advice? Am I setting this up correctly?


The Yak Village Idiot
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-03-19 : 14:16:32
I've never seen that before. Could you walk us through exactly what you have or want to have in the job step? Please post all relevant code.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

jgrant
Yak Posting Veteran

69 Posts

Posted - 2007-03-19 : 19:50:37
I got it all set up Tara. I created a stored procedure and then I execute it as a job step. You will have to excuse my ignorance, I know very little about being a DBA even though I would like to know alot more information. I have been using sql and tsql for a very short amount of time. I need to learn more about being a dba and things like replication, locking, and other performance issues.

Thank for all of your help.



The Yak Village Idiot
Go to Top of Page
   

- Advertisement -