Re: Run job from DTS package
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 12/02/04
- Next message: Allan Mitchell: "Re: calling an exec sql method from activex script"
- Previous message: William Patterson: "DTS import - all data not imported"
- In reply to: Sam: "Re: Run job from DTS package"
- Next in thread: Sam: "Re: Run job from DTS package"
- Reply: Sam: "Re: Run job from DTS package"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 20:26:23 -0000
Can't do that. You do not get the option to "Run As". If you schedule your
DTS package then you can have the Account under which it runs have perms to
do the job running.
How do you propose to know that the backup job you have selected comes from
your maint plan? I can backup databases without using main plans
Which maint plan? You may have one for logs and one for some databases,
others for other databases.
In msdb you have
dbo.sysdbmaintplan_jobs which will give you the Guids of the Job and the
Plan
dbo.sysdbmaintplans will give you name of the plans matched on GUIDs
dbo.sysdbmaintplan_databases will give you the name(s) of the databases upon
which your plan operates.
At no point do I see an action type though.
You still need to know the name of the plan though.
-- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Sam" <Sam@discussions.microsoft.com> wrote in message news:70754FB4-F03E-4614-97B4-BA0EDA0B58F4@microsoft.com... > > Yes I could hard code the jobname, but I was looking for something a > little > more dynamic that would allow me to more easily deploy the package to > multiple servers & hopefully allow me to specify the UserID/Passwword to > run > the job. > > Sam > "Allan Mitchell" wrote: > >> Is there some reason you would need to dunamically dtermine the job name? >> Can you not just hard code it ++ you cannot just start any old job, you >> have >> to have permissions. >> >> From BOL >> >> Execute permissions default to the public role in the msdb database. A >> user >> who can execute this procedure and is a member of the sysadmin fixed role >> can start any job. A user who is not a member of the sysadmin role can >> use >> sp_start_job to start only the jobs he/she owns. >> >> >> >> -- >> -- >> >> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) >> www.SQLDTS.com - The site for all your DTS needs. >> www.konesans.com - Consultancy from the people who know >> >> >> "Sam" <Sam@discussions.microsoft.com> wrote in message >> news:2E7D8BB6-2DEB-4F1D-B9AC-DE3CBC5EB2D2@microsoft.com... >> > I'm looking for a simple way to run a Maintenance Plan's backup job >> > from a >> > DTS package. I know I can use the sp_Start_Job, but this requires a >> > jobname >> > or jobID. To get those I would need to parse through the output from a >> > sp_Help-Job & look for 'Backup' & 'databasename'. >> > >> > Also, I want to use the backup job from my Maintenance Plan, so that if >> > I >> > or >> > another DBA needs to perform a recovery, all of the backup files are in >> > the >> > same location with the sme naming conventions. >> > >> > Thanks >> >> >>
- Next message: Allan Mitchell: "Re: calling an exec sql method from activex script"
- Previous message: William Patterson: "DTS import - all data not imported"
- In reply to: Sam: "Re: Run job from DTS package"
- Next in thread: Sam: "Re: Run job from DTS package"
- Reply: Sam: "Re: Run job from DTS package"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|