It appears that Registered servers are not being stored in the registry now. There is a file here C:\Documents and Settings\{you}\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\RegSrvr.xml that can be moved from server to…
Merging partitions in SQL 2005
Today I have played with partition merging. The target of this was to see how long it can take, which locks are being held etc.I see that even if partions are empty, the minimum time that it takes is 30 sec ( 2x2.66 CPU 7Gb RAM ). Most of…
Changing partition_id in SQL Server partition tables
When switching partition in or out, partition_ids are changing for both source and destination, even if destination is a regular table. At the beginning I thought that new id's are being issured but it appears that SQL Server simply…
Declaring table variable in SQL Server 2005
When there is a requirement to declare several local variables inside TSQL script, it appears that table variables must have it's own DECLARE clause. Surprisingly, Books Online do not mention that.Here you go :DECLARE @str1 varchar(8),…
Statistics are saved on table level and not on partition level (both SQL 2005 & 2008
Currently table statistics and histograms are saved per table and not per table partition. Many environments that i see experience real performance degradation when migrating from view partitions to native partitions because, thanks to…
Table and Index Organization chapter in Books Online
In the Books Online, in the Table and Index Organization chapter there is such schema:I think, this is not correct , because, there there is only one set of indexes and only one heap per table, and each b-tree or heap separated into…
Adding check constraint to the partitioned table in SQL 2005 always scans ALL partitions
Yes. Even if constraint checks partitioning column and "bad" data can exist in one partition only. See for yourself: I create table natively partitioned on integer field with another char field to fill more pages (full script at the end…