sp_ctrl3

Daniel Hutmacher has released a new tool:

I designed my sp_ctrl3 procedure from the ground up to be a development tool that I can install on any dev environment that I use regularly. I wanted a detailed overview of a specific database object as well as copy-paste-friendly T-SQL code. For instance,

  • No “length” column on an int column

  • Proper scale/precision values on datatypes

  • “NULL” or “NOT NULL” instead of “yes” or “no”

  • Identity column syntax

  • “nvarchar(50)” instead of “nvarchar”, “100”

  • Column defaults

  • Complete index definitions

  • GRANT/DENY permission statements

  • The object_id of the object in sys.objects

If you use sp_help a lot, this looks like a good supplement.

Related Posts

Data File Migration With Minimal Downtime

Nate Johnson weaves a yarn around moving from one storage system to another with minimal downtime: Our ERP database has been chosen by the IT gods to get moved to the shiny new flash storage array, off the old spinning-rust SAN.  This is fantastic news for the business users.  But lo, the executives warn us, […]

Read More

Failed To Open Loopback Connection

Arun Sirpal diagnoses a connection problem: I could not read my error log on one of my local SQL Servers, when I executed the following code: EXEC sp_readerrorlog I received the below: Msg 22004, Level 16, State 1, Line 2 Failed to open loopback connection. Please see event log for more information. Msg 22004, Level 16, State […]

Read More

Categories

November 2016
MTWTFSS
« Oct Dec »
 123456
78910111213
14151617181920
21222324252627
282930