I was scripting out some stored procedures to the clipboard and new window (and then every other way) and the damn thing stopped 1/2 way through. No error, message, warning, flag, flashing yellow light, nothing. WTF?

I ran the thing a few times and then thought, Ok, let’s hit the Save Report button, so I did. What ensued – some Einstein encrypted a few stored procedures, and the first one that it hit, it died. Now, I don’t think it’s necessary for the most part to encrypt stored procedures. If you’re a third-party with some app, maybe. Otherwise, not so much. Beside the point. No, my complaint here is that I don’t get an error telling me what the hell it was that caused the generate scripts to die. Nice.
Here’s what I get with the save report:
Preparing dbo.myProcedure
Failed
Microsoft.SqlServer.Management.Smo.PropertyCannotBeRetrievedException: Property TextHeader is not available for StoredProcedure '[dbo].[myProcedure]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. The text is encrypted. at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
So, the next time you run into somebody encrypting stored procedures in your database, tell them to go ahead and stop anytime they like because they’re creating a mess.
Thanks for reading!
Lee
---------------------------
aba9f192-2d0a-454a-bc4b-5e66e10e67cc|0|.0