Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Calling Stored Procedures from Jobs
Wed, Jul 29 2009 1:56 AMPermanent Link

Steve Gill
I'm trying to call a stored procedure from a new job I created via EDBManager, but it says the procedure doesn't exist, even though it does.

BEGIN
   CALL DatabaseBackup;
END

What am I doing wrong?

Regards,

Steve
Wed, Jul 29 2009 5:07 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Steve,

That's because in a Job, the default active database is the "Configuration"
database and the procedure you are calling was created in another database.
You may open and use a different database using "USE" :

BEGIN
   USE "YourDatabaseName" ;
   CALL DatabaseBackup ;
   USE ;
END

You can find more about use here:
http://www.elevatesoft.com/manual?action=mantopic&id=edb1sql&category=13&topic=234

--
Fernando Dias
[Team Elevate]

Wed, Jul 29 2009 6:41 PMPermanent Link

Steve Gill
"Fernando Dias" wrote:

> That's because in a Job, the default active database is the "Configuration"
> database and the procedure you are calling was created in another database.
> You may open and use a different database using "USE" :

> BEGIN
>     USE "YourDatabaseName" ;
>     CALL DatabaseBackup ;
>     USE ;
> END

> You can find more about use here:
> http://www.elevatesoft.com/manual?action=mantopic&id=edb1sql&category=13&topic=234

Excellent, thanks Fernando.  I tried prepending the databasename to the stored procedure, eg.  CALL MyDatabase.DatabaseBackup, but that didn't work.  I didn't
know about "USE".  Thanks for your help.

Regards,

Steve
Image