Tag: sql-server-2005

Storing a 30KB BLOB in SQL Server 2005

My data is 30KB on disk (Serialized object) was size should the binary field in t-sql be? Is the brackets bit bytes ? … so is binary(30000) …. 30KB? Thanks

MS SQL 2005 compare field containing square parenthesis

I am using MS SQL Server 2005 (9.0.4035) and trying to find rows that contain the same data in a nvarchar(4000) field. The field contains xml that has both opening and closing square parentheses. Here is sample data: DataID Data 1 1 2 1 3 2] 4 2] 5 3[ 6 3[ Using the ‘like’ […]

How to join dynamic sql statement in variable with normal statement

I have a quite complicated query which will by built up dynamically and is saved in a variable. As second part i have another normal query and i’d like to make an inner join between these both. To make it a little more easier here is a little example to illustrate my problem. For this […]

SQL Server Views – INFORMATION_SCHEMA.VIEW_TABLE_USAGE

When I query INFORMATION_SCHEMA.VIEWS it lists all views, but when I query INFORMATION_SCHEMA.VIEW_TABLE_USAGE it displays only a few views. How can I rebuild all the views info in INFORMATION_SCHEMA.VIEW_TABLE_USAGE?

SQL Server: String Manipulation, Unpivoting

I have a column called body, which contains body content for our CMS. The data looks like: …{cloak:id=1.1.1}…{cloak}…{cloak:id=1.1.2}…{cloak}…{cloak:id=1.1.3}…{cloak}… A moderately tweaked for readability example: ## h5. A formal process for approving and testing all external network connections and changes to the firewall and router configurations? {toggle-cloak:id=1.1.1}{tree-plus-icon} *Compliance:* {color:red}{*}Partial{*}{color} (?) {cloak:id=1.1.1} || Date: | 2010-03-15 || […]

“Index was outside the bounds of the array” while Compare SQL schema by SQL compare tool

I got one problem from comparing database schema as i use Red gate SQL Compare 6 , after initialization of the compare databases error is coming as following “Index was outside the bounds of the array”. Please provide your valuable comments to get resolve this issue.

Mysterious CPU Activity in MS SQL 2005

I am looking at the activity monitor in MS SQL Management Studio 2005, and I see an entry from a login that I created, and it’s using the tempdb, and the last command is always “SELECT INTO”. And everytime I hit “Refresh” in activity monitor, that entry’s “CPU” column goes up by like 60. The […]

Is the growth of a SqlServer database an intensive operation?

we have a Sql 2005 database and we have set the growth of the data file to autogrowth, ‘By 1 MB’ We see that it does that approx every 10 minutes (its 9 GB now). Is it as simple as: just put it to 10 or 100, or are there other things to consider, or […]

Can I ALTER a partitioned table in SQL Server 2005?

I’m looking into horizontal partitioning for a table that has time-series data in it. I’ve discovered that partitioning is much easier in 2005 than it was in 2000 but I can’t seem to find this answer: Can I add/drop columns of a partitioned table? Are special steps required because it’s partitioned?

SQL Server Multiple Joins Are Taxing The CPU

I have a stored procedure on SQL Server 2005. It is pulling from a Table function, and has two joins. When the query is run using a load test it kills the CPU 100% across all 16 cores! I have determined that removing one of the joins makes the query run fine, but both taxes […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.