DDL vs System Stored Procedures

Published 24 September 7 7:25 AM | GregLow

In SQL Server 2005, a really good move towards the use of DDL (ie: CREATE/ALTER/DROP etc) rather than the use of system stored procedures (ie: sp_addlogin) was made. This is an important move not only for the clarity of the language itself but it allows these statements to be trapped by DDL triggers, notified via Event Notifications and controlled by Declarative Management Framework policies (coming in SQL Server 2008).

However, a number of aspects of SQL Server 2008 have moved back to using system stored procedures. I am encouraging Microsoft to reverse this trend. They seem to be making a distinction between "core engine" functionality and other functionality.

A good example of why this is a problem is sp_rename. Currently, you can set a DMF policy on the naming structure for tables yet this can be subverted by someone simply calling sp_rename to change the name after the CREATE statement has been run. Rather than trying to patch all these holes one by one, the syntax should be changed. I'd like to see sp_rename replaced by something like:

 ALTER OBJECT objectname WITH NAME = 'newobjectname'

If you agree, please vote at the connect site here:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=299326

and while you're at it, you can also vote for the same thing related to change data capture here:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=297069