Archives for June, 2011

Redistribute data evenly across equally sized data files

Suppose your database files look something like this: File size in MB used in MB mdf 12,503 12,462 2.ndf 62 62 3.ndf 1,997 758 And you want all data to become evenly distributed over all files with same size so future load will be equally distributed over all files. There are various ways you can follow […]

SQL Agent blocked in “Stopping” state

Some strange behaviour experienced on a newly to be installed server (Win2008R2) – installed SQL2008R2; connected using local and remote SSMS: everything works fine – installed oracle client software Oracle Client 11g R2 version no errors – Test connection to an oracle host using an .udl file: everything works fine – try to setup […]

Deadlocks in SQL2008R2 due to DDL triggers

We used DDL triggers in SQL 2005 for auditing purposes. When migrating to SQL2008R2, these DDL triggers generated deadlocks on system tables. Our ETL process starts with launching multiple sub-packages in parallel each creating a number of temporary work objects (tables, views and even stored procedures (?)).   There is also a DDL trigger that captures […]

Why me?

Why does it always happen to a nice guy like me? Once you arrive at a new customer, you get dragged from one issue into another. First thing on the agenda was to validate a migration process. I can do this on my slippers; at least I thought I could. All existing databases on SQL2005 […]

DB snapshots on a partitioned table in simple recovery

Did you know this combination was possible? Although not tested on partitions using different filegroups. Kind of tricky how DB snapshotfiles will stay in synch with DB files in filegroups. This script gives you a head start if you want to test it yourself. USE testPartitioning go CREATE PARTITION FUNCTION MyPartitionRange (INT) AS RANGE LEFT […]