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 small wooden footbridge over a quiet stream, with one plank missing in the middle and a vermilion rope tied across the gap

Cluster Remote Access Rule Failed During SQL Server Cluster Setup

January 16, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server Cluster, SQL Server Installation, SQL Setup

The Cluster Remote Access rule failed while I installed a SQL Server failover clustered instance. Detail.txt showed setup could not reach a remote node. I checked the usual causes, then skipped the rule from the command line, and the install finished.

Read More
A brass balance scale on a counter with two different sets of weights beside it, only one set matching the pans.

SQL SERVER – FIX: Number Data Type from Oracle Linked Sever Shown in Scientific Notation

January 15, 2018
Pinal Dave
SQL Tips and Tricks
Linked Server, Oracle, SQL Datatype, SQL Error Messages, SQL Server

A client saw numbers from an Oracle linked server shown in scientific notation in SQL Server. Here is the query that shows the issue and how to fix it.

Read More
Each of three trays displays its two tallest stones ahead of shorter stones

How to Get Top N Records Per Group? – Ranking Function – Interview Question of the Week #156

January 14, 2018
Pinal Dave
SQL Interview Questions and Answers
Ranking Functions, SQL Function, SQL Scripts, SQL Server

I gave 40 candidates this puzzle: get the top N records per group from a student marks table. Here is the simple answer using a Ranking Function.

Read More
Image showing SQL Server results for NOEXEC command.

SQL SERVER – What Does SET NOEXEC Do?

January 13, 2018
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server Configuration

What does SET NOEXEC do? With SET NOEXEC ON, SQL Server compiles your query but does not run it. Here is how the compile and execute phases work.

Read More
Gouache painting of a wooden pigeonhole cabinet filled with blocks except one slot, with a vermilion block waiting beside it

Change Column From NULL to NOT NULL in SQL Server

January 12, 2018
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Datatype, SQL NULL, SQL Scripts

To change a column from NULL to NOT NULL, first fill every NULL value, then run ALTER COLUMN with the full data type and NOT NULL. This post shows the Msg 515 error you get otherwise, how to choose the replacement value, and the trap that makes a column nullable again. It ends with a default constraint that keeps new rows valid.

Read More
A brass umbrella stand of identical cream umbrellas, one marked only by a small red tassel.

The sp_ Prefix: Finding Stored Procedures Named the Risky Way

January 11, 2018
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Coding Standards, SQL Server, SQL Stored Procedure

Find user procedures with the sp_ prefix across databases, understand the lookup risk, and move callers through a synonym safely.

Read More
A sheet of paper on a cutting board with its ragged edges being squared off by a steel rule.

SQL SERVER – 2017 – How to Remove Leading and Trailing Spaces with TRIM Function?

January 10, 2018
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

TRIM finally arrived in SQL Server 2017. Here is how to remove leading and trailing spaces with the new TRIM function, in a few simple words.

Read More
Previous 1 … 233 234 235 236 237 238 239 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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