473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Migrating large amounts of data from SQL Server 7.0 to 2000

I'm in the process of migrating a lot of data (millions of rows, 4GB+
of data) from an older SQL Server 7.0 database to a new SQL Server
2000 machine.

Time is not of the essence; my main concern during the migration is
that when I copy in the new data, the new database isn't paralyzed by
the amount of bulk copying being one. For this reason, I'm splitting
the data into one-month chunks (the data's all timestamped and goes
back about 3 years), exporting as CSV, compressing the files, and then
importing them on the target server. The reason I'm using CSV is
because we may want to also copy this data to other non-SQL Server
systems later, and CSV is pretty universal. I'm also copying in this
format because the target server is remotely hosted and is not
accessible by any method except FTP and Remote Desktop -- no
database-to-database copying allowed for security reasons.

My questions:

1) Given all of this, what would be the least intrusive way to copy
over all this data? The target server has to remain running and be
relatively uninterrupted. One of the issues that goes hand-in-hand
with this is indexes: should I copy over all the data first and then
create indexes, or allow SQL Server to rebuild indexes as I go?

2) Another option is to make a SQL Server backup of the database from
the old server, upload it, mount it, and then copy over the data. I'm
worried that this would slow operations down to a crawl, though, which
is why I'm taking the piecemeal approach.

Comments, suggestions, raw fish?
Jul 20 '05 #1
2 1917
se****@thegline.com (Serdar Yegulalp) wrote in message news:<84**************************@posting.google. com>...
I'm in the process of migrating a lot of data (millions of rows, 4GB+
of data) from an older SQL Server 7.0 database to a new SQL Server
2000 machine.

Time is not of the essence; my main concern during the migration is
that when I copy in the new data, the new database isn't paralyzed by
the amount of bulk copying being one. For this reason, I'm splitting
the data into one-month chunks (the data's all timestamped and goes
back about 3 years), exporting as CSV, compressing the files, and then
importing them on the target server. The reason I'm using CSV is
because we may want to also copy this data to other non-SQL Server
systems later, and CSV is pretty universal. I'm also copying in this
format because the target server is remotely hosted and is not
accessible by any method except FTP and Remote Desktop -- no
database-to-database copying allowed for security reasons.

My questions:

1) Given all of this, what would be the least intrusive way to copy
over all this data? The target server has to remain running and be
relatively uninterrupted. One of the issues that goes hand-in-hand
with this is indexes: should I copy over all the data first and then
create indexes, or allow SQL Server to rebuild indexes as I go?

2) Another option is to make a SQL Server backup of the database from
the old server, upload it, mount it, and then copy over the data. I'm
worried that this would slow operations down to a crawl, though, which
is why I'm taking the piecemeal approach.

Comments, suggestions, raw fish?

I never had any trouble using DTS for this, but if you are not allowed
to, dumping the old database and restoring the Data into a new
database on the 2000 machine is ok. If transactions are slowed down
depends on the server's performance, but on decent hardware there
should be no trouble at all.
The advantage is, that it really saves time.
If you are going to use a dumpfile, remember to check for orphaned
user names...

Steve
Jul 20 '05 #2
Serdar Yegulalp (se****@thegline.com) writes:
I'm in the process of migrating a lot of data (millions of rows, 4GB+
of data) from an older SQL Server 7.0 database to a new SQL Server
2000 machine.
From this it sounds that you are simply upgrading. But in such case,
the simplest would be to either backup the database on SQL7 and
then restore on SQL2000 or use sp_detach_db and sp_attacb_db. So I
assume that from your questions, that you are merging the SQL7 into
an existing SQL2000 database.
Time is not of the essence; my main concern during the migration is
that when I copy in the new data, the new database isn't paralyzed by
the amount of bulk copying being one. For this reason, I'm splitting
the data into one-month chunks (the data's all timestamped and goes
back about 3 years), exporting as CSV, compressing the files, and then
importing them on the target server. The reason I'm using CSV is
because we may want to also copy this data to other non-SQL Server
systems later, and CSV is pretty universal. I'm also copying in this
format because the target server is remotely hosted and is not
accessible by any method except FTP and Remote Desktop -- no
database-to-database copying allowed for security reasons.
Chopping the data into many files, seems like a difficult path to
take. You get more administration, and you run the risk that somehow
lose a file in transport somewhere. If you want to bulk load in pieces
you can still do that, since BCP has option to only copy some of the
rows in the host file.

The main advantage with extracting the data to files, is that you don't
have to copy indexes, metadata all that over the wire. Then again, if
the connection is reliable, and you upload a backup of the database
before you go home, it should be on the target server the morning after.
1) Given all of this, what would be the least intrusive way to copy
over all this data? The target server has to remain running and be
relatively uninterrupted. One of the issues that goes hand-in-hand
with this is indexes: should I copy over all the data first and then
create indexes, or allow SQL Server to rebuild indexes as I go?

2) Another option is to make a SQL Server backup of the database from
the old server, upload it, mount it, and then copy over the data. I'm
worried that this would slow operations down to a crawl, though, which
is why I'm taking the piecemeal approach.


There is some information missing here. Do you load data into new tables
or existing ones? If you load into existing tables, it depends on how
these are accessed. The main problem could be that users are locked out
from tables being loaded. Consistency is another matter. What about
constraints?

In the end, if it is critical that the impact is as low as possible, the
best is to take a backup of the target database and benchmarck various
techniques.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3

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

Similar topics

0
by: steve | last post by:
I am having huge problems migrating large db’s from one server to another. I use phpmyadmin to dump the data into a file, and then migrate it to my production server. Then I try to use this:...
4
by: jeff brubaker | last post by:
Hello, Currently we have a database, and it is our desire for it to be able to store millions of records. The data in the table can be divided up by client, and it stores nothing but about 7...
10
by: Digety | last post by:
We are looking to store a large amount of user data that will be changed and accessed daily by a large number of people. We expect around 6-8 million subscribers to our service with each record...
4
by: oshanahan | last post by:
Does anyone have ideas on the best way to move large amounts of data between tables? I am doing several simple insert/select statements from a staging table to several holding tables, but because...
0
by: vijay | last post by:
Hi, I have an ASP.NET application running on a multi-processor Windows 2003 server. The application has been behaving perfectly well for the last couple of months. Yesterday, we started...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
10
by: nflacco | last post by:
I'm tinkering around with a data collection system, and have come up with a very hackish way to store my data- for reference, I'm anticipating collecting at least 100 million different dataId...
0
by: cathy25 | last post by:
Hi, we are planning on migrating our sql from version 2000 to 2005 (I know SQL 2005 is in market from a while). As a part of testing, i have installed sql server 2005 on my development box and able...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.