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 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
A diagnostic cabinet preserves empty molds while the finished vessels remain in the source cabinet.

SQL SERVER – CLONEDATABASE: Generate Statistics and Schema Only Copy of the Database

December 20, 2016
Pinal Dave
SQL Performance
Schema, SQL Scripts, SQL Server, SQL Server 2016, SQL Statistics

CLONEDATABASE can Generate Statistics and schema-only diagnostic copies without copying table rows. I use that distinction when investigating optimizer behavior.

Read More
The cut end of a log showing clear growth rings, a vermilion pin marking the outermost ring.

Putting a Database Under Source Control

September 15, 2015
Pinal Dave
SQL Tips and Tricks
DevOps, Schema, SQL Documentation, SQL Scripts, SQL Server

Putting a database under source control starts with state or migration scripts, consistent object files, and a reviewable first commit.

Read More
A shared air manifold accepts an additional hose while a separate capped coupling stays isolated

A Custom db_executor Role for Stored Procedure Access

April 28, 2015
Pinal Dave
SQL Tips and Tricks
Schema, SQL Server Security, SQL Stored Procedure

The app gets a permission error while it works for you as a sysadmin. Here is how a db_executor role fixes it without opening everything.

Read More
A slipcover that stops short on a lengthened sofa, the new red seat left bare

Stale Views: Why SELECT * Breaks After ALTER TABLE

September 5, 2014
Pinal Dave
SQL Tips and Tricks
Schema, SQL Coding Standards, SQL Server, SQL View

Reproduce stale views after SELECT star and ALTER TABLE, find candidate definitions, refresh with sp_refreshview, and prevent the pattern.

Read More
Nested wooden boxes open one inside another, a red ring in the smallest

The SQL Server Permission Hierarchy

July 5, 2014
Pinal Dave
SQL Tips and Tricks
DBA, Schema, SQL Login, SQL Server Security

Understand the SQL Server permission hierarchy from server to database, schema, and object, including GRANT, DENY, and role paths.

Read More
Two lakeside cabins built from one plan, one with an added porch and a missing window, one red door

Comparing Two Schemas With sys.columns and a FULL OUTER JOIN

June 16, 2014
Pinal Dave
SQL Tips and Tricks
Schema, SQL Joins, SQL Scripts, SQL System Table

Use read-only queries for comparing two schemas, finding missing columns, checking type details, and reviewing indexes and modules.

Read More
Previous 1 2 3 4 5 Next
  • Books
  • Testimonials
  • Privacy Policy

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