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?

image

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:

ProgressError
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

 

---------------------------


Posted in: SQL Administration  Tags:
blog comments powered by Disqus

by Lee Everest, M.S.

Info

Poll

Do you use Azure or cloud in your organization?



Show Results

Ads

Search


Month List

Calendar

«  May 2012  »
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
View posts in large calendar

Tags

Disclaimer
The opinions, code, examples, et.al. expressed herein are my own personal opinions and do not represent my employer's view in any way, shape form, or fashion.  All code for demonstration purposes - no guarantees, either written or implied, are made.

© Copyright 2012 Lee Everest's SQL Server, etc. weblog