Now is your chance to ask a question about corruption in SQL Server databases. We will do our best job of answering those questions on our February webcast on database corruption. Do you have a question about the output from DBCC CheckDB? Seeing a strange error in your SQL Server logs? Is your SQL Server sending alerts related to corruption? …

Ask a question about Database Corruption Read more »

After my post yesterday on the performance implications of concatenating long strings with the + operator and the CONCAT function, today I am following up with a way to speed up concatenation if you need to build really long strings. What the previous show as that the longer the string gets the slower the concatenation is. So instead we declare …

Performance: Faster way to concatenate longer string Read more »

String concatenation in SQL Server can be pretty quick but under certain circumstances it can really slow down. Something to be aware of if you are working with larger varchar(max) values that need to be appended to using concatenation in TSQL. The experiment: Using a VARCHAR(MAX) variable, start with it empty, then in a loop concatenate another string to it …

Performance: String Concatenation in SQL Server Read more »

Occasionally I need to look up what user the SQL Server services are running as, and when this happens, you can either run a quick query, or wade through the dialog boxes for the SQL Server services top see what user they are running as. I prefer the query, however this only runs on SQL Server 2008R2 SP1 or newer. …

TSQL Query to find the user the SQL services run as Read more »

I was investigating a slow sever recently and discovered almost a million files in the sql server error log directory. This contained job history and backup logs for many years. The error log directory is not a location that I normally check, so I created a script to quickly and easily check how many files are in a SQL Server …

How many files are in your SQL Error log directory? Read more »

One handy thing when working with JSON or XML is to take part of the data and represent it as tabular data, since everything in SQL Server works better as a table, pulling values out and representing them as a table can be handy. Going back to our original data as shown below from my original blog post that kicked …

Iterating over JSON and XML values Read more »