Solved

Moving SQL 2005 databases to new hardware

Posted on 2009-03-30
6
832 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 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

825 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