Monday, March 26, 2012
Is there a Cluster command line I can run which will stop my "SQL Agent Service"?
Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
Cluster command line I can run which will stop my "SQL Agent Service"?
Spin
Hi
How about NET STOP?
John
"Spin" <Spin@.invalid.com> wrote in message
news:656t5iF2eq3dbU1@.mid.individual.net...
> Gurus,
> Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
> Cluster command line I can run which will stop my "SQL Agent Service"?
> --
> Spin
>
|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:e2yjJedkIHA.5368@.TK2MSFTNGP04.phx.gbl...
> Hi
> How about NET STOP?
No can do John. NET STOP stops the service outside of the Cluster
environment. What will happen is the Windows Cluster service will detect
the service down then automatically restart it! What I need is a Cluster
service command line tool which gracefully stops the service per "knowledge"
if you will, of the Cluster service.
|||For the default instance:
cluster.exe /cluster:<cluster name> resource "SQL Server Agent" /offline
For a named instance (assuming that the instance name is SQL2):
cluster.exe /cluster:<cluster name> resource "SQL Server Agent (SQL2)"
/offline
Linchi
"Spin" wrote:
> Gurus,
> Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
> Cluster command line I can run which will stop my "SQL Agent Service"?
> --
> Spin
>
>
|||Thanks! I'll shout back on Monday if this works...
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:C9EF5727-A88B-4261-B445-266B2C45990C@.microsoft.com...[vbcol=seagreen]
> For the default instance:
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent" /offline
> For a named instance (assuming that the instance name is SQL2):
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent (SQL2)"
> /offline
> Linchi
> "Spin" wrote:
|||"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:C9EF5727-A88B-4261-B445-266B2C45990C@.microsoft.com...
> For the default instance:
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent" /offline
> For a named instance (assuming that the instance name is SQL2):
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent (SQL2)"
> /offline
> Linchi
Worked!!!!! You are a Gentleman and a Scholar!
Spin
Is there a Cluster command line I can run which will stop my "SQL Agent Service"?
Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
Cluster command line I can run which will stop my "SQL Agent Service"?
--
SpinHi
How about NET STOP?
John
"Spin" <Spin@.invalid.com> wrote in message
news:656t5iF2eq3dbU1@.mid.individual.net...
> Gurus,
> Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
> Cluster command line I can run which will stop my "SQL Agent Service"?
> --
> Spin
>|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:e2yjJedkIHA.5368@.TK2MSFTNGP04.phx.gbl...
> Hi
> How about NET STOP?
No can do John. NET STOP stops the service outside of the Cluster
environment. What will happen is the Windows Cluster service will detect
the service down then automatically restart it! What I need is a Cluster
service command line tool which gracefully stops the service per "knowledge"
if you will, of the Cluster service.|||For the default instance:
cluster.exe /cluster:<cluster name> resource "SQL Server Agent" /offline
For a named instance (assuming that the instance name is SQL2):
cluster.exe /cluster:<cluster name> resource "SQL Server Agent (SQL2)"
/offline
Linchi
"Spin" wrote:
> Gurus,
> Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
> Cluster command line I can run which will stop my "SQL Agent Service"?
> --
> Spin
>
>|||Thanks! I'll shout back on Monday if this works...
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:C9EF5727-A88B-4261-B445-266B2C45990C@.microsoft.com...
> For the default instance:
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent" /offline
> For a named instance (assuming that the instance name is SQL2):
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent (SQL2)"
> /offline
> Linchi
> "Spin" wrote:
>> Gurus,
>> Running SQL Server 2005 SP2 on a Windows Server 2003 Cluster. Is there a
>> Cluster command line I can run which will stop my "SQL Agent Service"?
>> --
>> Spin
>>|||"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:C9EF5727-A88B-4261-B445-266B2C45990C@.microsoft.com...
> For the default instance:
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent" /offline
> For a named instance (assuming that the instance name is SQL2):
> cluster.exe /cluster:<cluster name> resource "SQL Server Agent (SQL2)"
> /offline
> Linchi
Worked!!!!! You are a Gentleman and a Scholar!
--
Spin
Monday, March 19, 2012
Is SqlServer Agent running?
Hi,
Can anyone give me some clues as to how I programmatically determine if Sql Server Agent is running. I'm using Sql 2005 and c#.
I have found the JobServer property in the SqlServer object but this still doesn't tell me is the service is running!!
Thanks for your help
Graham
Take a look at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer. This class has a ServiceCollection property which represents all SQL Server services on a target machine. Find your service and check it's state.
WBR, Evergray -- Words mean nothing...|||this is really a useful class. but do u know how to obtain the machine name from SQL server name?
cos in my application, the user just provoide server name. how can I get the machine name to configure the services on the machine?
|||Server name is usually machine name (default instance) or machine_name\instance_name for named instances of SQL Server, so it's not a problem.
But anyway you can determine machine name using host_name() system function, if you're already connected to server.
WBR, Evergray -- Words mean nothing...|||yup. thanks for the reply.
I found that I can use SMO to find it machine name as well.
|||how do you determine the machine name using objects in the SMO namespace?Is SqlServer Agent running?
Hi,
Can anyone give me some clues as to how I programmatically determine if Sql Server Agent is running. I'm using Sql 2005 and c#.
I have found the JobServer property in the SqlServer object but this still doesn't tell me is the service is running!!
Thanks for your help
Graham
Take a look at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer. This class has a ServiceCollection property which represents all SQL Server services on a target machine. Find your service and check it's state.
WBR, Evergray
--
Words mean nothing...|||
this is really a useful class. but do u know how to obtain the machine name from SQL server name?
cos in my application, the user just provoide server name. how can I get the machine name to configure the services on the machine?
|||Server name is usually machine name (default instance) or machine_name\instance_name for named instances of SQL Server, so it's not a problem.
But anyway you can determine machine name using host_name() system function, if you're already connected to server.
WBR, Evergray
--
Words mean nothing...|||
yup. thanks for the reply.
I found that I can use SMO to find it machine name as well.
|||how do you determine the machine name using objects in the SMO namespace?Is SqlServer Agent running?
Hi,
Can anyone give me some clues as to how I programmatically determine if Sql Server Agent is running. I'm using Sql 2005 and c#.
I have found the JobServer property in the SqlServer object but this still doesn't tell me is the service is running!!
Thanks for your help
Graham
Take a look at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer. This class has a ServiceCollection property which represents all SQL Server services on a target machine. Find your service and check it's state.
WBR, Evergray -- Words mean nothing...|||this is really a useful class. but do u know how to obtain the machine name from SQL server name?
cos in my application, the user just provoide server name. how can I get the machine name to configure the services on the machine?
|||Server name is usually machine name (default instance) or machine_name\instance_name for named instances of SQL Server, so it's not a problem.
But anyway you can determine machine name using host_name() system function, if you're already connected to server.
WBR, Evergray -- Words mean nothing...|||yup. thanks for the reply.
I found that I can use SMO to find it machine name as well.
|||how do you determine the machine name using objects in the SMO namespace?Wednesday, March 7, 2012
is replication session a transaction?
see 100 actions in the Agent History and the last one is "the process could
not enumerate changes at the subscriber" due to General Network Error
(dropped connection or whatever), did those 10000 data changes get
committed or were they all rolled back and the next agent run will start
that all over again.
Assuming the negative possibility, what profile parameter would I change to
reduce the number of rows before a commit? Our agents for low-bandwidth
subscribers are running for hours and hours and never seem to catch up
because they always eventually lose the connection.
Thanks for any insights.
They are committed as singletons. So a batch of 100 (by default or whatever
is in the Upload|DownloadWriteChangesPerBatch) is tried and if errors
occurred while applying a batch the error rows go into a retry look which is
tried after the batch completes.
Should an network error occur during a synchronization, the merge agent will
look at the last batch successfully applied and then start to apply the next
one again. There is a possiblility that should 99 of the rows in the last
batch make it through, all 99 will be tried again to push the last one
through which was not successful.
You will notice that the slow link profile drops these values from 50 to 1
(or 5 for UploadGenerationsPerBatch).
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Anachostic" <anachostic@.remove.700cb.net> wrote in message
news:Xns995CA07258BD9anachostic@.207.46.248.16...
>I am curious if a "session" for merge replication is a transaction. If I
> see 100 actions in the Agent History and the last one is "the process
> could
> not enumerate changes at the subscriber" due to General Network Error
> (dropped connection or whatever), did those 10000 data changes get
> committed or were they all rolled back and the next agent run will start
> that all over again.
> Assuming the negative possibility, what profile parameter would I change
> to
> reduce the number of rows before a commit? Our agents for low-bandwidth
> subscribers are running for hours and hours and never seem to catch up
> because they always eventually lose the connection.
> Thanks for any insights.