|
Meta Data User-Defined Functions
|
Total Hit (2688) |
Introduction
Meta Data UDFs
COL_LENGTH2
COL_ID
INDEX_ID
INDEX_COL2
ROW_COUNT
--------------------------------------------------------------------------------
Introduction
I would like to write the series of articles about useful User-Defined Functions grouped by the following
....Read More |
Rating
|
|
|
|
|
|
|
Displaying random data from SQL table
|
Total Hit (2877) |
Following query will display any 5 random rows from Products table of Northwind database
NewId() function genereates New GUID.......Try this code it works fine
«Code LangId=6»
select top 5 * from products order by NewId() «/Code»
|
Rating
|
|
|
|
|
Copy text or image into or out of SQL Server
|
Total Hit (7491) |
In this article, I want to show, how you can copy a single text or image value into or out of SQL Server by using the textcopy.exe utility. You can find this utility in the directory containing the standard SQL Server EXE files (C:\Mssql\Binn for SQL Server 6.5, by default and C:\Mssql7\Binn for SQL
....Read More |
Rating
|
|
|
|
|
|
|
|
|
|
|
|
Change Object Owner
|
Total Hit (3475) |
This is very handy stored procedure which I use all time to change object owner. Many times you create object as a different user other than "dbo" and things start breaking. I use this sp to change owner off all objects to "dbo".
«code LangId=6»/*
This stored procedure can be used to run through
....Read More |
Rating
|
|
|
|
|
|
|
Some Useful Undocumented SQL Server 7.0 and 2000 DBCC Commands
|
Total Hit (2972) |
In this article, I want to tell you about some useful undocumented DBCC commands, and how you can use these commands in SQL Server 7.0 and 2000 for administering and monitoring.
DBCC is an abbreviation for Database Console Command. DBCC commands are generally used to check the physical and logica
....Read More |
Rating
|
|
|
Working with COM objects from within T-SQL
|
Total Hit (4740) |
This article includes
- Introduction
- General concepts
- OLE Automation Stored Procedures
«OL»«LI»sp_OACreate
«LI»sp_OADestroy
«LI»sp_OAGetProperty
«LI»sp_OASetProperty
«LI»sp_OAMethod
«LI»sp_OAGetErrorInfo
«LI»sp_OAStop«/OL»
- Example: generate script
- Literature
------
....Read More |
Rating
|
|
|
OLE Automation in SQL server
|
Total Hit (3685) |
This is an example of a Transact-SQL statement batch that uses the OLE Automation stored procedures to create and use an SQL-DMO SQLServer object. Portions of the code are used as examples in the stored procedure references.
DECLARE @object int
DECLARE @hr int
DECLARE @property varchar(255)
DE
....Read More |
Rating
|
|
|
Index Optimization Tips
|
Total Hit (3056) |
«B»General concepts«/B»
In this article, I want to show how you can improve the speed of your queries by choosing the proper indexes, what kinds of indexes MS SQL supports and what is the advantage and disadvantage of using indexes in particular situation.
There are clustered and nonclustere
....Read More |
Rating
|
|
|
Useful undocumented extended stored procedures
|
Total Hit (3230) |
An extended stored procedure (xp) is a dynamic link library that runs directly in the address space of SQL Server and is programmed using the SQL Server Open Data Services API. You can run extended stored procedures from the Query Analyzer, for example, just as you would normal stored procedures. Ex
....Read More |
Rating
|
|
|
SQL Server 2000 useful undocumented stored procedures
|
Total Hit (3996) |
In this article, I want to tell you about some useful undocumented stored procedures shipped with SQL Server 2000.
«B»sp_MSget_qualified_name«/B»
The sp_MSget_qualified_name stored procedure is used to get the qualified name for the given object id.
Syntax
sp_MSget_qualified_name objec
....Read More |
Rating
|
|
|