Q9.7: Extended Stored Procedures


The following stored procedures were written by Ed Barlow sqltech@tiac.net and can be fetched from the following site:
http://www.tiac.net/users/sqltech
Here's a pseudo-man page of what you get:

Modified Sybase Procedures
Command Description
sp__help Better sp_help
sp__helpdb Database Information
sp__helpdevice Break down database devices into a nice report
sp__helpgroup List groups in database by access level
sp__helpindex Shows indexes by table
sp__helpsegment Segment Information
sp__helpuser Lists users in current database by group (include aliases)
sp__lock Lock information
sp__who sp_who that fits on a page

Audit Procedures
Command Description
sp__auditsecurity Security Audit On Server
sp__auditdb Audit Current Database For Potential Problems

System Administrator Procedures
Command Description
sp__block Blocking processes.
sp__dbspace Summary of current database space information.
sp__dumpdevice Listing of Dump devices
sp__helpdbdev Show how Databases use Devices
sp__helplogin Show logins and remote logins to server
sp__helpmirror Shows mirror information, discover broken mirrors
sp__segment Segment Information
sp__server Server summary report (very useful)
sp__vdevno Who's who in the device world

DBA Procedures
Command Description
sp__badindex give information about bad indexes (nulls, bad statistics...)
sp__collist list all columns in database
sp__indexspace Space used by indexes in database
sp__noindex list of tables without indexes.
sp__helpcolumns show columns for given table
sp__helpdefault list defaults (part of objectlist)
sp__helpobject list objects
sp__helpproc list procs (part of objectlist)
sp__helprule list rules (part of objectlist)
sp__helptable list tables (part of objectlist)
sp__helptrigger list triggers (part of objectlist)
sp__helpview list views (part of objectlist)
sp__trigger Useful synopsis report of current database trigger schema

Reverse Engineering
Command Description
sp__revalias get alias script for current db
sp__revdb get db creation script for server
sp__revdevice get device creation script
sp__revgroup get group script for current db
sp__revindex get indexes script for current db
sp__revlogin get logins script for server
sp__revmirror get mirroring script for server
sp__revuser get user script for current db

Other Procedures
Command Description
sp__bcp Create unix script to bcp in/out database
sp__date Who can remember all the date styles?
sp__quickstats Quick dump of server summary information