Tuesday, March 27, 2012

Getting a database on one server to match another

Hello,
We have two servers and want out production db on server 1
to match the production server on server 2.
Whats the best way of doing this?
One time only or regularly?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Sarah" <anonymous@.discussions.microsoft.com> wrote in message news:4c2201c42c35$3362d360$a001280a@.phx.gbl...
> Hello,
> We have two servers and want out production db on server 1
> to match the production server on server 2.
> Whats the best way of doing this?
>
|||Hi,
Install the SQL Server in Server 2 with the identical directory structure
and service packs. After that
1. Stop SQL Server service in both servers
2. Copy the MDF and LDF from server1 to server 2 including system databases
3. Start the SQL server in server 2 and check all databases are ok. If ok,
change the server name in server 2
using sp_dropserver and sp_addserver <servernam>,Local (Refer books
online for syntax usage)
4. Start the server 1.
If you need to keep the server2 always sync with server 1 then go for one of
the below strategies:-
1. Logshipping
2. Transactional Replication
Thanks
Hari
MCDBA
"Sarah" <anonymous@.discussions.microsoft.com> wrote in message
news:4c2201c42c35$3362d360$a001280a@.phx.gbl...
> Hello,
> We have two servers and want out production db on server 1
> to match the production server on server 2.
> Whats the best way of doing this?
>
|||Sarah,
Several options in my order of preference:
1) Backup the DB on server1 and restore to server2
2) Detach on server1 and attach on server2
3) DTS
Microsoft Knowledge Base Article - 224071
INF: Moving SQL Server databases to a new location with Detach/Attach
http://support.microsoft.com/default...b;EN-US;224071
Microsoft Knowledge Base Article - 304692
INF: Moving SQL Server 7.0 Databases to a New Server with BACKUP and RESTORE
http://support.microsoft.com/default...b;EN-US;304692
Microsoft Knowledge Base Article - 314546
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?kbid=314546
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"Sarah" <anonymous@.discussions.microsoft.com> wrote in message
news:4c2201c42c35$3362d360$a001280a@.phx.gbl...
> Hello,
> We have two servers and want out production db on server 1
> to match the production server on server 2.
> Whats the best way of doing this?
>

No comments:

Post a Comment