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
EXEC sp_who2.

SQL SERVER – 5061: FIX Error: ALTER DATABASE failed because a lock could not be placed on database ‘Database Name’. Try again later.

November 27, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Monitoring, SQL Scripts, SQL Server

Trying to take a test database offline, we hit Msg 5061: ALTER DATABASE failed because a lock could not be placed on database. Here is how to fix it.

Read More
errorole

SQL SERVER – OLE DB Provider ‘Microsoft.ACE.OLEDB.12.0’ for Linked Server ‘(null)’ Returned Message ‘Unspecified Error’

November 26, 2018
Pinal Dave
SQL Tips and Tricks
Excel, Linked Server, SQL Error Messages, SQL Scripts, SQL Server

Reading Excel through OPENROWSET failed: the OLE DB provider for linked server (null) returned message ‘Unspecified error’. Here is how I fixed it.

Read More
A common watering pipe feeds three matching plant pots together

How to Grow All Files in a File Group Equally? – TRACE FLAG 1117 – Interview Question of the Week #201

November 25, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL Data Storage, SQL Scripts, SQL Server, SQL TempDB, TraceFlags

How do you grow all files in a file group equally? The answer is Trace Flag 1117, plus the AutoGrow option that SQL Server 2016 brought for filegroups.

Read More
An old fireplace buried in years of gray ash, a small shovel and an empty red ash bucket beside it

SQL SERVER – Huge Size of SSISDB – Catalog Database SSISDB Cleanup Script

November 24, 2018
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server Encryption, SSIS

SSISDB grew huge on a client’s server. Here is my cleanup script for the SSISDB catalog database, and why I avoid scripts that modify system objects.

Read More
Gouache painting of dents in snow and boot prints leading away to a vermilion sled

Schema Changes History Report: See Who Dropped a Table

November 23, 2018
Pinal Dave
SQL Tips and Tricks
Schema, SQL Reports, SQL Scripts, SQL Server Security

The Schema Changes History report shows who created, altered or dropped a table. This post reads the same default trace with T-SQL, tests it on a table and a database drop, and explains the limits: file rollover and shared logins. It ends with ways to keep the history longer.

Read More
Gouache painting of a slate blue jug on a small wooden pouring stand pouring glaze into a vermilion jar

Dynamic SQL Result Into a Variable with sp_executesql

November 20, 2018
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Scripts, SQL Stored Procedure, SQL Variable

To get a dynamic SQL result into a variable, use sp_executesql with an OUTPUT parameter. This post tests the pattern on a small demo, explains Msg 214 and shows counts, JSON, new identity values and generic table names. It also covers INSERT with EXEC for result sets.

Read More
Logical and Physical Names of Files in SQL Server Database.

SQL SERVER – Get List of the Logical and Physical Name of the Files in the Entire Database

November 19, 2018
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, System Database

During a Health Check we needed the logical and physical name of every file in every database on the instance. Here is the script I built, with the file type too.

Read More
Previous 1 … 85 86 87 88 89 90 91 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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