This is a discussion on SQL Server Undocumented Stored Procedures within the Database Support forums, part of the Web Development category; Hi all, In this Thread, I want to tell you about some useful undocumented stored procedures shipped with SQL Server. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, sp_MSget_qualified_name This stored procedure is used to get the qualified name for the given object id. Syntax sp_MSget_qualified_name object_id, qualified_name where object_id - is the object id. object_id is int. qualified_name - is the qualified name of the object. qualified_name is nvarchar(512). This is an example to get the qualified name for the authors table from the pubs database. USE pubs GO DECLARE @object_id int, @qualified_name nvarchar(512) SELECT @object_id = object_id('authors') EXEC sp_MSget_qualified_name @object_id, @qualified_name OUTPUT SELECT @qualified_name GO Here is the result set from my machine: -------------------------------------- [dbo].[authors] thnx.. |
| |||
| Hi, sp_MSdrop_object This stored procedure is used to drop an object (it can be table, view, stored procedure or trigger) for the given object id, object name, and object owner. If object id is provided, then the object name and the object owner need not be specified. Syntax sp_MSdrop_object [object_id] [,object_name] [,object_owner] where object_id - is the object id. object_id is int, with a default of NULL. object_name - is the name of the object. object_name is sysname, with a default of NULL. object_owner - is the object owner. object_owner is sysname, with a default of NULL. This is the example of dropping the titleauthor table from the pubs database. USE pubs GO DECLARE @object_id int SELECT @object_id = object_id('titleauthor') EXEC sp_MSdrop_object @object_id GO thnx... |
| |||
| Hi, sp_gettypestring This stored procedure returns the type of string for the given table id and column id. Syntax sp_gettypestring tabid, colid, typestring where tabid - is the table id. tabid is int. colid - is the column id. colid is int. typestring - is the type string. It's an output parameter. typestring is nvarchar(255) This is the example to get the type string for the column number 2 in the authors table, from the pubs database. USE pubs GO DECLARE @tabid int, @typestring nvarchar(255) SELECT @tabid = object_id('authors') EXEC sp_gettypestring @tabid, 2, @typestring output SELECT @typestring GO Here is the result set from my machine: ------------------------------- varchar(40) thnx... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Performance Tuning Tips About Sql Server Stored Procedures | vadivelanshanmugam | Database Support | 0 | 02-04-2008 06:16 AM |
| Performance Tuning Tips About Sql Server Stored Procedures | vadivelanshanmugam | Database Support | 0 | 02-04-2008 06:14 AM |
| Some Performance tuning tips about SQL Server Stored Procedures | vadivelanshanmugam | Database Support | 0 | 02-04-2008 06:12 AM |
| SQL Server Undocumented Stored Procedures | a.deeban | Database Support | 2 | 12-23-2007 11:20 PM |
| Executing SQL Server Stored Procedures With PHP - Executing stored procedures | Jeyaseelansarc | PHP Programming | 1 | 07-19-2007 12:23 AM |