Showing posts with label shut. Show all posts
Showing posts with label shut. Show all posts

Wednesday, March 28, 2012

Making sure that SQL Agent is running

On several occasions, the SQL Service has been shut down
and restart. In these cases, the SQL Agent does not auto
re-start, and overnight processing has not been completed.
Is there:
a) A way to make sure that the SQL Agent ALWAYS starts
when the SQL Service is started. I know I can do this if
the server is re-booted, but if you just stop and re-start
the SQL Service, the SQL Agent doesn't re-start.
b) From a stored procedure, or perhaps VB, inquire on the
running status of the SQL Agent (we have a monitor tool
that could be expended to report if the agent isn't
running) How does the SQL Enterprise Manager determin if
the SQL Agent is running ?
Thanks,
Joe.You can write a proc which uses xp_cmdshell and executed NET START and then park the proc as an auto
start proc (sp_procoption).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Joe Farr" <joefarr@.hotmail.com> wrote in message news:091801c36e0d$179a1530$a401280a@.phx.gbl...
> On several occasions, the SQL Service has been shut down
> and restart. In these cases, the SQL Agent does not auto
> re-start, and overnight processing has not been completed.
> Is there:
> a) A way to make sure that the SQL Agent ALWAYS starts
> when the SQL Service is started. I know I can do this if
> the server is re-booted, but if you just stop and re-start
> the SQL Service, the SQL Agent doesn't re-start.
> b) From a stored procedure, or perhaps VB, inquire on the
> running status of the SQL Agent (we have a monitor tool
> that could be expended to report if the agent isn't
> running) How does the SQL Enterprise Manager determin if
> the SQL Agent is running ?
> Thanks,
> Joe.
>|||That will do fine - thanks Tibor.
>--Original Message--
>You can write a proc which uses xp_cmdshell and executed
NET START and then park the proc as an auto
>start proc (sp_procoption).
>--
>Tibor Karaszi, SQL Server MVP
>Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
>"Joe Farr" <joefarr@.hotmail.com> wrote in message
news:091801c36e0d$179a1530$a401280a@.phx.gbl...
>> On several occasions, the SQL Service has been shut down
>> and restart. In these cases, the SQL Agent does not auto
>> re-start, and overnight processing has not been
completed.
>> Is there:
>> a) A way to make sure that the SQL Agent ALWAYS starts
>> when the SQL Service is started. I know I can do this if
>> the server is re-booted, but if you just stop and re-
start
>> the SQL Service, the SQL Agent doesn't re-start.
>> b) From a stored procedure, or perhaps VB, inquire on
the
>> running status of the SQL Agent (we have a monitor tool
>> that could be expended to report if the agent isn't
>> running) How does the SQL Enterprise Manager determin if
>> the SQL Agent is running ?
>> Thanks,
>> Joe.
>
>.
>|||For a robust production-grade setup, you may want to
configure your monitoring tool, which should be
independent of SQL Server, to restart the SQLAgent
service. Most enterprise-class monitoring tools such as
NetIQ and Patrol suppor such a configuration.
Linchi
>--Original Message--
>On several occasions, the SQL Service has been shut down
>and restart. In these cases, the SQL Agent does not auto
>re-start, and overnight processing has not been completed.
>Is there:
>a) A way to make sure that the SQL Agent ALWAYS starts
>when the SQL Service is started. I know I can do this if
>the server is re-booted, but if you just stop and re-
start
>the SQL Service, the SQL Agent doesn't re-start.
>b) From a stored procedure, or perhaps VB, inquire on the
>running status of the SQL Agent (we have a monitor tool
>that could be expended to report if the agent isn't
>running) How does the SQL Enterprise Manager determin if
>the SQL Agent is running ?
>Thanks,
>Joe.
>.
>

Friday, March 23, 2012

Making a subscriber the publisher

SQL 2000 /Windows 2000 Server
I need to shut the publisher down and remove it from the
network. Then I need the subscriber to now become the
publisher and push to other subscribers.
Is this as easy as just removing Data Replication, and
then recreating it, making the old subscriber, the
publisher?
Thx,
Don
Possibly. It depends on what type of replication you are doing. If you are
using merge it should just work after you have dropped the subscription.
With transactional that depends on if you are replicating DRI which will
replicate the primary keys as primary keys to the subscriber. If you were
not replicating DRI the primary keys will be replicated as unique indexes on
the subscriber and you will have to convert them to primary keys before your
can publish these tables.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Don" <anonymous@.discussions.microsoft.com> wrote in message
news:0fa001c48bba$5e3e36d0$a301280a@.phx.gbl...
> SQL 2000 /Windows 2000 Server
> I need to shut the publisher down and remove it from the
> network. Then I need the subscriber to now become the
> publisher and push to other subscribers.
> Is this as easy as just removing Data Replication, and
> then recreating it, making the old subscriber, the
> publisher?
> Thx,
> Don
>