What is xp_cmdshell used for, and how do you run a batch file using T-SQL? Examples run a system command, a plain BAT file and one with a parameter.
SQL SERVER – 2005 List All Tables of Database
The simple way to list all tables of a database in SQL Server 2005: select from sys.tables to get every table that users have created.
SQL SERVER – Explanation and Example Four Part Name
What is a four part name in SQL Server? It is ServerName.DatabaseName.DatabaseOwner.TableName, for example localhost.AdventureWorks.Person.Contact.
SQL SERVER – Repeate String N Times Using String Function REPLICATE
REPLICATE repeats a string N times. I found this T-SQL string function while searching for replication, and it is handy when you need repeated text.
Memory Grants: Why a Query Waits for Memory
Memory grants can leave SQL Server queries waiting on RESOURCE_SEMAPHORE; inspect estimates, grants, and spills before adding memory.
SQL SERVER – Comparison Index Fragmentation, Index De-Fragmentation, Index Rebuild – SQL SERVER 2000 and SQL SERVER 2005
What is Index Fragmentation and how do page splits cause it? How to measure it with DBCC SHOWCONTIG in SQL Server 2000 and sys.dm_db_index_physical_stats in 2005.
SQL SERVER – 2005 Row Overflow Data Explanation
Is 8060 bytes per row still the limit in SQL Server 2005? Yes, but varchar, nvarchar, varbinary, sql_variant and CLR types are excluded. That is row overflow data.







