The joy of FILEGROUP_NAME (and probably other as well)

Part of my scripts collection, is a script that returns the details of a table: storage, metadata (sys.objects), partitioning, etc. I was using this script for quite a while and ran ok. Few days ago, however, after I disabled an index on a partitioned table it failed and the error was a bit puzzling: Msg … Continue reading The joy of FILEGROUP_NAME (and probably other as well)

Aggregation and partitioned tables

One of my main tasks is to keep a close eye on performance. Every time we have a major release, I have to start looking at performance, find main culprits and fix them. Well, not me, but work with developers and find a solution to the issues at hand. And our databases are rather large, … Continue reading Aggregation and partitioned tables

Create certificate from backup fails on SQL Server 2008

This is so going to bite yer ass if you don't pay attention… As usual, a very quick post: I tried to create (ok, restore) a certificate from the production server to our DR server, so that the automated restores would work. When I ran the script (yes, CREATE CERTIFICATE … FROM FILE […]), I … Continue reading Create certificate from backup fails on SQL Server 2008

Say What? – “Management Studio: must be set in single thread apartment (STA) mode before OLE calls can be made”

Yes, I have another couple of minutes to document this weird message. I was trying to access the database properties for one of our databases. Guess what: I couldn't as there was no owner! Well, the easiest thing to do is to alter the authorization on the database; as you may have guessed it already, … Continue reading Say What? – “Management Studio: must be set in single thread apartment (STA) mode before OLE calls can be made”

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Error source: Microsoft OLE DB Provider for SQL Server – revisited

This blog post is waiting for me to have some time for the past couple of months by now. It did bite me back then, and so it did yesterday. "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Error source: Microsoft OLE DB Provider for SQL Server" … Continue reading Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Error source: Microsoft OLE DB Provider for SQL Server – revisited

My mail to SQL Sentry that will win me (yeah, right) a free seat to SQL Skills training!

The amazing guys @SQL Sentry (www.sqlsentry.net)  are giving away a chance to win a free seat to SQL Skills Internals and Performance training (check out the details: http://www.sqlsentry.net/sqlskillsimmersion.asp.Of) course, I decided to give it a try, so I wrote to the guys; you can check it below:"Hello there.Now, last night at around 2:30 AM I … Continue reading My mail to SQL Sentry that will win me (yeah, right) a free seat to SQL Skills training!

Create SQL Server aliases using registry editor

Another quick one today: how do I create an alias using the registry editor? If you want to want to ask me why would you do such a thing, it means you're reading the wrong blogJ. To cut it short, here are the entries in the registry: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo] – this is for x64 machines who … Continue reading Create SQL Server aliases using registry editor