Subject: Set query up to automatically run in SQL server
Posted By: ALLA Post Date: 10/21/2004 8:31:14 AM
I met a problem. I don't know how I can set the query up to automatically run.  Right now it must be run manually inside of the SQL query analyzer.

Here is the query:
BACKUP LOG VCCS_PRODUCTION WITH NO_LOG
GO
USE VCCS_PRODUCTION
GO
DBCC SHRINKFILE (VCCS_Production_Log, 2, TRUNCATEONLY)
GO

I will be apreciated for your answer!

Reply By: jemacc Reply Date: 10/21/2004 9:44:32 AM
You can create a job, create a step and insert your statement inside
then schedule it.

Jaime E. Maccou
Applications Analyst
Reply By: joefawcett Reply Date: 10/21/2004 11:17:29 AM
As jemacc said but you will need SQLAgent running to do this.

Alternatively you can use osql in a batch file and schedule running of this file using Windows Task Scheduler.

--

Joe
Reply By: ALLA Reply Date: 10/21/2004 4:24:47 PM
Thanks a lot for your help, Jamacc and Joe : )
I will try soon


Go to topic 21035

Return to index page 737
Return to index page 736
Return to index page 735
Return to index page 734
Return to index page 733
Return to index page 732
Return to index page 731
Return to index page 730
Return to index page 729
Return to index page 728