Wednesday, March 7, 2012

Run a Maint Plan from a bat file?

Is it possible to run a Maintenance Plan Job called from a bat file?
I need to have a PERL script finish running its job before the Maintenance
Plan is called so there's no interference because of the locked tables while
doing the reindexing.
I can run the PERL script from a bat file so it would be great if I could
have the 2nd line of the bat file call the Maint Plan.
SQL 2000
Any insight or suggestions appreciated.
DonSure. You can call OSQL.EXE and in there execute sp_start_job.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
> Is it possible to run a Maintenance Plan Job called from a bat file?
> I need to have a PERL script finish running its job before the Maintenance
> Plan is called so there's no interference because of the locked tables whi
le
> doing the reindexing.
> I can run the PERL script from a bat file so it would be great if I could
> have the 2nd line of the bat file call the Maint Plan.
> SQL 2000
> Any insight or suggestions appreciated.
> Don|||ahhhh...beautiful!!
thx!
Don
"Tibor Karaszi" wrote:

> Sure. You can call OSQL.EXE and in there execute sp_start_job.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "donsql22222" <donsql22222@.discussions.microsoft.com> wrote in message
> news:4E296E58-70FA-4E0A-BDE3-3D673B462763@.microsoft.com...
>

No comments:

Post a Comment