Home  >  Article  >  Database  >  查询SQLServer的启动时间

查询SQLServer的启动时间

WBOY
WBOYOriginal
2016-06-07 15:52:181185browse

上午在分析索引的使用情况,想看一下数据库什么时候启动的,确保统计的数据没有问题,可以使用下面三种方法查询: --2008 及之后版本才有 SELECT sqlserver_start_time FROM sys . dm_os_sys_info select crdate from master .. sysdatabases where name = '

上午在分析索引的使用情况,想看一下数据库什么时候启动的,确保统计的数据没有问题,可以使用下面三种方法查询:

 

--2008及之后版本才有

SELECT sqlserver_start_time

FROM sys.dm_os_sys_info

 

select crdate from master..sysdatabaseswherename='tempdb'

 

SELECT login_time FROMsysprocesses WHEREspid= 1

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn