This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A row of wooden crates of different sizes with one towering over the rest, being measured with a tape.

SQL SERVER – Query to find number Rows, Columns, ByteSize for each table in the current database – Find Biggest Table in Database

January 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

A query to find the biggest table in database: it lists row count, column count and data size for each table using sp_spaceused, sorted by data size.

Read More
SQL SERVER - Simple Example of Cursor

SQL SERVER – Simple Example of Cursor

January 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts

The simple example of cursor I have used for years: declare it, open it, fetch each Account_ID in a WHILE loop, then close and deallocate the cursor.

Read More
A barrel marked LOG overflowing with paper, and a person hesitating at the tap.

SQL SERVER – Shrinking Truncate Log File – Log Full

December 30, 2006
Pinal Dave
SQL Performance
SQL Backup and Restore, SQL Scripts, Transaction Log

The old code I used to truncate log file space with DBCC SHRINKFILE and BACKUP LOG WITH TRUNCATE_ONLY. It breaks the log chain, so take a full backup after.

Read More
SQL SERVER - Fix : Error 14274: Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server. The job was not saved.

SQL SERVER – Fix : Error 14274: Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server. The job was not saved.

December 20, 2006
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Stored Procedure

Error 14274 shows up when you update or delete SQL Server 2000 jobs after the Windows server was renamed. Here is why it happens and the steps to fix it.

Read More
Red threads running from a pin in a small table out to cards pinned around it, with a magnifying glass over one thread.

SQL SERVER – Find Stored Procedure Related to Table in Database – Search in All Stored Procedure

December 10, 2006
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, SQL Utility

Two quick queries on syscomments to find every stored procedure related to table names you search for, since sp_help and sp_depends are not always accurate.

Read More
SQL SERVER - Cursor to Kill All Process in Database

SQL SERVER – Cursor to Kill All Process in Database

December 1, 2006
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts, SQL Stored Procedure

A simple cursor to kill all process connections in one database. It reads sp_who into a temp table and runs KILL for each spid. Run it from another database.

Read More
Card file of index cards, going through records one at a time like a cursor

SQL SERVER – Simple Cursor to Select Tables in Database with Static Prefix and Date Created

November 30, 2006
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL DateTime, SQL Scripts, SQL Server, SQL Stored Procedure

A simple cursor to select tables in a database by a static prefix like b_ or delete_ and by date created, so you can drop, print or index old tables.

Read More
Previous 1 … 332 333 334 335 336 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com