Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can SQL procedures from the Master database help db developers?

Tags:

sql-server

There are a lot of procedures and functions in the master database of SQL Server that provide handy tools for the database developer. For instance, sp_help [database object] will provide several results sets with useful attributes of the specified object; sp_helptext [procedure or function name] will return the body of a procedure or function in your results pane, (as opposed to you looking through your object explorer and opening the object with "Script as..." just to see its code contents.) Other really handy procedures include sp_depends and sp_msdependencies, the first of which lists all objects that will cease to work if you drop a specified object, and the latter of which lists all objects that must not be dropped if a specified object is to continue to work properly.

I learned about all of these today from a colleague, and I was shocked that I did not know about these sooner.

Does anyone out there know of any other handy little functions or procedures that will help a developer sort through the puzzle of an unfamiliar (and usually buggy) database?

like image 448
David McKay Avatar asked Mar 01 '23 04:03

David McKay


1 Answers

They are all on the MS Site: System Stored Procedures (Transact-SQL)

like image 180
Galwegian Avatar answered May 10 '23 00:05

Galwegian