Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to schedule a SQL Script to run on a Database

Status
Not open for further replies.

nsanto17

IS-IT--Management
Mar 14, 2005
616
US
I have a SQL Script that needs to be run once a month.

I am thinking the only way to do this is to set it up in the SQL Server Agent. There are a lot of options to choose and I am not sure which options to take. Can anyone point me in the right direction. I have tried to google it but i get a lot of crap that i don't need at the moment.

The SQL Script is going to create a table and add all the columns as well as set all of the datatypes.

Thanks

Nick
 
How long is that SQL script? More than cca. 3.5kB (limit of T-SQL job step)?

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
What is the script going to do? Is it just creating a table, or are you running other scripts?
 
Its just going to create a table and thats it...
 
You could create a stored procedure for the script
and then create a job that runs that stored procedure and
schedule it to run at whatever time of the month you would like.
 
How can i get my script into the stored procedure. I tried to copy and paste it but it does not seem to work..

do i have add some sort of call statement so it knows to execute the myscript.sql file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top