SQLServerCentral Article

Migration to Production

SQL Server is an easy to use product in many ways, much better than the other major RDBMSs out there. However it's source control and ease of moving changes from development to production needs some work. Having a solid process is as important as good tools and new author Grant Fritchey brings us his proven method for moving changes through QA into production.

Technical Article

Creating a User Defined Aggregate with SQL Server 2005

SQL Server doesn't have a Product aggregate function. A recent blog post by Karen Watterson pointed out that Microsoft Knowledge Base article Q89656: Simulating a PRODUCT() Aggregate Function discusses how to achieve the Product aggregate functionality using the POWER function. We e-mailed about it and she challenged me to create a Product aggregate in SQL Server 2005. I decided to accept the challenge.

External Article

SQL Server 2000 Security - Part 6 - Ownership and Object Permissions

We have described, so far, authorization based on a predefined fixed server (determining a set of SQL server-wide privileges) and database (applying to database objects and activities) roles. We have also discussed application roles, which makes the level of permissions independent of those assigned to a SQL Server login or a database user account. Now it is time to look into permissions from the point of view of database objects. There are two main factors that play a role in determining how access rights to them are evaluated - their ownership and custom permissions. We will discuss the first one of these topics in this article and will continue with the other one in the next installment of this series.

SQLServerCentral Article

Securing SQL Backups

SQL Server does many things very well, but securing itself is not one of them. While securing your server requires some effort, there is an area that many people forget. Securing your backups! Brian Kelley, our resident security expert, brings some advice and ideas for ensuring your data will not be stolen.

Technical Article

Exploring 'ON DELETE SET NULL' in SQL Server 2005

At first glance, the 'ON DELETE SET NULL' option in SQL Server 2005 may not seem like a big deal, but once you've seen how it can be used, I think you will be impressed. The basics? If Order.CustomerID has a foreign key to Customer.CustomerID and a customer is deleted, 'ON DELETE SET NULL' causes the CustomerID field in each of that customer's orders to be set to NULL. It allows the "parent" record to be deleted and sets the "child" record's column to NULL. A normal foreign key says Order.CustomerID must match a record in Customer. An 'ON DELETE SET NULL' foreign key says that if Order.CustomerID is not null, then its value must match a record in Customer.

SQLServerCentral Article

Performance Tips Part 2

SQL Server 2000 is a self tuning, self balancing application that performs wonderfully under a wide variety of loads and conditions with a minimal of administrative tuning. However there are some things that you can do when building T-SQL code and working with SQL Server to maximize performance. Leo Peysakhovich brings us part two of his series looking at some different scenarios and how you can structure your code for better performance.

External Article

MDX Essentials: Set and String Functions: The GENERATE() Function

In this lesson, we will introduce a function that provides us the ability to derive a set by systematically applying a set expression to each of the members of a set we define. GENERATE() is a potent function in our MDX toolset, in that it enables us to select precisely only certain members of a dimension level. It effectively operates upon two sets to create a new set, based upon the members of a second set that are also in a primary set.

Technical Article

Quick! Which specific SQL Server user is logged into which database?

SQL Server's master database stores tables with important and constantly updated information about the state of the SQL server. One of these tables, sysprocesses, can be used to track (in SQL Server itself) which SQL Server users are currently logged in and which database(s) they are accessing.

The quick way to find out if a particular user is accessing a particular table is with a query.

Blogs

2024 PASS Data Community Summit Prep

By

Next week is the 2024 PASS Data Community Summit in Seattle. I’ll be traveling...

A New Word: Bye-over

By

bye-over – n.  the sheepish casual vibe between two people who’ve shred an emotional...

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

By

I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...

Read the latest Blogs

Forums

PASS Summit Time

By Louis Davidson (@drsql)

Comments posted to this topic are about the item PASS Summit Time

database restore chain

By sqlfriend

I have a backup of full, differential and transaction log setup for our database....

Temporary Table Problem

By fk.da

Hello everyone, I hope you can help me. I have a table with measurement...

Visit the forum

Question of the Day

Incremental Statistics

I have run this on SQL Server 2022 for the Sales database:

ALTER DATABASE Sales SET AUTO_CREATE_STATISTICS ON (INCREMENTAL = ON)
I then run this in the Sales database:
USE Sales
GO
CREATE STATISTICS CustomerStats1 ON dbo.Customer (CustomerKey, EmailAddress) WITH INCREMENTAL = OFF
The dbo.Customer table is partitioned. How are statistics created?

See possible answers