How to shrink a database in 4 easy steps

April 28, 2016 Andy 9

It’s a really common question: “How do I shrink my database?” Luckily, there’s also a really common answer: “Don’t.” …but what if you really have to? Perhaps you just implemented data compression, and have 60% free space in your database. Perhaps you just deleted a … [Read More]

CONVERT() to float using scientific notation

April 20, 2016 Andy 2

Someone posted to #sqlhelp on Twitter, asking the following: “Wondered if anyone could enlighten me as to why ISNUMERIC(‘7d8’) returns 1?” Sure enough, SELECT ISNUMERIC(‘7d8′) returns a 1. WTF? d isn’t numeric! OK, sure, if you say “seven-dee-eight” out loud it sounds like a number, but “d” is a … [Read More]

How fast queries hurt performance

April 15, 2016 Andy 6

This week at work, I noticed CPU on one server seemed pretty high. I wasn’t familiar with this particular server, but based on the applications it supported, I was expecting the server to be under-utilized. I went over to vCenter to look at historical CPU … [Read More]

T-SQL Tuesday #77– My favorite SQL Server feature

April 12, 2016 Andy 2

It’s T-SQL Tuesday,  the blog party that SQL Server expert Adam Machanic (blog|twitter) started. This month’s episode is hosted by Jens Vestergaard (blog | twitter). The topic: Favorite SQL Server Feature. When I saw this topic, I was really excited. My mind started racing through all the awesome features … [Read More]

Users in SQL Server cluster

April 12, 2016 Andy 0

Question I have created a 2012 WFC and SQL Server 2014 is clustered on it. The cluster works as expected but have a question on Users: I added a windows domain group to the cluster as sysadmin. When the user tries to log into SQL … [Read More]

ReportServerTempDB in AlwaysOn Availability group

April 11, 2016 Andy 0

Question ReportserverTempdb logfile is 6TB in size and growing and I need help. I am supporting a huge reporting server farm and the client wants reporting services to be in AlawysON Availability group(AAG) and we configured reportserver and reportserverTempDB on in three node Primary replica, … [Read More]

Exclude All Matching Rows

April 8, 2016 Andy 0

Question I have a table that has a unique ID, name, email, and some other fields. I want to match this table against another table on email, but sometimes emails are shared. The unique ID is not shared among tables, but I will input the … [Read More]

Reduce MDF file size

April 1, 2016 Andy 0

Question I am working with a 500 GB SQL Server database. I need to reduce the size of the database data file after removing a large amount (50%) of the data. I tried re indexing, it’s good the database has de-fragmented. But the DB size … [Read More]