LiCongMingDeShujuku / Find-When-Server-Restarted-Using-TSQL

使用TSQL查找服务器的重启时间

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLEVER DATA GIT REPO

使用TSQL查找服务器的重启时间

Find When Server Restarted Using TSQL

发布-日期: 2014年4月9日 (评论)

Contents

中文

你可以通过运行单个脚本来查看上次重新启动服务器的时间。 exec master..xp_cmdshell ‘systeminfo’ 如果发现报错,那么你可能需要通过sp_configure启用它,在这种情况下你可以运行以下命令: exec sp_configure ‘show advanced options’, ‘1’; reconfigure; sp_configure ‘xp_cmdshell’, ‘1’; reconfigure; 你的输出应该与下图类似。 另外,你能看到所有的OS系统信息。

English

You can see when the Server was last rebooted by running a single script. exec master..xp_cmdshell ‘systeminfo’ If you find an error; then you may need to enable this through sp_configure in which case you can run the following: exec sp_configure ‘show advanced options’, ‘1’; reconfigure; sp_configure ‘xp_cmdshell’, ‘1’; reconfigure; Your output should be similar to this. Additionally; you’ll see ALL the OS System Information


Logic

exec sp_configure ‘show advanced options’, ‘1’; reconfigure; sp_configure ‘xp_cmdshell’, ‘1’; reconfigure;
exec master..xp_cmdshell ‘systeminfo’

#

WorksEveryTime

Build-Info

Build Quality Build History
Build-Status
Coverage
Nuget
Build history

Author

  • 李聪明的数据库 Lee's Clever Data
  • Mike的数据库宝典 Mikes Database Collection
  • 李聪明的数据库 "Lee Songming"

Gist Twitter Wordpress


License

LicenseCCSA

Lee Songming

About

使用TSQL查找服务器的重启时间