Mladen Prajdić Blog

Blog about stuff and things and stuff. Mostly about SQL server and .Net

SQL Server 2005: TableDiff.exe GUI

Some time ago i've written about the TableDiff.exe utility. It's a great tool for quick table comparisons and i've grown tired of typing it in the command line. That's why I created this simple TableDiff GUI to help me along and i've decided to share it with the world. Read more →

A few maximum limitations for SQL Server 2005

Every now and then i see a question pop up that asks what is the max this or that in sql server? Well here are some maximum values: Bytes per short string column8,000Bytes per GROUP BY, ORDER BY8,060Columns in GROUP BY, ORDER BYLimited only by number of bytesBytes per index key900Bytes per foreign key900Bytes per primary key900Bytes per row8,060Bytes per varchar(max), varbinary(max), xml, text, or image column2^31-1Characters per ntext or nvarchar(max) column2^30-1Clustered indexes per table1Columns per index key16Columns per foreign key16Columns per primary key16Columns per base table1,024Columns per SELECT statement4,096Columns per INSERT statement1,024Connections per client32,767Database size1,048,516 terabytes Databases per instance of SQL Server32,767Filegroups per database32,767Files per database32,767File size (data)16 terabytesFile size (log)2 terabytesForeign key table references per table253Identifier length (in characters)128Instances per computer50 (Workgroup Edition only 16)Locks per connectionMaximum locks per serverLocks per instance of SQL ServerUp to 2,147,483,647Nested stored procedure levels32Nested subqueries32Nested trigger levels32Nonclustered indexes per table249Parameters per stored procedure2,100Parameters per user-defined function2,100REFERENCES per table253Rows per tableLimited by available storageTables per databaseLimited by number of objects in a databasePartitions per partitioned table or index1,000Statistics on non-indexed columns2,000Tables per SELECT statement256Triggers per tableLimited by number of objects in a databaseUNIQUE indexes or constraints per table249 nonclustered and 1 clusteredUser connections32,767XML indexes249 Read more →

Centralized Asynchronous Auditing with Service Broker

My article about Service Broker fundamentals and simple practical use has been posted on SQLTeam.com. Go check it out. Service Broker is a new feature in SQL Server 2005. It is an integrated part of the database engine and it provides queuing and reliable direct asynchronous messaging between SQL Server 2005 instances only. Read more →

SQL Server 2005: Easily importing XML Files

In SQL Server 2005 importing XML files became very easy. OPENROWSET now supports the BULK keyword which lets us import XML files with ease. A little example:  CREATE TABLE XmlImportTest ( xmlFileName VARCHAR(300), xml_data xml ) GO DECLARE @xmlFileName VARCHAR(300) SELECT @xmlFileName = 'c:\TestXml. Read more →

SQL Server 2005: Concat values XML Style

A few days ago i showed how to split string with XML. Now it's time for concatenation with XML.  DECLARE @t TABLE (col VARCHAR(10)) INSERT into @t select 'aaaa' UNION ALL select 'bbbb' UNION ALL select 'cccc' UNION ALL select null UNION ALL select 'dddd' Read more →