我无权访问该机器,但我想知道何时安装了这个sql server?
我有服务器视图状态访问权限,这意味着我可以访问dmvs但我无法连接到机器,我找不到任何带有此信息的DMV。
答案 0 :(得分:0)
SELECT create_date,*
FROM sys.server_principals
WHERE sid = 0x010100000000000512000000 -- sid of NT AUTHORITY\SYSTEM
Pinal Dave从以下文章中提及
SQL SERVER – Retrieve SQL Server Installation Date Time
这篇文章How to find out the SQL Server installation date?有更多选项
-- work with only English language installations
SELECT createdate AS 'SQL Server Installation Date'
FROM sys.syslogins
WHERE NAME = 'NT AUTHORITY\SYSTEM'
--neutral language
SELECT createdate AS 'SQL Server Installation Date'
FROM sys.syslogins
WHERE sid = 0x010100000000000512000000
--Using sys.server_principals
SELECT create_date as 'SQL Server Installation Date'
FROM sys.server_principals
WHERE name='NT AUTHORITY\SYSTEM'
答案 1 :(得分:0)
我认为这些信息并不存在于任何DMV中,而是我经常寻找的地方是sys.server_principals
。查找SYSTEM
或NETWORK SERVICE
登录,这将指示您何时安装此SQL Server。
Select Create_Date
FROM sys.server_principals
WHERE name = N'NT AUTHORITY\SYSTEM'
OR name = N'NT AUTHORITY\NETWORK SERVICE'