//
archives

SQL Server

This category contains 22 posts

Monitoring Mirroring

I set up a SQL Server 2008 mirror, and – using the monitoring tool – I set thresholds, above which the system should launch warnings. Having no real idea of the data volumes to expect between the mirrored databases, I accepted the default warnings and thresholds – warning if the unsent log exceeds at 1Kb, … Continue reading

Silent install – SQL Server Management Studio

  I often install SQL Server Management Studio (SSMS) for a range of users – testers, developers etc. – who do not need to use a local database on their workstation. To reduce my own workload, I’ve generated a command-line script to install the required components.  Using the resources at the MSDN site http://msdn.microsoft.com/en-us/library/ms144259.aspx it … Continue reading

xp_fileExists false negative

  Running the extended stored procedure xp_fileexist returned a negative result enen though the file existed on disk. exec master..xp_fileexist ‘C:\SQLBackup\msdb.bak’ returns: File Exists File is a Directory Parent Directory Exists ———– ——————- ———————– 0           0                   1   (1 row(s) affected) To fix 1 – confirm that the file name in the xp is valid … Continue reading

Exploring the SQL Server log with DBCC Loginfo

The SQL Server log is one of the major components of the database. This post explores what happens in the log during normal (and abnormal) operation. The tool that I use to explore the log is DBCC Loginfo. This is a tool to display information about the virtual log files (VLFs) within the physical log … Continue reading

Configure DTC for distributed transactions

This post describes how to configure the Distributed Transaction coordinator to allow  distributed transactions. The issue arose developing an SSIS package. The SSIS package consisted of two Execute SQL tasks within the same container. Each task updates a different SQL Server. (fig 1 below). fig 1 – SSIS package Initially, when the container Transaction option … Continue reading

Filtered Indexes

On several occasions, I have seen new SQL Server features implemented with little thought as to the impact of the feature. I will discus the use of Filtered indexes to illustrate this point. Filtered indexes were introduced in SQL Server 2005. They allow a developer with a good understanding of the data and the application … Continue reading

File Activation Failure

This post describes errors in a SQL instance after changing the windows account running SQL Server. Environment – a Windows 2008 server running two SQL Server 2008 R2, SP2.instances. One instance is the default instance, the other a named instance. Using SQL Server Configuration Manager, I changed the SQL Server service account for both the … Continue reading

NET Framework execution was aborted by escalation policy because of out of memory

Running a CLR routine on a SQL Server 2005 32-bit instance, I encountered regular failures with the following error: Executing the query “EXEC dbo.up_myprocess ?,?” failed with the following error: “.NET Framework execution was aborted by escalation policy because of out of memory….”. This article describes the steps that I took to control the error. … Continue reading

Restore a corrupt msdb database using Red Gate

After disk maintenance, the msdb became corrupt. This was on a SQL Server 2005 (Standard Ed) build. All backups were made with Red Gate SQL Backup. Following the standard approach did not work. The database was restored using a work around. Under normal conditions, it is possible to restore Red Gate database backups using the  … Continue reading

Restoring to a named log mark with Red Gate

The process of restoring a SQL database with Red Gate SQL Backup is usually straightforward. Open the interface, select the database and restore. The interface allows restored to a point in time, but there is no option to restore to a named mark in the log. To restore a database to a named log mark, … Continue reading