In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Many novices are not very clear about how to restart SQLSERVER services and computers through SQLSERVER. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
Yesterday and friends talked about the application of SQL sentence online, my friend's remote server can not connect to the phenomenon, the reason is that the remote server reached the maximum number of connections, in order to achieve a remote restart, thus thinking of using SQL commands to achieve this function, but the specific command format to forget, find some information, the method to write below, hope to give you some help it.
First, on the local computer-- create the restart script code as follows:
Declare @ o int,@f int,@t int,@ret int exec sp_oacreate 'scripting.filesystemobject',@o out exec sp_oamethod @ o out,'c:\ restart.bat',1 exec @ ret=sp_oamethod @ f out,'c:\ ret=sp_oamethod @ f maxim writelinebook stop mssqlserver' exec @ ret=sp_oamethod @ fmai null script net start mssqlserver'
Connect to the remote server through the SQL database-execute the restart script exec master..xp_cmdshell 'c:\ restart.bat' / * if you restart the computer, make sure that the mssqlserver account is running under the administrator account (non-local system account) * / exec master..xp_cmdshell 'shutdown / r / f' there is a premise that you need to use a component on the server, the xp_cmdshell component But for general servers, this component is disabled. So you have to use the component before you can apply the above method.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.