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
Two different sealed jars travel together in a wooden crate between stone shelves

How to Move SQL Server MDF and LDF Files? – Interview Question of the Week #189

September 2, 2018
Pinal Dave
SQL Interview Questions and Answers
File format, SQL Scripts, SQL Server

How do you move SQL Server MDF and LDF files? Detach and attach is the old way, so here is the step-by-step method I use for my clients today.

Read More
Gouache painting of a row of wooden crates with one repainted in vermilion and a brush on its rim

Rename Physical File Name of a SQL Server Database

September 1, 2018
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Scripts, SQL Server Configuration

To rename physical file name entries for a SQL Server database, take it offline, change the catalog with MODIFY FILE, rename the files in Windows and bring the database online. This post builds a demo, shows the error a missing file causes, and gives a way to undo the change.

Read More
Gouache painting of a row of teacups with cream ribbons and one cup with a vermilion ribbon

Rename Logical File Name of a SQL Server Database

August 31, 2018
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Scripts

To rename logical file name entries in SQL Server, use ALTER DATABASE with MODIFY FILE and NEWNAME. This post builds a demo database, renames both files and checks the result. It also covers names with dots and the two errors that stop a rename.

Read More
User defined function to extract only numbers from string.

SQL SERVER – UDF – User Defined Function to Extract Only Numbers From String – Number Table Method

August 30, 2018
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

I rewrote my User Defined Function to extract only numbers from a string. The new one uses a numbers table, also called a Tally table, instead of a WHILE loop.

Read More
Database CheckCompletion error.

SQL SERVER – Unable to Attach Database Files – The PageAudit Property is Incorrect – Ransomware Attack

August 29, 2018
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL Error Messages, SQL Log, SQL Scripts, SQL Server, SQL Server Security

After a ransomware attack, a client could not attach database files and saw: The PageAudit property is incorrect. Here is what the error means.

Read More
Wood shavings are inspected beside the joinery work that produced them.

SQL SERVER- High CPU and Transaction Type WorkFileGroup_fake_worktable and Workfile

August 28, 2018
Pinal Dave
SQL Performance
SQL Error Messages, SQL Operator, SQL Performance, SQL Scripts, SQL Server, SQL TempDB

Workfile and WorkFileGroup_fake_worktable were clues in a customer high-CPU investigation. I correlated them with queries and plan evidence.

Read More
A crowbar lifting a cracked paving slab from a garden path, a new slab leaning on a red bucket

SQL SERVER – How to DROP or DELETE Suspect Database?

August 27, 2018
Pinal Dave
SQL Tips and Tricks
Database Corruption, SQL Error Messages, SQL Server

A client’s production database was stuck in suspect state and they could not even drop it. Here is how I helped them drop the suspect database.

Read More
Previous 1 … 200 201 202 203 204 205 206 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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