servicecontroller - having trouble running it

  • Thread starter Thread starter Bernie Yaeger
  • Start date Start date
B

Bernie Yaeger

I'm getting this exception using the servicecontroller component, just by
calling servicecontroller1.canstop().
Cannot open D5Z0071 service on computer '.'.

I've left the name of the machine alone (defaults to '.', ie, local) and
I've set the servicename to "D5Z0071", the name of my sql server. Now it
happens that this is the name of the machine also, since it defaulted to the
machine name on installation and I never changed it. I don't know if that
may be the problem, but I wanted to mention it. I have imports for both
system and system.serviceprocess.

Any ideas?

Tx - Bernie Yaeger
 
Bernie,
However "D5Z0071" is *NOT* the name of the SQL Server Service! It *IS* the
name of the instance of SQL Server.

You need to use Services under Computer Management to find the name of the
Service itself. It should be something like "MSSQLSERVER".

Alternatively you can use the Server Explorer in VS.NET to find the name.

Remember you want the ServiceName, not the DisplayName or instance name.

Hope this helps
Jay
 
Hi Cor,

Thanks, as always. I will try to figure it out per Jay's instructions, but
I'll have a look at the kb article if I have problems.

Tx,

Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top