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, I didn’t pay any kind of attention to the error message, and quickly jumped to the magic world of… creating a diagram (actually the mouse pointer was in the wrong location, I just clicked, so it was not my fault, right?). Well, this time I got to do a print screen:
OK, now let’s copy that stupid message without reading it, select some random text from it, and do a blind search in hope for sheer luck. Click the Copy sign… and there you go, another weird stuff:
Now this one finally got my attention.
It turns out that it used to be a bug (check here), but it was supposed to be fixed. Well, apparently not all the cases were covered.
My wild guess is that:
If you have a database that does not have an owner (how about someone who left the company and we removed the user account – I need to check this) and you want to create a diagram, you will see the first pop-up error message. Trying to copy the message itself (via the Copy feature – yeap, those little sheets of paper in the lower-left corner) will yield the second error.
Of course, the solution is the most difficult one:
ALTER AUTHORIZATION ON DATABASE::MyDB TO sa;
I hope it helps.