Favorite Scripts

SQL SERVER – Server Side Paging in SQL Server Denali – A Better Alternative
SQL SEVER – Finding Memory Pressure – External and Internal
SQL SERVER – Quickest Way to Identify Blocking Query and Resolution – Dirty Solution
SQL SERVER – Index Levels and Delete Operations – Page Level Observation
SQL SERVER – SHRINKDATABASE For Every Database in the SQL Server

SQL SERVER – SELECT * FROM dual – Dual Equivalent
SQL SERVER – Index Levels, Page Count, Record Count and DMV - sys.dm_db_index_physical_stats
SQL SERVER – Data Pages in Buffer Pool – Data Stored in Memory Cache
SQL SERVER – Precision of SMALLDATETIME – A 1 Minute Precision
SQL SERVER – Find Most Expensive Queries Using DMV
SQL SERVER – Get Latest SQL Query for Sessions – DMV
SQL SERVER – SHRINKFILE and TRUNCATE Log File in SQL Server 2008
SQL SERVER – 2008 – Introduction to Snapshot Database – Restore From Snapshot

SQL SERVER – Introduction to Extended Events – Finding Long Running Queries
SQL SERVER – Data and Page Compressions – Data Storage and IO Improvement
SQL SERVER – INSERT TOP (N) INTO Table – Using Top with INSERT
SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)
SQL SERVER – Plan Recompilation and Reduce Recompilation – Performance Tuning
SQL SERVER – Get the List of Object Dependencies – sp_depends and information_schema.routines and sys.dm_sql_referencing_entities
SQL SERVER – Difference Temp Table and Table Variable – Effect of Transaction
SQL SERVER – Difference TempTable and Table Variable – TempTable in Memory a Myth
SQL SERVER – Understanding Table Hints with Examples
SQL SERVER – Stored Procedure are Compiled on First Run – SP taking Longer to Run First Time
SQL SERVER – How to Enable Index – How to Disable Index – Incorrect syntax near ‘ENABLE’
SQL SERVER – Outer Join in Indexed View – Question to Readers
SQL SERVER – Insert Values of Stored Procedure in Table – Use Table Valued Function
SQL SERVER – Intorduction to Service Broker and Sample Script
SQL SERVER – Mirrored Backup and Restore and Split File Backup
SQL SERVER – Difference between Line Feed (\n) and Carriage Return (\r) – T-SQL New Line Char
SQL SERVER – 2005 – 2008 – Delete Duplicate Rows
SQL SERVER – 2008 – Optimize for Ad hoc Workloads – Advance Performance Optimization
SQL SERVER – Simple Example of Reading XML File Using T-SQL
SQL SERVER – Simple Example of Creating XML File Using T-SQL

SQL SERVER – Quickest Way to – Kill All Threads – Kill All User Session – Kill All Processes
SQL SERVER – 2008 – 2005 – Rebuild Every Index of All Tables of Database – Rebuild Index with FillFactor
SQL SERVER – 2008 – 2005 – Find Longest Running Query – TSQL – Part 2
SQL SERVER – Find Currently Running Query – T-SQL
SQL SERVER – How to Rename a Column Name or Table Name
SQL SERVER – UDF – Function to Convert Text String to Title Case – Proper Case – Part 2
SQL SERVER – Get Date Time in Any Format – UDF – User Defined Functions
SQL SERVER – 2000 – SQL SERVER – Delete Duplicate Records – Rows – Readers Contribution
SQL SERVER – Find Nth Highest Salary of Employee – Query to Retrieve the Nth Maximum value
SQL SERVER – 2005 – Find Nth Highest Record from Database Table – Using Ranking Function ROW_NUMBER
SQL SERVER – 2005 – A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold
SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL
SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server
SQL SERVER – Three T-SQL Script to Create Primary Keys on Table
SQL SERVER – 2005 – Search Stored Procedure Code – Search Stored Procedure Text
SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLE
SQL SERVER – Count Duplicate Records – Rows
SQL SERVER – 2005 – List All Stored Procedure Modified in Last N Days
SQL SERVER – 2005 – UDF – User Defined Function to Strip HTML – Parse HTML – No Regular Expression
SQL SERVER – Retrieve – Select Only Date Part From DateTime – Best Practice
SQL SERVER – Insert Multiple Records Using One Insert Statement – Use of UNION ALL
SQL SERVER – Query to Find First and Last Day of Current Month
SQL SERVER – UDF – Function to Convert List to Table
SQL SERVER – Creating Comma Separate Values List from Table – UDF – SP
SQL SERVER – Random Number Generator Script – SQL Query
SQL SERVER – TRIM() Function – UDF TRIM()
SQL SERVER – Fix : Error : 40 – could not open a connection to SQL server.
SQL SERVER – UDF – User Defined Function to Extract Only Numbers From String
SQL SERVER – Query to find number Rows, Columns, ByteSize for each table in the current database – Find Biggest Table in Database

Comments are closed.