473,399 Members | 3,106 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,399 software developers and data experts.

How to copy data from backup or data files to new SQL installation?

Hi,

I have(had) an old Win2k Server server with about 30 web site databases
(SQL 2000) that just went under due to hardware problems. Thankfully, I
have backups of all the databases plus the MDF and LDF files from the
hard drive.

I want to move all of these sites and their data to a newer server
(Win2003) running SQL2000.

What's the best way to copy the database from the old server hard drive
(now mounted as an extrnal drive to a local machine; I'm currently
FTPing all of the web site directories from it to the new server)?

Just upload the original data to the new server and then mount the MDF
and LDF files within the new SQL server? Or do I restore the backup
files in the new SQL2000?

All of my previous data migrations have been DTS operations from one
live server to another, so no experience with either of the above
scenarios. I'll certainly have a lot more experience at one of them by
the time this weekend is through.

Thanks for any help you can offer.
Dec 10 '05 #1
1 5049
Byron (sp*******@dorrk.com) writes:
I have(had) an old Win2k Server server with about 30 web site databases
(SQL 2000) that just went under due to hardware problems. Thankfully, I
have backups of all the databases plus the MDF and LDF files from the
hard drive.

I want to move all of these sites and their data to a newer server
(Win2003) running SQL2000.

What's the best way to copy the database from the old server hard drive
(now mounted as an extrnal drive to a local machine; I'm currently
FTPing all of the web site directories from it to the new server)?

Just upload the original data to the new server and then mount the MDF
and LDF files within the new SQL server? Or do I restore the backup
files in the new SQL2000?


There are two ways to go:

1) Copy the MDF and LDF files to the local disk of the new server,
and use sp_attach_db to attch them. (You can also do this from
Enterprise Manager, but since you have about 30 databases, it
much better to do this from a query window, as you can write a
script, so that you can see exactly what you are about to do.)

2) Restore the backup files. Again, I recommend doing this from a
script. Note that you don't have to create the database in advance.
This is a little more laboursome, since you need to know the
logical name of the database files. These can be retrieved with
RESTORE FILELISTONLY. If all databases are created in the same
way, you may be able to guess the names.

Since you have had hardware problems, I would recommend that you are
prepared to go both ways. The MDF/LDF are likely to be fresher than
the backups (but you know when you took the backups). I'm a little
nervous, though, that if the server crashed the last thing it did,
that the file maybe damaged. But if you have both MDF and LDF, you
should be safe. And, oh, keep an eye for NDF files, that is secondary
data files, in case you have any.

Once you have the databases in place, you still have to sort out logins
and users. I assume that you readd logins to the new servers in some
way. In each database, there are a couple of users, and typically the
login "joe" mapped to the login "joe" on the old server. When you
restore the database on the new server, all this will be broken, so
that the login "joe" maps to the user "anne", and some users do not
map at all. The procedure sp_change_users_login can be used for this.


--
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
Dec 10 '05 #2

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

Similar topics

4
by: Bishop | last post by:
For example the files in a computers windows directory and profile directory that the application is running on.
5
by: Kevin | last post by:
Can anyone recommend the easiest way to get a full copy of a database from one server to another. The servers are not part of the same organization or network. I have received a backup of the...
4
by: oceanhai | last post by:
We currently have a PPTP connection set up for our developers to access our development SQL server through a VPN tunnel. When they need to copy tables up to the dev SQL from their local machine...
0
by: durumdara | last post by:
Hi ! I have some backup files on a server farm. I want to store these local backup files on a backup file server for "safety's snake". These files are compressed zip files with 12 character...
5
by: Deano | last post by:
I'm experiencing bloat problems when I restore my backup files. Users can take a look at the reports of any previous backup without having to ensure they have a backup of their current data - this...
5
by: kebuchan | last post by:
Hi all, I know this is possible in Oracle but has anyone done it in DB2 and could you maybe direct me to some documentation or let me know how I would go about doing it? In the oracle world...
1
by: aj | last post by:
DB2 LUW 8.2 FP14 Red Hat AS 2.1 I went to restore a backup of my production DB on my test/developmental server. The backup on the prod system was taken /before/ alt_obj() was used there to do...
5
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. ...
3
by: maheshkadam | last post by:
Hi friends I am new to perl so please guide me. I have one application which created backup log file every day.But it appends that file so you can see logs for different day in one file only. ...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.