//
archives

SQL Server

This category contains 22 posts

TSQL – data loads using the 610 flag

I have been loading large volumes of data into SQL Server. The requirement was to load an initially empty table, then repeatedly load large volumes of data (over 1 million rows a time) into the already populated table. I tested two approaches. First, I dropped the existing clustered index, populated the table and re-built the index. … Continue reading

Create a SQL Cluster on your laptop–Introduction

Probably one of the main difficulties when learning clustering is the lack of a test platform. This series of posts will show you how to build a SQL Server 2008 cluster on a low-spec laptop. The approach that I am using is not the approach that I would use for a production system. This post … Continue reading

A timeout was reached (30000 milliseconds) while waiting for the SQL Server Reporting Services

Reporting Services will not start. In SQL SERVER Configuration Manager, the service is shown as stopped. The event viewer shows the below error in the windows Logs – system: A timeout was reached (30000 milliseconds) while waiting for the SQL Server Reporting Services (MSSQLSERVER) service to connect. In my environment, the following steps (from http://support.microsoft.com/?kbid=884495) … Continue reading

Maximum text sizes in replication

I configured a transactional replication process to move data – including Word documents – to a subscriber. This process started to fail on an occasional basis. I re-created the error as follows. First, to demonstrate the limit on LOB data, I executed the below TSQL on a test system: insert [dbo].[Documents] ([DocID],[Document]) values (34599,replicate(cast(‘a’ as … Continue reading

Replication–SQL agent jobs

When a database is replicated, several new objects are created on your system. This post will tell you what to expect to see. To start, I set up transactional replication between two servers. The Publication server acts as its own distributor. I am run all agents at the publisher. On my publisher, I have the … Continue reading

identity columns and transactional replication

The use of Identity columns in a transactional replication topology is not supported. However, identity columns are commonly used in database design as keys. This blog will consider what can happen if a database with identity columns is replicated. To test what can go wrong, I created a table (T1) with an identity column (C1). … Continue reading

Disk organisation when running virtual SQL Servers

I have been running SQL Server on a virtual platform (vSphere from VMware) for several years. This post describes my approach to disk organisation. I have had to think about this post because I suspect that some of this will be controversial – it is my approach, and it seems to work for me. SQL … Continue reading

Triggers–do they need data changes to fire?

It may surprise some to know that a trigger does not require a change to the table to fire. This post will explore what happens when a trigger fires but no data is changed. First, I will create a table and a trigger. create table Table1(id int , Iname varchar(250)) go create trigger trg_insTable1 on … Continue reading

Access SQL Server without a password

I recently had to access a server that has not been used for several years. No windows login or SQL Server logins gave me access. This post will describe how I used SQLCMD to add the windows administrator login to the sysadmin role. First, I change the SQL Server startup flags to use the -m … Continue reading

Paging result sets in SQL Server 2012 – Offset and Fetch

In SQL Server 2012, additions to the ORDER BY clause – OFFSET and FETCH – allows paging through data sets. I will briefly describe this feature used alongside the WITH clause and consider the performance impact of the tables sort order. First of all, I think that this is a useful enhancement – I have … Continue reading