Which system stored procedures do you use?

I realise this is subjective, but I figure some discussion on here can't be a bad thing!

The system stored procedures are pushed into the following categories in MSDN:

  • Active Directory Stored Procedures
  • Catalog Stored Procedures
  • Change Data Capture Stored Procedures
  • Cursor Stored Procedures
  • Database Engine Stored Procedures
  • Database Mail and SQL Mail Stored Procedures
  • Database Maintenance Plan Stored Procedures
  • Distributed Queries Stored Procedures
  • Full-Text Search Stored Procedures
  • Log Shipping Stored Procedures
  • Automation Stored Procedures
  • Policy-Based Management Stored Procedures
  • Replication Stored Procedures
  • Security Stored Procedures
  • SQL Server Profiler Stored Procedures
  • SQL Server Agent Stored Procedures
  • XML Stored Procedures
  • General Extended Stored Procedures

Which of those categories do you make use of?

more ▼

asked Nov 23, 2009 at 08:55 PM in Default

avatar image

Matt Whitfield ♦♦
29.5k 62 66 88

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

for DBA code I love sp_msforeachdb and sp_msforeachtable

more ▼

answered Nov 24, 2009 at 12:39 AM

avatar image

101 1 3 5

(comments are locked)
10|1200 characters needed characters left

I guess I would probably use these every week.....

Database Engine Stored Procs

  • attach / detach
  • sp_helpXXXX
  • sp_who(2)

Database Mail

  • sending mail

Security Stored Procs

  • adding users/roles etc

SQL Server Profiler Stored Procs

  • server side tracing

SQL Server Agent Stored Procs

  • job creation and management

General Extended Stroed Procs

  • xp_cmdshell !!!
more ▼

answered Nov 24, 2009 at 06:15 AM

avatar image

Kev Riley ♦♦
66.8k 48 65 81

(comments are locked)
10|1200 characters needed characters left

I am currently working on some back-end code to generate views, format files, etc. from metadata, and sp_executesql has been quite useful.

more ▼

answered Nov 23, 2009 at 10:50 PM

avatar image

Tom Staab ♦
14.5k 7 15 21

I forgot to mention I also frequently use sp_help and sp_helptext.

Nov 24, 2009 at 12:33 PM Tom Staab ♦
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Nov 23, 2009 at 08:55 PM

Seen: 1467 times

Last Updated: Nov 23, 2009 at 08:55 PM

Copyright 2018 Redgate Software. Privacy Policy