标签:
记录所有应用到 SQL Server 实例和当前排序规则的 Service Pack 和修补程序:
SELECT SERVERPROPERTY(‘ProductVersion ‘) AS ProductVersion, SERVERPROPERTY(‘ProductLevel‘) AS ProductLevel, SERVERPROPERTY(‘ResourceVersion‘) AS ResourceVersion, SERVERPROPERTY(‘ResourceLastUpdateDateTime‘) AS ResourceLastUpdateDateTime, SERVERPROPERTY(‘Collation‘) AS Collation;
记录系统数据库的所有数据文件和日志文件的当前位置:
SELECT name, physical_name AS current_file_location FROM sys.master_files
WHERE database_id IN (DB_ID(‘master‘), DB_ID(‘model‘), DB_ID(‘msdb‘), DB_ID(‘tempdb‘));
更改字符集(重新生成系统数据库 运行下面的命令就可重建数据库):
D:/Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=Administrators /SAPWD=XXXX /SQLCOLLATION=Chinese_PRC_CI_AS
标签:
原文地址:http://www.cnblogs.com/wonder315/p/4325349.html