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
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
Six unmarked beads sit in fitted recesses beside a separate closed storage box.

SQL SERVER – Generating Fixed Width OTP Values with Cryptographic Randomness

August 22, 2018
Pinal Dave
SQL Tips and Tricks
SQL Password, SQL Random, SQL Scripts, SQL Server

A Random Function for a six-digit code needs suitable randomness and deliberate formatting. A reader wanted codes for new app registrations.

Read More
A tractor at a field gate with an empty seat, a hand reaching up for its red steering wheel

SQL SERVER – FIX: Error – The Job Failed. Unable to Determine If The Owner Domain\User of Job Job_Name Has Server Access

August 20, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Server Security

A SQL Agent job failed with: The job failed. Unable to determine if the owner of the job has server access. Here is how I fixed this error in my lab.

Read More
Previous 1 … 92 93 94 95 96 97 98 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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