Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
reddymade
Posting Yak Master
165 Posts |
Posted - 2007-01-19 : 05:47:48
|
| I have a job on sql server,is it possible to run the job pointing to 6 databases. All are identical databases but belongs to different clients.Please, i want to use the job pointing to all 6 databases. job runs every 10 minutes. it already has the database defined in it. since the database selection is madde using a dropdownlist box when the job is created. it did'nt give a chance to select multiple databases.Thank you very much for the information. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-19 : 05:50:57
|
| What does the job do?Maybe this will work with a linked server?Peter LarssonHelsingborg, Sweden |
 |
|
|
reddymade
Posting Yak Master
165 Posts |
Posted - 2007-01-19 : 06:05:35
|
Hello Peter,All it does is change a flag in database table from 1 to 0, based on a date and time condition.All of the 6 databases are identical databases with same tables except they pointo to each individual client website.Please do you have any more information or a sample of code how to run a linked server job. (all 6 databses are on same server)Thank you very much. quote: Originally posted by Peso What does the job do?Maybe this will work with a linked server?Peter LarssonHelsingborg, Sweden
|
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-19 : 06:24:00
|
| Either copy&paste the UPDATE statement six times, or make use of dynamic sql.It all depends of what the job do and don't do.Is the complete job a single update statement?Peter LarssonHelsingborg, Sweden |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2007-01-19 : 06:44:40
|
| The job step needs to "belong" to a database but that doesn't mean you can't update others. Create your job step like this:UPDATE db1.dbo.sometable SET Column = 0 WHERE ...UPDATE db2.dbo.sometable SET Column = 0 WHERE ...--Lumbago"Real programmers don't document, if it was hard to write it should be hard to understand" |
 |
|
|
|
|
|