Solved

Moving SQL 2005 databases to new hardware

Posted on 2009-03-30
6
833 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 21

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
Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

 
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 21

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Agent Timeout 5 71
Anyway to make these 2 SQL statements into one? 13 45
View SQL 2005 Job package 16 77
Change this SQL to get all nodes 3 41
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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