SQL Server 2005 (major build version 9.00.xxxx). Please also tag sql-server.

learn more… | top users | synonyms (2)

0
votes
0answers
60 views

sqlevn70.rll - Failed to Load Format String for Error 345

I have been receiving the following alerts from this error message as shown below: Operating system error: 317(The system cannot find message text for message number 0x345 in the message file for ...
3
votes
0answers
51 views

Proc Cache Drop Assistance [duplicate]

We are noticing performance issues with one of our applications. When the application issues begin the procedure cache size goes from 4.5GB to 0. The plans are then rebuilt and still the application ...
2
votes
1answer
112 views

Script file execution through Power shell

We are trying to automate few things, one of them is to deploy patch in one go on selected DBs of SQL Server, as per my knowledge Powershell is an option. But I have zero taste buds of Power shell. ...
2
votes
2answers
91 views

Find the first datetime interval

I have a table in SQL with a column Recordtime and valueasreal RecordTime ValueAsReal 2015-11-30 12:59:00 195,6907 2015-11-30 13:00:00 203,8667 2015-11-30 13:01:00 198,0907 2015-11-30 13:...
1
vote
1answer
517 views

all tables used by a stored procedure and all sps that use a particular table - recursive cte

I am working on a script that gives me a list of tables that use a specific stored procedure. It also works on all tables used by a stored procedure. on the example below, all stored procedures that ...
3
votes
1answer
100 views

Unpivot with rows converted to columns as well as columns converted to rows

I've tried to understand unpivot examples on the web but they don't quite result in what I'm trying to do, which is to have specific rows turned into columns and columns turned into rows. To try and ...
0
votes
1answer
109 views

Multiple criteria for including / excluding rows

CLARIFICATION UPDATE Unfortunately we report based on the 3rd party application and database so we cannot modify the datatypes since we do not own it. To help clarify, This report basically shows us ...
8
votes
2answers
256 views

Moving Databases to New Datacenters

My company is moving our infrastructure to new data center and I am trying to figure out the best way to keep the database on the new server in sync with the current production database until the new ...
0
votes
0answers
71 views

SQL Server Error Number 825 how to proceed

I have a Windows Server 2003 running on VMWare with an SQL Server 2005 installed. This morning I received 2 warning mails 4 hours apart about error 825. Both times the error was about an incorrect ...
2
votes
1answer
33 views

Track write requests on Read-only database

I have changed one of the databases to read-only in SQL Server 2005. I would like to track if someone tries to write to the database. Any suggestions on how to track such requests (end user write ...
1
vote
2answers
82 views

SQL Server - cannot drop idle job

Currently, I am transitioning a server from a company to another. They want to keep SQL Server installed on the server so we are wiping clean all the databases, maintenance plans and jobs. I'm ...
2
votes
1answer
49 views

Questions about DBCC FREEPROCCACHE

I used spAskBrent for troubleshooting a SQL Server 2005 performance issue. I found the problem was someone had ran DBCC FREEPROCCACHE. It caused low performance (very low PLE) on my database and ...
1
vote
0answers
160 views

SQL Server Alert System: 'Severity 17 - Potentially Fatal Error Insufficient Resources' occurred on myserver

I get a alert email with the title: SQL Server Alert System: 'Severity 17 - Potentially Fatal Error Insufficient Resources' occurred on myserver as 12:02 when I connect to myserver to check ...
2
votes
3answers
127 views

SQL Server Pagination using CTE

I have to apply paging on query as per requirement i need two extra columns other than query result 1. Total Records 2. Total Pages but i am trying to confirm that this the right way to retrieve ...
1
vote
1answer
37 views

Report rollbacks to log file

There are several reasons for SQL transactions to rollback. I want to log all of them to the SQL Server Log File so that I can find information about them at a later time in the SQL Server Log File ...
0
votes
2answers
49 views

From SQL Server 2005 to SQL Server 2012

I need to convert some databases from SQL Server 2005 to 2012; I know that you must convert it into 2008 before, but I can't rely on a SQL Server 2008 Enterprise installation: is there a faster way ...
0
votes
1answer
61 views

is_not_trusted = 1 after Error-Free WITH CHECK CHECK CONSTRAINT

I'd like SQL Server 2005 SP4 to trust a certain foreign key constraint. Executing an ALTER TABLE statement that enables + checks the constraint returns Command(s) completed successfully yet sys....
10
votes
1answer
1k views

Why are multiple COUNT faster than one SUM with CASE?

I wanted to know which of the following two approaches is faster: 1) Three COUNT: SELECT Approved = (SELECT COUNT(*) FROM dbo.Claims d WHERE d.Status = 'Approved'), Valid ...
1
vote
1answer
92 views

Can't create database in SQL Server Express 2005

One of our clients is running Windows Small Business Server 2011, and they have a SQL 2005 Server Express instance (and several other versions also installed). Using Management Studio, running as ...
1
vote
1answer
140 views

Database Restore Not Working

I am trying to restore an empty MS SQL database 'Rental' to a new updated version of it. The backup of the database (named Rental_2) was taken from the 2012 version of SQL Server and I am trying to ...
4
votes
1answer
238 views

Remove the log shipping configuration on the secondary server, when the primary is no longer available

My primary server with SQL Server 2005 broke down, so I've started up the log-shipped database on the secondary server. The database is live on the secondary server, and I just need to remove the log ...
0
votes
1answer
58 views

Sub Query vs Table Filter

I have have been assigned to resolve Performance issue of a Stored Procedure. Select TableTwo.Column1, DatabaseTwo..TableThree.Column2, Sum(TableTwo.Column3) As Column3 --- Section 1 from ...
0
votes
1answer
27 views

How do I perform daily, monthly SQL Server 2005 maintenance?

Team, I have SQL Server 2005 and I am new to DBA role and wondering if there is any T-SQL Script/Stored Procedure out there that they will help me accomplish the following on regular basis - Daily, ...
0
votes
0answers
35 views

How to Split string into multiple values using best approach [duplicate]

We are trying to save result of a query in database by tokenizing a column but query is taking more than 3 minutes to finish his objective. My question is, do we have any faster way to tokenize a ...
0
votes
2answers
44 views

SA user password for software which automatically installs SQL Server 2005

I am testing a software which requires SQL Server 2005 for storing the data. The SQL Server 2005 database is automatically installed when I installed the software. During the software installation I ...
1
vote
1answer
90 views

How to create a stored procedure to update database after table edit

In a C# website application with a database, I set a gridView table so that I could edit the values in the table by row, but it appears that I need a stored procedure to do that. Below is the stored ...
1
vote
1answer
37 views

Batch process to delete table from SQL Server backup files

I have a set of full backups from a same SQL Server database saved in different files. For example: 01.my-database.bak 02.my-database.bak 03.my-database.bak I want to delete a specific table from ...
3
votes
1answer
272 views

Do not have permission to use 'dbo' when creating a view

I want to create a user with minimal required access to two databases within a server. The user will be used by someone from a third party integrating a Business Intelligence tool into our database. ...
0
votes
0answers
30 views

Checking Job Status on Linked Server (MS SQL 2005)

We have 2 MS SQL 2005 Server instance. Both of them hold our warehouse environment. We receive around 100 files from our ERP System everyday and SQL Job on our Live environment Loads them in to ...
1
vote
1answer
1k views

how to insert a list of varchar values, into a single column table?

In SQL Server 2005: CREATE TABLE __RADHE ( itemNo varchar(10) not null primary key clustered ); GO INSERT INTO __RADHE ??? '34926840', '34927020', '34927202', '34927384', '34927566', '34927830',...
15
votes
3answers
443 views

Slow update on large table with subquery

With SourceTable having >15MM records and Bad_Phrase having >3K records, the following query takes almost 10 hours to run on SQL Server 2005 SP4. UPDATE [SourceTable] SET Bad_Count= ...
2
votes
0answers
37 views

SQL Server not checking for expired passwords

We are using SQL Server 2005 on Windows Server 2008 with Windows Authentication where access is granted to members of a specific domain group. Clients are VB6/ADO applications that connect via an ...
1
vote
0answers
147 views

Merge Replication: Error “The insert failed. It conflicted with an identity range check constraint”

For one of our SQL server 2005 enterprise, configured with merge replication, we suddenly start seeing the below error message: The insert failed. It conflicted with an identity range check ...
1
vote
0answers
31 views

SQL Server 2005 Database Mail Resends Historic Messages following SP4 Build 5324

I have applied SP4 Build 5324 to a SQL Server 2005 Enterprise active/passive cluster (Build pathway: 4053 to 5000 to 5324). The SQL Server log contains zero errors. The SQL Server Agent log contains ...
0
votes
0answers
38 views

How to improve the slow performance with Insert operations in SQL Server 2005?

Suddenly our server started to have a bad performance, after trace the error, I identified that the inserts are the problem, this seems a know bug: https://support.microsoft.com/en-us/kb/940545 (The ...
0
votes
0answers
135 views

Reorganize index maintenance plan failed

A 'Reorganize index task' (maintenance plan) failed today with the below error: Reorganize index task The Execute method on the task returned error code 0x80004003 (Object reference not set ...
0
votes
1answer
45 views

INSERT from SELECT using a CURSOR

I have a table that looks like this: +====================================================+ | aid | uid | eid | name | dob | paid | +====================================================...
0
votes
1answer
200 views

Import (flat file) into SQL Server

I've seen a couple of questions about the subject backfiring so I'll try to be specific about my concern... I have an old (MS Access) frontend I'm trying to rebuild and I left the part that troubles ...
0
votes
1answer
60 views

How to Create Trigger Insert with a SELECT LEFT OUTER JOIN

I want this trigger to be fired after an insert is made with the text, this is what I have so far ALTER TRIGGER [xxx] ON [dbo].[Main] AFTER INSERT AS BEGIN SET NOCOUNT ON; INSERT ...
0
votes
1answer
37 views

Backup Principle database in SQL Server

We have set up database mirroring in SQL Server 2005. Is it possible to take full backup of principle database? Does it break database mirroring if I will take full backup of the principle database?
2
votes
1answer
84 views

Single row update using primary key affects many rows

I'm doing a very simple datetime update in a table using its primary key: update TABLE set END_DATE = '2015-10-14 00:00:00' where ID = 1165027; I received the message (1 row(s) affected) 183 ...
3
votes
2answers
213 views

Is is possible to recover a database from the 'raw' files (.mdf and .ldf) of the old server to a new SQL Server instance on a new server?

I have a client that has POS software called Restaurant Pro Express (RPE) from www.pcamerica.com. RPE uses a SQL Server database. Their old POS server had a hardware failure, but I was able to attach ...
5
votes
2answers
370 views

SQL Server log file used pecentage does not drop after multiple backups

SQL Server 2005 I ran "dbcc SQLPerf(logspace)", then took two log backups, and ran "dbcc SQLPerf(logspace)" again. No change from 48.55% used, even though "dbcc opentran (foo)" says that there are no ...
3
votes
1answer
156 views

Enabling Constraint Silently Fails

Why would SQL Server silently fail to re-enable a foreign key constraint? I recently attempted to re-enable a number of constraints using ALTER TABLE. Most enabled successfully; however, minority of ...
0
votes
1answer
39 views

all rows from left table with sum of amount from right table

I'm trying to return a list of customers and the sum of their transactions in the last week, but have the query return customers who didn't wager at all. I am trying to do this with a left join, but ...
0
votes
1answer
38 views

SQL server data copy bug? [closed]

I have one query who shows some data, and those data I'm manually copying to Table1. The query shows the numeric type and it is in this form Query +---------------+ | status ...
2
votes
0answers
39 views

Join duplicates on T-sql [closed]

Background: This is largely a learning exercise. I am working on a task scheduling program. Part of the program requires making a report to print out. I am working with the original version of the ...
1
vote
1answer
61 views

microsoft sql server schema [closed]

From blog.sqlauthority.com: Protecting ISV database access: in custom ISV (Independent Software Vendor) applications, the database schemas are usually complex, and in the case of applications such ...
0
votes
0answers
38 views

Converting Legacy SQL Server 2005 Stored Procedure to Transaction based for parallelism [closed]

My task is to convert a legacy stored procedure written in SQL Server 2005 so that it can be used in parallel (multiple executions from different users). As of now the stored procedure is designed ...
2
votes
1answer
137 views

Tracking down unused Views and Stored Procedures

I am working on a SQL Server 2005 database that has two Microsoft Access ADP frontends. This database needs a lot of love and attention which I am attempting to give it. There are lots of stored ...