This tag is for SQL Server 2005, major build version 9.00.xxxx.

learn more… | top users | synonyms (2)

5
votes
1answer
406 views

Unexpected Table Scan with Parameterized LIKE

I'm experiencing an unexpected table scan on SQL Server 2005 against a heap table when parameterizing a LIKE statement... but when the same value as the variable is hard-coded, the expected Index Seek ...
2
votes
3answers
655 views

Backups script completes, but doesn't back up all dbs

I'm running sql server 2005 and I've made a simple backup script that backs up all the databases on one server. The script always succeeds, but when I go to check the log or the files, I see it has ...
5
votes
1answer
599 views

Process attempted to unlock a resource it does not own

SQL Server 2005 SP4 32-Bit I have a DBCC CHECKDB job running nightly. Last night, soon after the job started, I got the errors below. The database is NOT in suspect mode, and CHECKDB comes back clean ...
1
vote
0answers
114 views

SQL Server 2005 Unexpected Disk Usage during Backups [closed]

On our SQL Server 2005 SP4 server we have a maintenance plan in place which performs a full backup of selected databases on a nightly basis. The databases are configured in Simple recovery mode and ...
0
votes
2answers
40 views

Can you create an unrecoverable SQL Agent back log?

I have created and am using an SQL Agent for the first time. I have searched google but either the info isnot there or I am not getting the keywords correct (SQL agent + back log/callstack overflow ...
0
votes
2answers
398 views

Missing data after attaching .mdf file

Recently, one of my customers had a server crash. Unfortunately, the 3th party who was responsible for the backup was 'forgotten' to schedule a backup of the DB (I know, I should have notice that). ...
1
vote
2answers
484 views

Long time, sporadic 'String or Binary data would be truncated.' Wisdom would be appreciated

TL;DR How can I diagnose the source of a very inconsistent, un-reproducable 'String or Binary data would be truncated.' error, when I am quite positive the problem isn't related to user data being to ...
2
votes
1answer
206 views

FOR XML is generating a empty first line

I'm parsing with flash a XML file generated by this code: :XML ON USE MyDatabaseName GO SET NOCOUNT ON SELECT * FROM ProgramacionDia as programa order by hora FOR XML AUTO, ROOT ('toflash'), ...
3
votes
2answers
3k views

Identifying which values do NOT match a table row

I would like to be able to easily check which unique identifiers do not exist in a table, of those supplied in a query. To better explain, here's what I would do now, to check which IDs of the list ...
4
votes
5answers
1k views

Run Multiple Remote Jobs

I need to manually run a job on more than 150 sql server instances (sql server 2000, remote) from a sql server 2005 instance (the local server). The job is the same on all these instances. The job ...
4
votes
1answer
442 views

Reindexing and its effects on SQL cache

Currently looking into reindexing our sql database, and cannot find any information on whether or not the procedure cache would be effected. Any help or information would be great. We are using SQL ...
4
votes
1answer
306 views

ISNULL on NTEXT causes fatal exception on SQL Server

I have a weird error that occurs on a client's SQL Server 2005 box. We have provided them with a dataview that is populated with a query with a CTE with several joins / subqueries that does some text ...
4
votes
2answers
871 views

Can't select database for transaction log backup in maintenance plan

I am running into a problem while trying to save a transaction log database backup maintenance task: Add the 'Back Up Database Task' to the maintenance plan. Edit the task. Select backup type: ...
5
votes
3answers
1k views

What type of SQL Server Replication fits our scenario? Merge or Transactional?

Background In our current setup, we have a single SQL Server 2005 instance on our remotely hosted web server. We additionally have another (non-MSSQL) database which we use for our POS system, which ...
1
vote
1answer
173 views

SQL Server 2005 encryption - What Grants should I give

I use Mixed mode Authentication and I want my database users (in the Public role membership) to have the ability to JUST execute procedures that encrypt/decrypt data (using Certificate and Symmteric ...
3
votes
2answers
2k views

How to restore a filegroup from its backup in SQL Server

I need guidance on how to restore a file group in Database from the File group backup taken from another same DB server. Is it possible to restore the filegroup by running restore DB for File Group. ...
2
votes
1answer
13k views

IF NOT NULL then UPDATE else keep the value of the field

I think I am somehow close to get it work, but for some reason I still get errors. I have the following UPDATE query: UPDATE DeviceAttribute SET Details = CASE Name WHEN 'Accessories' THEN ...
2
votes
4answers
3k views

How do I determine if a database is the principal in a mirroring setup?

I have two database servers Server1 and Server2, configured with mirroring. A single database, MirrorDB, is mirrored. There is another database on Server1 named OtherDB which is only present on ...
2
votes
3answers
438 views

Why is SQL running the same query longer from another connection? [closed]

Here is the issue overview: Why does my stored procedure run faster when executed localy vs remotely? Dont jump to any conclusion just yet, let me explain what I mean... Here is the setup: A Windows ...
7
votes
3answers
748 views

What alternatives exist when a table requires too many foreign keys?

We have a base table that defines parts and holds information like part number, description, price, weight, etc. We also have approximately 400 tables that reference the base table and provide ...
4
votes
2answers
139 views

SQL Server 2005 Database move and rationalisation - Recommended maintenance processes

We're moving a SQL Server 2005 database to a new server and upgrading to 2008, and I'm looking for some advice and reassurance that our approach is correct. I inherited this database and it came to ...
0
votes
1answer
2k views

SQL update set column = @ parameter

doeas anyone knows how to update a table where column = @parameter WHERE SELECT Basically I have a table with the following values. Table name is UserAttribute ID|Name |Properties| ...
4
votes
1answer
1k views

Primary key with “NOT FOR REPLICATION” option

I have recently taken over a project, and I have discovered that in most tables the primary key has the property "NOT FOR REPLICATION". I'm no DBA, but surely in most databases, a record without a ...
1
vote
1answer
2k views

how to add attachment(text file) to database mail?

I have scenario Daily i run a sql job to apply a new updates to one table - this job will create one text file daily - text file contains all new updates I can send a mail to client that job is ...
5
votes
1answer
1k views

Find transactions that are filling up the version store

we have enabled the "READ_COMMITTED_SNAPSHOT" for some of our SQL Server 2005 databases. Now from time to time we see that our TempDB is filling up the harddisk and we suspect the version store to be ...
0
votes
0answers
46 views

Email alerts and Server Side Tracing

This question is in regards to SQL 2005 and email alerts on long running queries. Does this sound like the best approach (with the least impact to the server) to receiving alerts to long running ...
2
votes
2answers
913 views

Is there a way that I can export a list of all table triggers on a server?

I have two SQL Server instances that I manage. One is a SQL Server 2000 instance, and the other is 2005. Some where, on these servers, I recall setting up a couple table triggers that were executed ...
1
vote
1answer
434 views

How do I understand this deadlock?

I have two threads doing inserts into a table at the same time, causing a deadlock. The interaction with the table is in a new transaction, so I'm pretty confident there is nothing else going on here. ...
0
votes
0answers
177 views

SQL Server 2000 database attach error to SQL Server 2005

I have a SQL Server 2000 database (mdf and ldf). When I try to attach it, using SQL Server Management Studio Express 2005, I get this error: Attach database failed for Server 'XXXXX\SQLEXPRESS'. ...
1
vote
1answer
213 views

Restoring a differential backup in SQL server 2005

I have created a full back up of my database by executing the line below in my application: Dim Query As String = "backup database Ari to disk='G:\Documents and Settings\i\Desktop\BKAR\" & ...
0
votes
1answer
265 views

Restoring a differential backup in SQL server 2005 [duplicate]

I have created a full back up of my database by executing the line below in my application: Dim Query As String = "backup database Ari to disk='G:\Documents and Settings\i\Desktop\BKAR\" & ...
2
votes
2answers
183 views

Help with tricky update statement

I've tried writting this update statement every possible way I can think of but I either wind up producing invalid results or run into a syntax barrier. I have two table variables: DECLARE ...
-1
votes
1answer
619 views

FETCH API_CURSOR causing open transaction in tempDB

A select statement run from Oracle 11gR1 to SQL Server 2005 using Gateway leaves an open transaction in tempdb. The user is a datareader in Database XYZ. Not sure why the open tran is in tempDB when ...
1
vote
1answer
143 views

Consolidating indexes

I have one big table that is used to generate business intelligence cube. Currently it has around 40M rows and 55 columns. A lot of the cube dimensions are generated by running 'select distinct' on a ...
1
vote
1answer
69 views

Scheduling a backup in SQL Server 2005

I am trying to schedule back up in SQL Server 2005 with management option. I am unable to find database name while scheduling a backup with full option. Database name is not over there in selected ...
1
vote
1answer
188 views

Can I run a Report Server and a Mirror server from a working Log Shipping secondary instance? [closed]

Our setup: City A - Primary server for logshipping City B - Secondary server for logshipping Now there is a lot of data being updated from A - B. And the server in City B is underutilized, and it ...
7
votes
2answers
912 views

Different results rebuilding an index online and offline

I have a non-clustered, non-unique index on a foreign key column of type bigint. When I rebuild the index online, the average fragmentation drops to 3%, with 2 fragments, and 30 pages. When I run ...
4
votes
1answer
385 views

SQL Server 2005 Replication

I am in the process of creating Replication between 2 Remote Servers, server 1 is the Distributor and Publisher and server 2 is the Subscription. server 1 windows 2003 server 192.168.10.1 connected ...
4
votes
1answer
79 views

Index Evaluation

I have been doing some index evalaution on a table and this is the first time I have ever looked at how well indexes are performing so and would like some advice on a certain index. The non ...
5
votes
1answer
122 views

SQL Server 2005 not collecting logins in the log file

I am currently running SQL Server 2005 Standard Edition on a Windows 2003 server machine. I have gone to the properties of the server and confirmed that the Login Auditing is set to both failed and ...
0
votes
0answers
286 views

Is my SQL Server 2005 Maintenance Plan running twice a day?

I'm a new DBA trying to discover how a production Reports server is setup. I did find a Maintenance Plan. It does show to be scheduled to run in a Job at 1am each day. Here's my dilemma: When I ...
11
votes
1answer
3k views

What exactly does “No Join Predicate” mean in SQL Server?

MSDN "Missing Join Predicate Event Class" says it "indicates that a query is being executed that has no join predicate". But unfortunately it does not seem to be as easy as that. For example, very ...
4
votes
2answers
2k views

Find orphaned users

In SQL Server 2005, is there a way to find users that either don't exist at the server level (an account that was deleted at server level but wasn't disassociated from databases before it was deleted) ...
13
votes
4answers
6k views

Can I launch a stored procedure and immediately return without waiting for it to finish?

We have a stored procedure that users can run manually to get some updated numbers for a report that's used constantly throughout the day. I have a second stored procedure that should be run after ...
6
votes
3answers
261 views

Everyone warns against shrinking a database, but will it work in my case? 1 GB db with tables removed now 100 MB

Everyone is warning against shrinking a database, e.g. SQLAuthority But will it be a valid option in my case? The database was originally more than 1 GB, but with a table removed from it (moved to ...
4
votes
1answer
312 views

Adding indices to views

I have a table that contains XML data in a varchar type field. This field is used to store data from a variety of different XML schemas some of which are related via a record stored in another table. ...
0
votes
2answers
94 views

Getting the exact edited data from a column in SQL Server

I have two Tables: Articles(artID, artContents, artPublishDate, artCategoryID, publisherID). ArticleUpdated(upArtID, upArtContents, upArtEditedData, upArtPublishDate, upArtCategory, ...
4
votes
1answer
623 views

Replication between SQL Server 2005 and Azure database

Is it possible to set up transitional replication between a SQL Server 2005 and a SQL Azure database? My server is nearing end of life and I would rather migrate to a cloud infrastructure instead of ...
4
votes
1answer
215 views

One CPU in a 32-core system is getting to 100% usage and hurting performance

I am experiencing a problem with one server. It has 32 cores and seems to be well-configured in all aspects (memory, hard disk drives...). Performance Dashboard is not showing blocks or deadlocks and ...
2
votes
2answers
3k views

32-bit ODBC driver on 64-bit SQL Server [closed]

I am unable to use an ODBC 64-bit driver with SSMS 2012 running on a SQL Server 2012 64-bit instance. However, I believe that the 32-bit driver works. My question is can I use SSMS 2005 32-bit to ...