Scripting Object Level Permissions

A while ago while making changes to a client database, I needed to determine all of the object level permissions that were in the database I was working on.  The system stored procedure sp_helprotect turned out to be pretty useful in obtaining this information. The procedure accepts four parameters: They do pretty much what would … Continue reading Scripting Object Level Permissions

I Don’t Want To Use the Object Browser (sp_helptext)

Have you ever needed the definition of a view, stored procedure, or user defined function?  I sure hope you have - otherwise reading any more of this posting will be more than pointless. For those of you still with me, have you ever also not wanted to find that definition without have to browse through … Continue reading I Don’t Want To Use the Object Browser (sp_helptext)

Say what?! DB Pro 2008 installation didn’t work?

I'm sitting around tonight trying to reverse engineer a database with Database Professional 2008 and I get this unexpected error.  (they're all unexpected, aren't they) --------------------------- Microsoft Visual Studio --------------------------- Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. --------------------------- OK   --------------------------- … Continue reading Say what?! DB Pro 2008 installation didn’t work?

Where’d Report Designer Preview go!?

If you are like me and have been toying around with Report Designer (aka Report Builder 2.0), you may have noticed that it disappeared with RC0 and RTM.  Unfortunately, the RC0 version is the only version currently available and even more unfortuantely, if you haven't downloaded it already you are out of luck.  I am … Continue reading Where’d Report Designer Preview go!?

Are You Sure You’re Using the Right Query?

I found a nice little feature in SQL Server Reporting Services (SSRS) today.  Through the expression "=dataset!<dataset name>.commandtext" the query executed by the dataset can be returned to the report.  There is also a rewrittencommandtext function but it appears to only be populated when Report Models are being used.  This feature been around for a … Continue reading Are You Sure You’re Using the Right Query?

Find The Heap Indexes

I'm generally a convert to the congragation that all tables should have clustered indexes.  It makes sense, helps performance, and in most cases is the best starting point for a tables.  If you aren't part of the community of the faithful on clustered indexes, please read Kimberly Trip's blog on clustered indexes.  There are other … Continue reading Find The Heap Indexes

Index Size and Usage

Thought I'd share something I threw together for a client today.  They were looking for index a list of indexes in a database with their associated sizes and usage. Using this WHERE statement allowed them to identify 38GB of index space that was being allocated unnecessarily for indexes.

AUTO_UPDATE_STATISTICS_ASYNC SQL Server Database Configuration

I've been looking into the AUTO_UPDATE_STATISTICS_ASYNC option for SQL Server lately and found a couple decent articles on there on it. AUTO_UPDATE_STATISTICS_ASYNC SQL Server Database Configuration Asynchronous Update Statistics Preventing the blocking of queries in OLTP environment from statastic updates seems like a good thing.