Search code examples
sql-serversql-server-2005metadatarenamerefactoring-databases

Mass change datatype and rename of dependent store procedure variables


I am in the process of optimising my database and I was thinking of changing the datatype for some columns from DATETIME to SMALLDATETIME on my tables.

Is there a system stored procedure that returns both the contents/code of a store procedure and the dependent table which will then allow me to do a join on a filtered list of tables?

Cheers!

EDIT1:

Im looking to programatically rename the stored procedures not track dependencies!


Solution

  • I answered a simliar question to this (link below) with a sample of a scipt I use to find text in stored procedures (and functions and views). It requires a bit of work, but might help you here.

    [How to find data table column reference in stored procedures

    [1]: http://How to find data table column reference in stored procedures