Articles

External Article

Set-based Constraint Violation Reporting in SQL Server

When you're importing data into an RDBMS in bulk and an exception condition is raised because of a constraint violation, you generally need to fix the problem with the data and try again. The error won't tell you which rows are causing the violation. What if you've thousands of rows to search when it happens? There are solutions, writes William Sisson.

2014-10-16

8,821 reads

External Article

Performing Azure SQL Database Management Tasks by Using PowerShell with REST API

Recently, we have been exploring the ability to administer Azure SQL Database by leveraging REST APIs invoked from PowerShell-based scripts. Such an approach offers more flexibility, facilitating functionality that is not directly exposed in the PowerShell cmdlets. In this article Marcin Policht shows the benefits when dealing directly with Azure SQL Databases.

2014-10-15

7,612 reads

External Article

Database Deployment Problems Survey

Red Gate is looking to build tools and features to help reduce the risk of database deployment. In order to achieve this, we need to get a better understanding of the most common deployment problems you are encountering when moving changes from development to production. Please help by filling in our two-page survey.

2014-10-14

7,457 reads

External Article

SQL Monitor Custom Metric: Buffer Pressure

Trying to determine if you have pressure in your buffer allocations can be difficult. This metric reliably indicates if you have a buffer problem using the memory dump from DBCC MEMORYSTATUS() and comparing Target Committed to the Current Committed allocations. If you hit negative numbers you are looking at a buffer issue.

2014-10-14

6,901 reads

Blogs

Who’s the Winningest Coach (with AI Help)

By

I was listening to the radio the other day and the hosts were discussing...

Learning from Mistakes: T-SQL Tuesday #194

By

We’re a week late, once again my fault. I was still coming out of...

Stupid Things I Did With AI: ASCII Art

By

I ran across this article recently (https://www.gatesnotes.com/meet-bill/source-code/reader/microsoft-original-source-code) and it has a great opening piece...

Read the latest Blogs

Forums

Basic Always On Groups Randomly Stop Synchronizing

By Leo.Miller

In one of my environments I have 3 pairs of Always On SQL 2022...

Learning From Breakage

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Learning From Breakage

Python in Action to Auto-Generate an Optimized PostgreSQL Index Strategy

By sabyda

Comments posted to this topic are about the item Python in Action to Auto-Generate...

Visit the forum

Question of the Day

Adding and Dropping Columns I

I have this table in my SQL Server 2022 database:

CREATE TABLE [dbo].[CityList]
(
[CityNameID] [int] NOT NULL IDENTITY(1, 1),
[CityName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
I decide to add two new columns for the StateProvince and Country. What code should I use?

See possible answers