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
SQL SERVER - Script to Determine Which Version of SQL Server 2000-2005 is Running

SQL SERVER – Script to Determine Which Version of SQL Server 2000-2005 is Running

March 7, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A quick way to see which version of SQL Server 2000 or 2005 is running: SERVERPROPERTY returns the product version, the product level and the edition.

Read More
SQL SERVER - QUOTED_IDENTIFIER ON/OFF and ANSI_NULL ON/OFF Explanation

SQL SERVER – QUOTED_IDENTIFIER ON/OFF and ANSI_NULL ON/OFF Explanation

March 5, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts

What do SET QUOTED_IDENTIFIER and SET ANSI_NULLS do around every stored procedure you create? A plain explanation of both settings, ON and OFF.

Read More
Five prints pegged on a washing line, four fading away and one kept.

SQL SERVER – Delete Duplicate Records – Rows

March 1, 2007
Pinal Dave
SQL Tips and Tricks
Duplicate Records, SQL Scripts

A short query to delete duplicate records from a table with an identity column: keep the MAX(ID) in each group of duplicate columns and remove the rest.

Read More
Two rows of blue and pale ceramic beads on wooden guides, with one terracotta bead.

WINDOW: Reuse an Explicit Running-Total Frame

February 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

WINDOW lets me name a window definition and reuse it across compatible calculations. I still specify the partition, ordering and frame. A short name should make the intended calculation easier to review.

Read More
SQL SERVER - What is New in SQL Server Agent for Microsoft SQL Server 2005

SQL SERVER – What is New in SQL Server Agent for Microsoft SQL Server 2005

February 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Download, SQL Error Messages, SQL Server Agent, SQL Utility

A TechNet article I liked on what’s new in SQL Server Agent for SQL Server 2005: security, proxy accounts, shared schedules, WMI alerts and Database Mail.

Read More
Gouache painting of a rebuilt sage green birdhouse beside an open box of neatly cut matching pieces with one red door piece

Restore Database Backup Using T-SQL, Step by Step

February 25, 2007
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Error Messages, SQL Scripts

To restore database backup files safely, read the backup first, then restore under a name and paths you choose. This post builds a small demo database, backs it up, and restores it with MOVE and REPLACE. It also explains the errors that stop most restores.

Read More
Hands placing a leaking tap assembly on a cloth at a shop counter, its worn washer and screw laid out in a row

How to Ask a SQL Server Question That Gets Answered

February 24, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Developer, SQL Error Messages, SQL Server

A SQL Server question that gets answered includes the exact build, full error text, a small repro, and the fixes already tried.

Read More
Gouache painting: two rows of four hay bales stand in an orchard

TRANSLATE: Map Characters Simultaneously Instead of Cascading Replacements

February 24, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

TRANSLATE maps each input character once, which matters when replacement characters also appear in the search list. Nested REPLACE calls can process earlier replacements again. I compare both results before choosing a cleanup expression.

Read More
Cream and slate twine balls occupy two wicker baskets, a third stays empty, and a shared tray holds both colors

Showing Comma-Separated Role Members for Every Database Role

February 20, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL Server Security

Comma-separated role members make direct assignments easier to review. The queries retain empty roles and label public membership as implicit. Keep the underlying rows because nested roles and directory groups need a separate effective-access review.

Read More
SQL SERVER - FIX : Error 15023: User already exists in current database.

SQL SERVER – FIX : Error 15023: User already exists in current database.

February 15, 2007
Pinal Dave
SQL Performance
DBA, SQL Cursor, SQL Download, SQL Error Messages, SQL Joins, SQL Scripts, SQL Server DBCC, SQL Server Security, SQL Stored Procedure

Error 15023: User already exists in current database. I fix it with sp_change_users_login, using Report, Auto_Fix or Update_One to link the user to a login.

Read More
Previous 1 … 585 586 587 588 589 590 Next
  • Books
  • Testimonials
  • Privacy Policy

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