SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds Follow SQL Server Performance on Twitter


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
SQL Azure
Developer
General DBA
PowerShell
Windows Server
ASP.NET / ADO.NET
SQL Azure

USEFUL SITES :

ASP.NET Tutorials
Windows and SQL Azure Tutorials
Cloud Hosting Magazine
SharePoint Tutorials
Windows Server Help

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Create a Performance Baseline Repository
Visual Studio LightSwitch Tutorial
Manage Database Projects With Visual Studio 2010
Auditing with Microsoft Assessment and Planning (MAP) Toolkit 5.0 - ...

More     
 
Latest FAQ's

SQL Agent job getting suspended.
Queries which include DMFs return a syntax error ...
Could not find stored procedure 'dbo.sp_MSins_dboTest'
How to change server name when replication is enabled.

More     
   
Latest Software Reviews

Confio Ignite PI 8 E studio De Un Caso
dbForge Review
Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...

More     

articles >> general dba >> SQL Server 2000 Undocumented Stored Procedures ...

SQL Server 2000 Undocumented Stored Procedures

By : Alexander Chigrik
May 01, 2003



In this article, I want to tell you about some useful undocumented stored procedures shipped with SQL Server 2000.



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]




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




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)

 

Ask A Question In the Forums

    Next Page>>    












C# Help and Tutorials | PHP MySQL Tutorial | Sharepoint Tutorial | Azure Tutorial | Cloud Hosting Magazine | ASP.NET Tutorials | ASP.NET Hosting | Windows Server Hosting | Windows Server Help | Windows Phone Pro | Silverlight Ace | LightSwitch Tutorial | Visual Studio Tutorials | Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Sonasoft | Andy Khanna | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 2010 Jude O'Kelly. All rights reserved