Primary Key and Unique Key both enforce uniqueness, but they differ in the index they create and in NULL handling. Here are the differences and the scripts.
SQL SERVER – ReIndexing Database Tables and Statistics with Targeted Maintenance
ReIndexing Database tables starts with a measured maintenance need. I check the workload before choosing an index operation.
SQL SERVER – Shrinking Truncate Log File – Log Full
The old code I used to truncate log file space with DBCC SHRINKFILE and BACKUP LOG WITH TRUNCATE_ONLY. It breaks the log chain, so take a full backup after.



