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 - 2005 - Restore Database Using Corrupt Datafiles (.mdf and .ldf) - Part 2

SQL SERVER – 2005 – Restore Database Using Corrupt Datafiles (.mdf and .ldf) – Part 2

April 10, 2008
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Function, SQL Scripts

A last resort for corrupt datafiles with no backup: emergency mode, single user, then DBCC CHECKDB with repair_allow_data_loss. Back up the files first.

Read More
SQL SERVER - 2005 - Transferring Ownership of a Schema to a User

SQL SERVER – 2005 – Transferring Ownership of a Schema to a User

April 5, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Transferring ownership of a schema to another user in SQL Server 2005 takes one ALTER AUTHORIZATION ON SCHEMA statement. A reader asked, so here it is.

Read More
A stepped podium of coin stacks, with three people sharing the top step.

SQL SERVER – Find Nth Highest Salary of Employee – Query to Retrieve the Nth Maximum value

April 2, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

How do you find the Nth Highest Salary of an employee? I link my earlier answers and share reader Pravin Phatangare’s simple TOP query for the 6th highest salary.

Read More
Gouache painting: in a rehearsal room, a vermilion rug strip marks the center

DATEPART tzoffset: Read the Signed Offset in Minutes

March 31, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server

DATEPART tzoffset extracts an offset in minutes. Preserve its sign, test sub-hour values and retain the source temporal type.

Read More
Gouache painting: beside it, the same ring hovers above an empty saucer and closes on nothing, so no match is made

Simple CASE and NULL: Use a Searched Condition

March 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

Simple CASE and NULL do not match through equality. Use a searched IS NULL branch, preserve empty text, and make the result type explicit.

Read More
SQL SERVER - 2005 - Retrieve Any User Defined Object Details Using sys objects Database

SQL SERVER – 2005 – Retrieve Any User Defined Object Details Using sys objects Database

March 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL System Table, SQL Utility

The sys.objects catalog view has a row for every schema-scoped object, so you can retrieve any user defined object details, like foreign keys, by object type.

Read More
SQL SERVER - 2005 - What is CLR?

SQL SERVER – 2005 – What is CLR?

March 14, 2008
Pinal Dave
SQL Tips and Tricks
CLR, SQL Function, SQL Server, SQL Utility

CLR is the Common Language Runtime. A diagram of its architecture, and why CLR stored procedures in C# help with the loops and recursion that slow down T-SQL.

Read More
Previous 1 … 70 71 72 73 74 75 76 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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