如何通过远程桌面启动Sql Server 2008? [英] How Can I Start Sql Server 2008 By Remote Desktop?
本文介绍了如何通过远程桌面启动Sql Server 2008?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
我们的服务器上有Sql Server 2008.我可以远程访问服务器(使用用户名和密码)并启动或停止Sql Server。
现在我想开始并停止服务器上的Sql Server,无需远程访问。
这是我的代码:
hi
We have Sql Server 2008 on our Server.I can remote access to server(with Username and Password) and start or stop the Sql Server.
Now i want to start and stop the Sql Server which is on server,without remote access.
This is my Code:
ServiceController sc=new ServiceController("MSSQLSERER","mc040");
sc.Start();
mc040是我的电脑名称;
这个代码运行良好,但它对我的服务器不起作用。
我该怎么办?
"mc040" is my computer name;
This code is working well,but it does not work for my server.
what should i do?
推荐答案
这篇关于如何通过远程桌面启动Sql Server 2008?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文