遗失的星空

导航

【整理】更改MSSQL默认字符集

 

记录所有应用到 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

posted on 2015-03-10 10:48  遗失的星空  阅读(844)  评论(0编辑  收藏  举报