Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Moving SQL 2005 databases to new hardware

Posted on 2009-03-30
6
Medium Priority
?
838 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 22

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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 7

Assisted Solution

by:luani
luani earned 800 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 200 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 22

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

610 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