I recently discovered that I could use the sp_help
to get a table definition and have been hooked onto it since then. Before my discovery, I had to open up the Object explorer in SQL Management studio, manually search for the table name, right click on the table and select Design. That was a lot of effort!
What other system stored procedures do you all use that you can't simply live without?
Check This link also
http://msdn.microsoft.com/en-us/library/ms176007.aspx
You can use
sp_spaceused
to determine the size of a table or the entire database. If you pass the table name, it returns the space used for that table, when called with no argument it gives the space of the database.Select * From sysobjects where xtype='U' order by Name
Gives a list of all user-defined tables in a database.
master.dbo.xp_cmdshell
I can't list the number of times I didn't have RDP access to a box but did have a SQL login with sufficient permissions to execute that in order to run shell commands on it.
All of these undocumented ones
See here: Undocumented stored procedures
And now since SQl Server 2005 all the Dynamic Management Views like sys.dm_db_index_usage_stats
sp_helptext
list of useful system stored procedures