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
A wooden bee hotel of hollow tubes on a garden wall, each tube sealed separately, one bee landing at its own.

A Multi-Tenant Schema With a TenantId Column: Keys, Indexes and Safety

October 16, 2012
Pinal Dave
SQL Tips and Tricks
Schema, SQL Constraint and Keys, SQL Index, SQL Server, SQL Server Security

Design a multi-tenant schema with composite keys, tenant-first indexes, trusted session context, and row-level security checks.

Read More
An empty jaw harp frame beside its removed tongue and a complete instrument

Backing Up msdb: Jobs, History and Mail Live There

October 15, 2012
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Server, SQL Server Agent

Your user databases come back, but the jobs and mail setup do not. A short demo of what lives in msdb and how to protect it.

Read More
SQL SERVER - Find First Non-Numeric Character from String

SQL SERVER – Find First Non-Numeric Character from String

October 14, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

No built-in function finds the first non-numeric character in a string, so I use PATINDEX. Here is a quick script with sample data you can try.

Read More
SQL SERVER - 2012 - List All The Column With Specific Data Types in Database

SQL SERVER – 2012 – List All The Column With Specific Data Types in Database

October 13, 2012
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL System Table

An updated SQL Server 2012 script to list every column with specific data types in a database, including user data types, schema and table names.

Read More
Hands squaring a neat stack of plain envelopes beside a messy pile, a red rubber band around the tidy stack

Cleaning Address Data in T-SQL: Trimming, Casing and Standardizing

October 12, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

Start cleaning address data with preserved originals, normalized spaces, careful casing, street-word mappings, and postal-code review flags.

Read More
A corridor wall half repainted, a roller resting midway

Rolling Out Database Changes Gradually

October 11, 2012
Pinal Dave
SQL Tips and Tricks
DevOps, Schema, Software Development, SQL Server

Roll out database changes gradually with expand-and-contract steps, feature flags, data checks, and a rollback path for each stage.

Read More
Gouache painting of three neat crates of pears beside a loose heap of peaches on a red cloth

Count Rows and Indexes for Every Table in SQL Server

October 10, 2012
Pinal Dave
SQL Performance
Clustered Index, SQL Heap, SQL Index, SQL Scripts

To count rows and indexes for every table, one query on the catalog views answers four questions at once: how many tables, which are heaps, how many nonclustered indexes each has, and how many rows each holds. The post tests it on a demo database and explains where the row count comes from.

Read More
SQL SERVER - Identify Numbers of Non Clustered Index on Tables for Entire Database

SQL SERVER – Identify Numbers of Non Clustered Index on Tables for Entire Database

October 9, 2012
Pinal Dave
SQL Tips and Tricks
SQL Index

Here is a script that counts each non clustered index on tables across the entire database, and the small story of why I wrote it.

Read More
SQLAuthority News - A Conversation with an Old Friend - Sri Sridharan

SQLAuthority News – A Conversation with an Old Friend – Sri Sridharan

October 9, 2012
Pinal Dave
SQLAuthority News
Database, DBA, SQL PASS

My GTalk chat with old friend Sri Sridharan on why he is running for the PASS Board of Directors again after coming so close last year.

Read More
SQL SERVER - Recover the Accidentally Renamed Table

SQL SERVER – Recover the Accidentally Renamed Table

October 8, 2012
Pinal Dave
SQL Puzzle

There is no undo for an accidentally renamed table in SSMS, sadly. Here are a few things you can check to find clues about what the original name was.

Read More
Previous 1 … 362 363 364 365 366 367 368 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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