Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

SQL JOBS Not Functioning Expand / Collapse
Author
Message
Posted Monday, November 19, 2012 4:39 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
SQL JOBS Not Functioning

I have Stored procedure & that stored procedure needs to be executed on 20 Databases daily,
Currently i am doing it manually..

I tried setting the Jobs on SQL but it only executes the SP for One database & not for all DB's....

how do i set the JOBS one after one..
I mean...

1st the SP for one DB will be executed & only after that the SP should get executed of rthe second DB & so on.... somehow i am not getting the exact steps or i may be missing something.. please help me








************************************
Every Dog has a Tail !!!!!
Post #1386299
Posted Monday, November 19, 2012 4:47 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, October 31, 2014 11:06 AM
Points: 5,430, Visits: 10,108
Something like this?

EXEC DB1.dbo.MySP 
EXEC DB2.dbo.MySP
EXEC DB3.dbo.MySP
EXEC DB4.dbo.MySP
EXEC DB5.dbo.MySP
EXEC DB6.dbo.MySP
EXEC DB7.dbo.MySP
EXEC DB8.dbo.MySP
EXEC DB9.dbo.MySP
EXEC DB10.dbo.MySP
EXEC DB11.dbo.MySP
EXEC DB12.dbo.MySP
EXEC DB13.dbo.MySP
EXEC DB14.dbo.MySP
EXEC DB15.dbo.MySP
EXEC DB16.dbo.MySP
EXEC DB17.dbo.MySP
EXEC DB18.dbo.MySP
EXEC DB19.dbo.MySP
EXEC DB20.dbo.MySP

John

Post #1386304
Posted Monday, November 19, 2012 4:51 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
Yes John, same to same







************************************
Every Dog has a Tail !!!!!
Post #1386305
Posted Tuesday, November 20, 2012 2:50 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
john, where did u go







************************************
Every Dog has a Tail !!!!!
Post #1386761
Posted Tuesday, November 20, 2012 2:56 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, October 31, 2014 11:06 AM
Points: 5,430, Visits: 10,108
I didn't go anywhere. What is your question?

John
Post #1386762
Posted Tuesday, November 20, 2012 2:58 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
how do i set the JOBS one after one..
I mean...

1st the SP for one DB will be executed & only after that the SP should get executed of rthe second DB & so on....

Is this possible to perform the above activity in One Single Job???








************************************
Every Dog has a Tail !!!!!
Post #1386767
Posted Tuesday, November 20, 2012 2:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, November 1, 2014 6:54 AM
Points: 5,221, Visits: 5,118
Does the same procedure exist in all 20 databases and does it need any special paramateres to run?



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1386768
Posted Tuesday, November 20, 2012 3:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, October 31, 2014 11:06 AM
Points: 5,430, Visits: 10,108
Not only can you do it one single job, you can do it in one single job step, in the way I suggested above.

John
Post #1386770
Posted Tuesday, November 20, 2012 3:16 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
Yes the procedure is same for all database, but John can u let me know the steps by step about setting the jobs?







************************************
Every Dog has a Tail !!!!!
Post #1386780
Posted Tuesday, November 20, 2012 3:21 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, October 31, 2014 11:06 AM
Points: 5,430, Visits: 10,108
(1) Modify the code I posted so that it fits your environment
(2) Create a new job
(3) Copy and paste the code into the "Command" field
(4) Schedule the job to run with the desired frequency and at the desired times

Clearly you're struggling with something, but remember I'm not standing behind you and I can't see your screen, so if there's anything you don't understand, please be very specific about what it is.

John
Post #1386783
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse