SQL Server 重命名数据库
EXEC sp_dboption 'OldDbName', 'Single User', 'TRUE'
EXEC sp_renamedb 'OldDbName', 'NewDbName'
EXEC sp_dboption 'NewDbName', 'Single User', 'FALSE'
EXEC sp_dboption 'OldDbName', 'Single User', 'TRUE'
EXEC sp_renamedb 'OldDbName', 'NewDbName'
EXEC sp_dboption 'NewDbName', 'Single User', 'FALSE'