DBCC SHRINKDATABASE command shrink all data and log files for a specific database. The TRUNCATEONLY option doesn't do any compacting and just releases any free portion of the file to the OS. It doesn't do the compacting because that's what...
Read MoreBelow code will shrink 80% free space and remains 20% free for database files. DBCC SHRINKDATABASE command shrink all data and log files for a specific database. To shrink one data or log file at a time for a specific...
Read MoreWhen you performing a huge DELETE operation with or without where clauses, transaction log might take over SQL server hard disk and it might takes long time to complete. But delete in chunks: 50,000 or 100,000 rows at a time...
Read MoreBelow user-defined scalar function help you to wrap a string in double quotes for a formatted text output...
Read MoreBelow user-defined scalar function help you to wrap a string in single quotes for a dynamic TSQL...
Read MoreError handling in T-SQL can be complex. TRY…CATCH certainly is the best way to handle errors in...
Read More