T-SQL

Technical Article

Delete record efficiently. (sp_CheckAndDelete )

  • Script

The sp_CheckAndDelete stored procedure specially created for handling process of data deleting efficiently in MS SQL Server 2000 tables, as it is too difficult to handle this process when dependants exist for record to be deleted. When the deleting process is done with sp_CheckAndDelete stored procedure, you will be informed the status of the process […]

You rated this post out of 5. Change rating

2003-01-30

185 reads

SQLServerCentral Article

Using Exotic Joins in SQL Part 1

  • Article

When most developers think of joins, they think of a.SomethingID = b.SomethingID. This type of join, the equijoin, is vitally important to SQL programming; however, it only scratches the surface of the power of the SQL join. This is the first in a series of articles that will look at several different types of exotic joins in SQL. This article will focus on using the BETWEEN operator in joins when dealing with range-based data.

5 (2)

You rated this post out of 5. Change rating

2017-08-23 (first published: )

37,965 reads

SQLServerCentral Article

How to Search for Date and Time Values

  • Article

Because of the way date and time values are stored in SQL Server, searching for a particular date or time is not as straightforward as you might think it would be. This article describes how date/time values are stored, how the database design can simplify (or complicate) data retrieval, and how to query date/time data to get the right results every time.

5 (1)

You rated this post out of 5. Change rating

2003-01-21

35,552 reads

SQLServerCentral Article

A Normalization Primer

  • Article

For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.

5 (3)

You rated this post out of 5. Change rating

2003-01-13

18,590 reads

Technical Article

CSV Lists of Columns in Different Formats

  • Script

This script creates comma separated lists of columns in different formats. These lists can be copied and pasted into other T-SQL statements.  The lists are formatted as: a simple list of column names, a list with the column names as declared variables (@ + column name + data type), a list with column names as […]

You rated this post out of 5. Change rating

2002-12-26

198 reads

Technical Article

To find the next available ID

  • Script

There are times when you have a limited range of ids and these have to be re-used as they become available.The script lists the first missing id in a table.Note that this script works best for a table with a limited number of rows, say sub 100,000I tested this on a PIII 500MHz 256Mb RAM […]

You rated this post out of 5. Change rating

2002-12-09

202 reads

Technical Article

Dynamic String Compare (W/O the dynamic sql)

  • Script

Purpose: To compare two strings with a supplied operator and return true if the strings evaluate to true using the operator provided. This is useful for stored procs to use instead of dynamic sql. YAY!  Allowing for the operator and value to be passed in as parms. So that the user on the front end […]

You rated this post out of 5. Change rating

2002-12-07

844 reads

Technical Article

Stored Proc with optional parameters

  • Script

Sometimes people want a Stored Proc with optional parameters. A lot of times people will use a coalesce for this. The problem with optional paremeters is that the query plan will never be an exact mach for that specific query. ( You never know what paremeters are filled..... )To solve this problem look at the […]

You rated this post out of 5. Change rating

2002-12-06

440 reads

Blogs

PASS Data Community Summit 2024 Day 3 Keynote

By

It’s been an amazing week here, as well as a long week. I’m tired,...

A New Word: Skidding

By

skidding – v. intr. the practice of making offhand comments that sound sarcastic but...

PASS Summit – Thursday

By

Let’s start with the keynote. The biggest take away was how having to support...

Read the latest Blogs

Forums

Step by step guide to setup PostgreSQL on Docker

By Arvind Toorpu

Comments posted to this topic are about the item Step by step guide to...

Backing up the Database Encryption Key

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Backing up the Database Encryption...

Technology Fears

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Technology Fears

Visit the forum

Question of the Day

Backing up the Database Encryption Key

In my SQL Server 2022 database, I run this:

USE Sales;  
GO  
CREATE DATABASE ENCRYPTION KEY  
WITH ALGORITHM = AES_256  
ENCRYPTION BY SERVER CERTIFICATE MyServerCert;  
GO
This works, but I want to prepare for the future and potential issues. How do I back up my DEK?

See possible answers