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 screwdriver with a red bit in its handle beside an open case of spare bits.

SQLCMD Mode in SSMS: Variables, :CONNECT and :r Includes

January 12, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server Management Studio, sqlcmd

Use SQLCMD mode in SSMS for server and database variables, :CONNECT, :r include files, and an error-stop release script.

Read More
A row of small snowmen along a snowy path, each wearing the same red scarf

Running a Command in Every Database Without sp_MSforeachdb

January 5, 2013
Pinal Dave
SQL Tips and Tricks
DBA, Dynamic SQL, SQL Scripts, SQL Server

Run a checked command in every database with a FAST_FORWARD cursor, AG role filter, QUOTENAME, and per-database error log.

Read More
Gouache painting: two wooden ladders leaning on one orchard wall, a short one beside a tall one with identical lower rungs, one vermilion rung on the short ladder

Redundant Indexes: Index on Col1, Col2 vs Col1, Col2, Col3

January 4, 2013
Pinal Dave
SQL Performance
Execution Plan, SQL DMV, SQL Index, SQL Scripts

Redundant indexes cost space and slow every write, but not every one can go. This post measures an index on Col1, Col2 next to an index on Col1, Col2, Col3 on SQL Server 2025: size, plan, reads and log bytes. It ends with a safe way to remove one.

Read More
Word wrap settings in SQL Server Management Studio.

SQL SERVER – Wrap SQL Code in SSMS – SQL in Sixty Seconds #038 – Video

January 2, 2013
Pinal Dave
SQL Video
Database, SQL in Sixty Seconds, SQL Scripts, SQL Server Management Studio

Horizontal scrolling makes code hard to read. In this SQL in Sixty Seconds video I show how to wrap SQL code in SSMS without changing anyone’s formatting.

Read More
SQL SERVER - Creating Database with Different Collation on Server

SQL SERVER – Creating Database with Different Collation on Server

December 27, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server

A client ran two instances on every server just for case sensitivity. Here is how to create a database with a different collation on the same server instead.

Read More
Gouache painting of a finished blue vase beside an identical twin packed safely in a crate with red cloth

Take a Database Backup in SSMS: Step by Step

December 26, 2012
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Scripts, SQL Server Management Studio

To take a database backup in SSMS, right-click the database, choose Tasks, then Back Up, and pick the backup type. This post walks through the dialog, shows the T-SQL that does the same work, explains the log backup error people meet first, and checks the files afterwards.

Read More
A combined glass-cutting tool beside separate scoring and breaking tools

MERGE Performance for Large Upserts: UPDATE Then INSERT Instead

December 21, 2012
Pinal Dave
SQL Performance
SQL Performance, SQL Scripts, SQL Server

Is MERGE really slow, or did the rewrite just run on a quiet night? Here is a fair test you can run yourself.

Read More
Previous 1 … 195 196 197 198 199 200 201 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

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