Get Database Size in SQL Server Using T-SQL
Today’s quick tip: get the size of your database in SQL Server (including SQL Azure) by using a T-SQL statement. Connect to your database, and execute this query: SELECT ( (SUM(Reserved_Page_Count) *...
View ArticleCreate and Monitor a Backup of a Database in SQL Azure
SQL Azure provides a scriptable, easy way to create a backup of a database from within SQL Management Studio. This is very useful if you need to create a backup before making a large production change,...
View ArticleSQL Azure: Solve an Excessive Transaction Log Space Usage Exception
Early this morning I was alerted of an interesting SQL exception from one of our data integration services: The session has been terminated because of excessive transaction log space usage. Try...
View ArticleSQL DELETE or INSERT Fail With Incorrect ‘QUOTED_IDENTIFIER’ SET Options
A very frustrating error was holding the entire team up yesterday: …the following SET options have incorrect settings: ‘QUOTED_IDENTIFIER’. Here’s the full exception that TeamCity was giving us:...
View ArticleImport Large SQL Scripts Into SQL Server
Today’s quick tip is brought to you by the following error message: I received that when trying to import a 31,000 line SQL file via SQL Server Management Studio. If you’re just trying to run a single...
View ArticleTemporarily Disable All T-SQL Table Constraints in a Database
After generating a set of scripts to import production data to a local development database, I ran into an issue with constraints blocking the inserts (this is on a fresh database structure). To get...
View ArticleSSMS Tip: Disable “Saving Changes Is Not Permitted” Warning
If you’ve ever experienced the dreaded Saving changes is not permitted dialog in SQL Management Studio, this tip is for you. To disable the message, open the Tools -> Options menu and navigate to...
View ArticleResolve BACPAC Export Exception: MS_Description Is Not Supported
Recently ran into this interesting issue when trying to export a BACPAC: The MS_Description extended property is apparently not supported by the export data-tier application utility. So how do we find...
View ArticleResolve DACPAC Export Exception: FillFactor Is Not Supported
Another interesting data-tier application export exception: FillFactor is not supported when used as part of a data package. Use the following query to identify the problem indexes: SELECT...
View ArticleForce Drop a Database From T-SQL
While it’s rather easy to force drop a database from SQL Server Management Studio’s UI, it’s just as easy to script it out: ALTER DATABASE [YOUR-DATABASE-NAME] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;...
View Article
More Pages to Explore .....