Solved

Moving SQL 2005 databases to new hardware

Posted on 2009-03-30
6
829 Views
Last Modified: 2012-05-06
Hi

I've read some of the earlier questions, but none that is 100% similar to mine, as far as I can see. The case is as follows.

Old Server.- Win 2003 Server running SQL Server 32-bit
New server - Win 2008 running SQL Server 64-bit (SP2)

Both servers are in the same domain. But the thing is that the sql server contains 967 rather small databases (Not my fault, but the ERP System we're using, it creates 5 - 6 databases each year for each company we're working on --- Jeez...!)

But the backup/restore and detach/attach routines can only be used on one db at the time (??)
Will I have to move system databases, or will these be updated with the needed info during attach routine?

I have a custom script made by ERP-developer, maybe this will be the easiest to use, it creates and runs a attach scrip automatically for all 967 dbs (sic...)

Extra info: both databases is up and runnning and have sa login.
0
Comment
Question by:Jakob Digranes
6 Comments
 
LVL 7

Expert Comment

by:luani
ID: 24017204
The database catalog will filled during the attach but if U have Jobs U have to backup and restore all the system databases.............
0
 
LVL 7

Expert Comment

by:thiyaguk
ID: 24017312
yes. you can use attach/detach method if you don't have any jobs/replication etc.,
0
 
LVL 20

Author Comment

by:Jakob Digranes
ID: 24018055
This is a rather straight forward and simple SQL install.

All I've done is install it, and the ERP-system creates and maintanes the dbs. All I ever do is run backup with Symantec BE. Så i guess theres no special jobs going, and aboslutely no replication.

But will i have to detach/attach the DBs one-by-one?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Assisted Solution

by:luani
luani earned 200 total points
ID: 24018535
you can write a script to do that. Do you have only the ERP-related databases there? Are the databases on single files?

you can so some thing like
USE master;
--set databases in single user mode prior to detach
ALTER DATABASE db1
SET SINGLE_USER;
GO

ALTER DATABASE db2
SET SINGLE_USER;
GO
--detach
exec sp_detach_db 'db1',true
exec sp_detach_db 'db2',true

--copy mdf to the new server
--then attach this part to be executed on the new server!!!

EXEC sp_attach_db @dbname = N'db1',
   @filename1 = N'c:\db1.mdf' --or wherever this file will be

EXEC sp_attach_db @dbname = N'db2',
   @filename1 = N'c:\db2.mdf' --or wherever this file will be
0
 
LVL 13

Assisted Solution

by:St3veMax
St3veMax earned 50 total points
ID: 24018624
As long as the SQLAgent is installed on both nodes; BE can backup and then restore onto the new server. My only concern would be how long this would take to accompolish as BE is very chatty and doesent always start a backup job when you want.

Try a dummy run; perhaps restore a recent full backup to see how long it takes?

HTH
0
 
LVL 20

Accepted Solution

by:
Jakob Digranes earned 0 total points
ID: 24124998
I chose the long hard winding, but safest road. DB-Attach on all 837 DBs. The use of script last time made a mess of the where databases would be stored. And the manual attach took only a couple of hours. New server's been up and running for a week - no sweat.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now