473,503 Members | 12,175 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to move a database from 2005 to 2000?

Hello,

I have a database in 2005 that I'd like to copy and attach in 2000. Is this
possible? if so, how do I do it? I've tried doing a number of things from
just trying to attach to the db file to trying to export and import via
access and I can't seem to get anything to work.

Any help would be greatly appreciated.

Thanks!
Rick
Sep 7 '06 #1
1 4342
Rico (me@you.com) writes:
I have a database in 2005 that I'd like to copy and attach in 2000. Is
this possible? if so, how do I do it? I've tried doing a number of
things from just trying to attach to the db file to trying to export and
import via access and I can't seem to get anything to work.
You cannot attach a database from SQL 2005 on SQL 2000. When the developers
completed SQL 2000, they did not what know would be in the product five
years later.

To copy the schema, right-click the database in Mgmt Studio and select
Tasks->Generate Script. There is a setting to force SQL 2000 syntax,
you need to select that one. (I seem to recall that there was a bug
with this in SQL 2000 RTM, so make sure that you have SP1.)

If memory serves, create of foreign keys is at the end. In any case,
split the script so that FKs are in a script of their own. Run only
the script without the FKs. Beware that copying the schema can only be
completed successfully, if there is on use of new features in SQL 2005 in
the database.

To copy the data run this:

SELECT 'BCP db..' + name + ' out ' + name + '.bcp -T -S server2005 -n'
FROM sys.objects
WHERE type = 'U'
AND objectproperty(object_id, 'IsMSShipped') = 0

Copy and paste result, run from a command-line window. Then change
the above to:

SELECT 'BCP db..' + name + ' in ' + name + '.bcp -T -S server2000 -n ' +
case when ident_current(name) is not null then ' -E' else '' END
FROM sys.objects
WHERE type = 'U'
AND objectproperty(object_id, 'IsMSShipped') = 0

Copy, paste and run again.

Finally rnn the script with the FK:s.

Note the BCP stuff assumes that you have everything in the dbo schema,
as is the only thing that makes sense on SQL 2000.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Sep 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1262
by: cfmx | last post by:
I'm needing to move a database from SQL 7 to SQL 2000. What is the best way to accomplish this and keep all tables, data, permissions, etc in place throughout the move. Should I use BCP,...
3
8833
by: nai | last post by:
Hi all, I have a database with 20GB transaction log file. The recovery model of the database is Full. I need to move the T. log file to a new location with the minimal downtime. I know I can...
0
1551
by: Hongbo | last post by:
Hi, I have a test server with Windows 2003 Standard Server. SQL Server 2000 Standard Edition was installed earlier as default instance. My ASP.Net web site works fine with the connection...
8
16663
by: Mark D Powell | last post by:
I obviously did not search the archives on the right terms so what is the easiest and fastest way to move a 3G database from a nearly full C drive to the nearly empty D drive that should have been...
1
1758
by: testbox | last post by:
I have a MSSQL2000 box with a large database containing circa 150 SP's. I want to move the DB to another SQL machine, but many of the SP's have references to the name of the current machine. Is...
10
12656
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
2
4159
by: sqlgirl | last post by:
Hi, We have 2 servers. Server1 is a 2000 box, with SP3 (yes I know it is not up to date). Server2 is a 2005 box, SP2. I set up Server1 (2000) to have a linked server to Server2 (2005). The...
1
6704
by: Jeremy Pavleck | last post by:
Just curious if it's possible, and supported, to upgrade SQL 2005 from 32bit to 64bit. This is on top of Windows 2003 64bit. Trying to get the proper supported config for OM2k7 without blowing...
0
1320
by: peridian | last post by:
Hi, Apparently, even if you set the database type to 2000, when you create a database in 2005, it is marked as 2005 regardless, and you cannot then mount the files on a 2000 installation. This...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.