This tag is specifically for the 2000 version of Microsoft SQL Server

learn more… | top users | synonyms

15
votes
4answers
5k views

How can I tell WHY an insert on a certain table is slow?

I know that an INSERT on a SQL table can be slow for any number of reasons: Existence of INSERT TRIGGERs on the table Lots of enforced constraints that have to be checked (usually foreign keys) Page ...
11
votes
3answers
2k views

Should I migrate data using detach/copy/attach or through backup-restore-replay?

I am about to embark on migrating database files to a new SAN (from an old SAN) abd I have a couple of options to implement this. (1) It was suggested that I look into the level of effort of restoring ...
11
votes
2answers
3k views

How do you reset the sa password?

I lost the sa password on a machine, and when I log in to the machine directly using an account in the admin group, SQL Server Management Studio will not allow me to log in using Windows ...
10
votes
6answers
3k views

Suddenly Slow Execution Plan for Stored Proc

I'm trying to understand an issue we're having with SQL Server 2000. We are a moderately transactional website and we have a stored proc called sp_GetCurrentTransactions which accepts a customerID, ...
10
votes
1answer
717 views

Are there reasons why I should not set my db owner to [sa]?

Yesterday I asked this question regarding changing the dbo of multiple databases that I have. The change makes sense, but I want to be clear. Is there any, good reason or circumstance why I should ...
9
votes
1answer
763 views

How can I make a query take a specific amount of time?

I am testing a monitoring application against a SQL Server 2000 instance. How can I write a T-SQL query that takes an amount of time that I specify? For example, most scripting languages have ...
9
votes
3answers
2k views

How to delay SQL Server startup

When we boot SQL Server, SAN drives might not be availiable yet. Is there a way to delay SQL Server start by 1 minute? Right now we have to restart SQL Server after we boot the server.
8
votes
1answer
4k views

Upgrade SQL Server 2000 database to 2008 R2 and enable new features

I have recently upgraded SQL Server 2000 database to 2008 R2. What I did was: Shutdown SQL Server 2000 (express) service on old machine, Move datafiles (mydatabase.mdf and mydatabase.ldf) to new ...
8
votes
2answers
4k views

Can I connect to a SQL Server 2000 instance from SQL Server Management Studio 2012?

I would like to update my development machine to SQL Server 2012 but I still manage some (very old) SQL Server 2000 machines. Wil my 2012 SSMS be able to connect to those SQL Server 2000 machines? ...
7
votes
3answers
9k views

Upgrade process from SQL Server 2000 to SQL Server 2012

I have a SQL Server 2000 database that I would like to upgrade to SQL Server 2012 (running on a different server). I don't think there is a direct upgrade path, but if there is, what is it? My ...
7
votes
1answer
532 views

Transactional replication from SQL Server 2000 to 2008

I have legacy databases on two SQL Server 2000 servers that I am trying to replicate to a SQL Server 2008 R2 database using transactional replication. The 2008 server is not in the same LAN, so I am ...
7
votes
2answers
10k views

Could not continue scan with NOLOCK due to data movement

We run SQL Server 2000 and we get a few of these errors every night. Could not continue scan with NOLOCK due to data movement The query that throws this error is a large complex query that joins ...
6
votes
4answers
645 views

How can I tell if my SQL Server DB performance is hardware-limited?

Testing an app currently under single-user load - as the test data has increased to production sizes (400k-2M rows per table), some SELECT sp's are not quite fast enough anymore (with limited test ...
6
votes
1answer
251 views

Is there a quickish, straighforward way to measure Transactions Per Second on SQL Server 2000?

The sys.dm_os_performance_counters DMV introduced in SQL Server 2005 makes this task somewhat trivial. However, my Google-Fu has been blocked in finding a way to do this in SQL Server 2000. How can ...
6
votes
1answer
3k views

SQL Server 2000 : List and Disable all triggers

I have to do a database cleanup for one of our databases on a sql server 2000 environment. The cleanup basically includes the disabling of all triggers, deletion of all old data, enabling of the ...
5
votes
3answers
2k views

Why do linked servers have a limitation of 10 branches in a CASE expression?

Why does this CASE expression: SELECT CASE column WHEN 'a' THEN '1' WHEN 'b' THEN '2' ... c -> i WHEN 'j' THEN '10' WHEN 'k' THEN '11' END [col] ...
5
votes
4answers
12k views

SQL performance issues with remote query across linked server

This sproc create proc dbo.Get_Accounts as begin declare @current_date datetime set @current_date = dbo.fn_currdate() select [fields] into dbo.current_accounts from ...
5
votes
4answers
2k views

SQL Server script to delete accounts no longer in Active Directory

We have a SQL Server 2000 that will shortly be migrated to SQL Server 2005. It has years of Windows Authentication accounts created that no longer exist in Active Directory, which prevent the Copy ...
5
votes
2answers
250 views

What is an advantage or disadvantage for not upgreading database server?

I have a legacy database server. The person who wrote it is long gone. There is no documentation at all just some comments in the code. Luckily, it is not that complicate but if I want to fix it ...
5
votes
2answers
381 views

Optimizing IP Range Search?

I have a simple query and table, and I would like to know which indexing is efficient on this kind of table and query. In my table I have 3 columns CREATE TABLE mYTable(ipFrom BIGINT, ipto BIGINT, ...
5
votes
1answer
937 views

Migrate DTS Jobs to 2008 Server

We have been running SQL Server 2000 for years. Finally, at long last, we have an SQL 2008 Server being shipped in. We have many DTS jobs on our SQL 2000 Server that need to be migrated to the SQL ...
5
votes
2answers
132 views

querying a table of events for reporting

The background (masking a real-world problem behind a word problem) Farmer Brown has a peach orchard in California and ships hundreds of thousands of peaches all across the country. When a shipment ...
5
votes
2answers
242 views

SQL Server 2000 - 'Performance: Deadlock'

We had to restart our SQL Server today, we had made no changes to it. When it came back up we immediately started getting this error from the server DATE/TIME: 2/27/2014 3:09:31 PM ...
5
votes
2answers
139 views

Thought about this SQL Server backup plan?

I just started a new job, and I'm reviewing the database maintenance plan. I've got quite a bit of experience writing SQL, but not much experience with DB administration. My last job was at a large ...
5
votes
1answer
258 views

Copy a SQL Server 2000 database to another box without interrupting the backup chain

I have a small-but-important MS SQL Server 2000 database that I'd like to copy to a development box. I understand that the usual way to do this is to make a copy of a full backup file, and restore ...
4
votes
2answers
182 views

Finding longest matching prefix

I have two tables: Sources: (SName) (SId) Apple1 100 Apple2 200 Banks 300 BanksB 400 Bankerly 500 Prefixes: (PName) (PId) App 1 Bank 2 Banker 3 My goal: To find the longest ...
4
votes
1answer
327 views

hostname incorrect in sysprocesses

I'm running SQL Server 2000. While doing some profiling to trace activity, I noticed some hostnames showing up that were mysterious -- names that shouldn't exist on the network anymore. I got the MAC ...
4
votes
2answers
2k views

SQL 2000 - tsql to find out failed jobs in last 24 hours

I want to find out which sql agent jobs failed in last 24 hours... How can I find it using TSQL for SQL 2000? Regards Manjot
4
votes
1answer
204 views

Is there a behavior change between SQL Server 2000 and SQL Server 2008 R2 OPTION (FAST 1)?

This is question 2 of 2 related to the FAST query hint. Background Information (as an aside, I'm not trying to garner more rep, I'm trying to be true to only asking one question per question). Our ...
4
votes
5answers
409 views

Improving SQL Server performance on VMware under Linux

I have a Linux server in a small company (3 users) acting as a domain server and running two VMs under VMware: one has SQL Server 2000 on it and one has SQL Server 2005, in each case running on ...
4
votes
1answer
363 views

SQL Server 2008 upgrade advisor tool

We upgraded to SQL Server 2008 from SQL Server 2000. But due to some legacy scripts/queries in our health care application, that run only in 2000, we had to run 2008 version on backwards compatibility ...
4
votes
2answers
819 views

Log Reader replication agents are constantly restarting

I am recreating (push) transactional replication from a SQL 2000 instance to a SQL 2008 instance which I had to break in order to do a db migration. The 2008 instance is both the distributor and a ...
4
votes
1answer
100 views

Possible pitfalls of condensing 2 SQL Server instances into 1

I currently have 2 SQL Server 2000 database instances (each running on a different physical server), each containing around 12 databases (not all are active). We are planning an upgrade to SQL Server ...
4
votes
2answers
1k views

Query execution showing error as login failed

I want to retrive the table values from other server Query EXEC sp_addlinkedserver @server = 'OPSERVER', @srvproduct = 'SQL Server' EXEC sp_addlinkedsrvlogin @rmtsrvname = 'OPSERVER', @rmtuser = ...
4
votes
3answers
186 views

How to monitor how much data is transfered in a linked server?

I have a linked server to a remote computer and doing some insert, update and delete operations between local and remote databases. I want to know how much data is transfered when operation is doing. ...
3
votes
4answers
4k views

Query without having to specify table's schema

I imported a bunch of tables from SQL Server 2000 to my 2008 database. All the imported tables are prefixed with my username eg: erpadmin.tablename. In the table properties it lists 'erpadmin' as the ...
3
votes
2answers
1k views

SQL Server how to detect unused views and/or get usage stats

Is there a way to determine in SQL Server if a view is no longer being used? (without removing it) Ideally i would like to know usage for SQL Server 2000 as well as 2012 if that is possible. I am ...
3
votes
2answers
5k views

How to migrate from SQL Server 2000 to SQL Server 2008 R2 Express Edition

I have been trying to migrate a database from SQL Server 2000 (part of SBS 2003) to SQL Server 2008 R2 Express Edition I naively tried using the SQL Server Export and Import wizard. This has worked ...
3
votes
2answers
848 views

Installed SQL Server 2000 with wrong collation.. how to correct for entire server instance?

I installed SQL 2000 Developer (yes, old, don't ask) on my laptop ... with the wrong collation. Oops! It's showing Latin1_General_CI_AS, but it turns out I need to use SQL_Latin1_General_CP1_CI_AS ...
3
votes
6answers
605 views

Can SQL Server 2000 and SQL Server 2012 CoExist?

We have OLTP Databases on SQL Server 2000 on my client's Prod Server. Planning to create Data Warehouse on the same Server but use SQL Server 2012. Can I install without any issues?
3
votes
2answers
2k views

How group with min(date) and select an another column in the same table

I have a query who return something like it : Name Gender Job date of hire John M mechanic 2012-05-08 John M electrician 2010-01-01 Vicky F scientific 2012-11-11 Bob ...
3
votes
1answer
782 views

How to figure out what a DTSRun command is doing

I have taken over a SQL 2000 database. I am trying to figure out what a job is doing. Its command is: DTSRun /~....a big hex string.... I have tried to run: DTSRun /~....a big hex string.... /!Y ...
3
votes
1answer
303 views

Can sql server 2000 and 2012 coexist on the same server?

I see that 2005/2008/2012 can all coexist but can't find anything on 2000 with 2012.
3
votes
2answers
94 views

SQL server 2000 transactions with the same time

I have a BIG problem here. I'm creating a program that can be looping if the connection to the server is broken. But when the program is running for a few months, I found a bug on SQL server 2000. I ...
3
votes
1answer
642 views

Using (NOLOCK) in a READ COMMITTED transaction block

We're using SQL Server 2000. I'm wondering what the risks are if we use a NOLOCK hint within a READ COMMITTED transaction block, for example: SET TRANSACTION ISOLATION LEVEL READ COMMITTED GO BEGIN ...
3
votes
1answer
851 views

SQL 2000 Maintenance Scripts

Hi I've stumbled into the administration of a Legacy SQL 2000 server that has had next to no maintenance for the past 8 years (and is very slow). As I have only been doing DBA / PT for the past 2 ...
3
votes
1answer
648 views

Where is this mystery trace going (SQL Server 2000)?

We had a sudden disk usage explosion this morning and the SQL monitor has no useful query information. I decided to check on any potential traces that could have captured something. SELECT * FROM :: ...
3
votes
1answer
867 views

recover broken msde 2000 8.0 database

i have a msde (mssql) 2000 / v8.0 database that has one corrupted table. Microsoft SQL Server Management Studio Express can see the database STRUCTURE, but not the data. i can see the DATA of the ...
3
votes
4answers
1k views

tempdb in sql server

Using SQL Server 2000, I am getting the following error. The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space." How to solve it? I ...
3
votes
2answers
728 views

Shrinking SQL Server 2000 database

I apologize for the long question. I am trying to learn a lot on the fly as I have become the defacto SQL Admin. I have been tasked with moving a production database to a new server. My goal is to ...