SQL Server Performance Forum – Threads Archive
Running a SQL Server 7 Job from a Stored ProcedureHello,
Background: I am setting up Log Shipping for a SQL Server 7 Database. There is a job that is called that executes a set of stored porcedures to backup the production server, and then restore the BACKUP server. We also have a import that runs each night where images of insurance claims are inserted into the database. We have to sync these to processes to elemenate loss of data on the backup.
Problem: To solve this problem I am trying to develope a java Applet that runs the import, inserts the images into both DB’s and then calls the job that starts the DB backup and restore of the standby server. The job for the backup has multiple stored Procedures that it executes. I need to be able to create a stored procedure that can be called in a applet, which does nothing but start the job that holds the SP’s for the backup process. Question: How can you start a SQL Server 7 job from within a stored procedure? Thank you for any help. Lance Bundy
The Commerce Group
If it is not different than in sql 2000, you should be able to do it with sp_start_job.
Look in BOL for sytax. Bambola.
Thank you very much Bambola.