1. load the script called Generate Change Column CollationEnsure that the Collation setting at the top is correctRun it against the DatabaseSave the results as 01_Change_Column_Collation.SQL 2. Load the Script called Generate Primary Key ConstraintsRun it against the databaseSave the results...
SELECTqs.creation_time,qs.last_execution_time,qs.execution_count,qt.text AS sql_text,qp.query_planFROMsys.dm_exec_query_stats AS qsCROSS APPLYsys.dm_exec_sql_text(qs.sql_handle) AS qtCROSS APPLYsys.dm_exec_query_plan(qs.plan_handle) AS qpORDER BYqs.last_execution_time DESC;...
ALTER DATABASE xxxxx SET EMERGENCY;GO ALTER DATABASE xxxxx set single_userGO DBCC CHECKDB (xxxxx , REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;GO ALTER DATABASE xxxxx set multi_userGO...