Re: Unable to locate job scheduling stored procedures
From: Jacco Schalkwijk (NOSPAMjaccos_at_eurostop.co.uk)
Date: 02/18/04
- Next message: Mark: "Re: MSDE XP MDAC Confusion"
- Previous message: Jacco Schalkwijk: "Re: Sum question (SQL query)"
- In reply to: Andrew Rusling: "Unable to locate job scheduling stored procedures"
- Next in thread: Rob Beene [MSFT]: "RE: Unable to locate job scheduling stored procedures"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Feb 2004 10:43:30 -0000
Hi Andrew,
sp_add_job and all other SQL Server Agent stored procedure exist in the msdb
database, not in the master database. That means that when you call these
stored procedures from another database without prefixing them with msdb..,
the name won't be resolved automatically to the correct database, as happens
with stored procedures whose name starts with sp_ and that exist in the
master database.
You can fix this by either starting your script with "USE msdb", or by
calling the sp_add_job stored procedure with it's fully qualified name using
EXEC msdb..sp_add_job.
-- Jacco Schalkwijk SQL Server MVP "Andrew Rusling" <anonymous@discussions.microsoft.com> wrote in message news:209BAE71-4C34-4FDE-89DE-7048F4A283B6@microsoft.com... > Hello all, I have written some osql scripts to perform scheduled backups. However when I attempt to run them on MSDE2000 it informs me "Could not find stored procedure 'sp_add_job'." I search the sysobjects table for that SP and it does not exist. All of the help on the web says use sp_add_job to schedule a backup task for MSDE. I am wondering if there is another package that I need to install to get access to the SP? The first part of the script I am using is below, maybe my script is incorrect? > USE pcsDrugs > EXEC sp_add_job @job_name = 'daily01', > @enabled = 1, > @description = 'pcsFullDatabaseBackupJob', > @owner_login_name = 'sa', > @notify_level_eventlog = 2, > @notify_level_email = 2, > @notify_level_netsend =2, > @notify_level_page = 2 > go > > >
- Next message: Mark: "Re: MSDE XP MDAC Confusion"
- Previous message: Jacco Schalkwijk: "Re: Sum question (SQL query)"
- In reply to: Andrew Rusling: "Unable to locate job scheduling stored procedures"
- Next in thread: Rob Beene [MSFT]: "RE: Unable to locate job scheduling stored procedures"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|