I am trying to work with a rather large SQL server database with a few hundred stored procedures that I inherited. In trying to understand the structure, would like to be able to search the SP text globally, and then be able to rename variables and otherwise edit the whole set of SPs will global string search/replaces (refactor).
In SQL studio, or VS 2005 all i can can do is open one SP at a time.
Hi,
there is no refactoring tool in SQL Server 2005, AFAIK. You can serahc all procedure be querying the INFORMATION_SCHEMA.Routines for finding your called stored procedures. But keep in mind that of you *refactore* those queries, eventually client calls to that stored procedures referencing vertain variables could break.
SELECT Routine_NAME , Routine_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE Routine_definition LIKE '%SOMESeachValue%'
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment