Showing posts with label cmd. Show all posts
Showing posts with label cmd. Show all posts

Monday, March 26, 2012

Running a job at database startup

Is it possible to run a job (O/S cmd) each time a database is restarted? I
would like to automatically move the existing 'blackbox' trace(s) out of the
default folder at startup time so that they can be analyzed more
conveniently.
Hi
Look at sp_procoption with the startup parameter in BOL.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"JHowell" wrote:

> Is it possible to run a job (O/S cmd) each time a database is restarted? I
> would like to automatically move the existing 'blackbox' trace(s) out of the
> default folder at startup time so that they can be analyzed more
> conveniently.
|||It is possible to have a stored procedure execute at startup. Must be in the
Master DB.
"JHowell" <JHowell@.discussions.microsoft.com> wrote in message
news:4139206F-7C3C-4F8F-8DA9-AF9280A2CC87@.microsoft.com...
> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of
the
> default folder at startup time so that they can be analyzed more
> conveniently.

Running a job at database startup

Is it possible to run a job (O/S cmd) each time a database is restarted? I
would like to automatically move the existing 'blackbox' trace(s) out of the
default folder at startup time so that they can be analyzed more
conveniently.Hi
Look at sp_procoption with the startup parameter in BOL.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"JHowell" wrote:

> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of t
he
> default folder at startup time so that they can be analyzed more
> conveniently.|||It is possible to have a stored procedure execute at startup. Must be in the
Master DB.
"JHowell" <JHowell@.discussions.microsoft.com> wrote in message
news:4139206F-7C3C-4F8F-8DA9-AF9280A2CC87@.microsoft.com...
> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of
the
> default folder at startup time so that they can be analyzed more
> conveniently.

Running a job at database startup

Is it possible to run a job (O/S cmd) each time a database is restarted? I
would like to automatically move the existing 'blackbox' trace(s) out of the
default folder at startup time so that they can be analyzed more
conveniently.Hi
Look at sp_procoption with the startup parameter in BOL.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"JHowell" wrote:
> Is it possible to run a job (O/S cmd) each time a database is restarted? I
> would like to automatically move the existing 'blackbox' trace(s) out of the
> default folder at startup time so that they can be analyzed more
> conveniently.|||It is possible to have a stored procedure execute at startup. Must be in the
Master DB.
"JHowell" <JHowell@.discussions.microsoft.com> wrote in message
news:4139206F-7C3C-4F8F-8DA9-AF9280A2CC87@.microsoft.com...
> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of
the
> default folder at startup time so that they can be analyzed more
> conveniently.

Wednesday, March 7, 2012

Run a Snapshot agent from a script or cmdline

I would like to be able to run a snapshot agent from a TSQL script or
from a cmd line. I have merge replication setup to several different
publications and would like to script all of the snapshot agents to run
on cmd rather on a schedule. I am using SQL Server 2000 with SP3.
Thank You in advance.
You could use sp_start_job from TSQL, or use the activeX control if you want
the command-line control.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .