Merge Database

From High5Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Title:  SME Merge Databases     

 

Subject:  Instructions of how to Merge SME databases.

 

SME has the capability to merge databases.  For example if you have database on an outside server that needs to merge into an inside server, the SME merge capability will manage this.

 

Please note that lots of data is transferring for merge functionality and it’s not reversible or undo-able. It’s critical to have backups of both databases prior to doing the merge.

 

For purposes of this instructions we will consider an Outside database called OutsideDB that will be merged into an Inside database called InsideDB.  Your database names will be different.

Below is an example of merging OutsideDB into InsideDB.  All new customers from the outside are copied into the inside.  All matching customers from Outside and Inside are not touched.  Any customers in Inside database only database are not touched.


Summary of steps:  You need to get the OutsideDB attached to the SQL Server that the InsideDB is running on.  Once you attach the OutsideDB to the Inside SQL Server, then it is ready for the merge.

 

Steps:

1.       Note: Be sure to have backups, especially of the InsideDB.

2.       From the outside SQL Server, get a copy of the database files.  There are two ways to do this: either make a backup or detach the database from the Outside SQL Server make copies and then reattach.

a.       Option 1, Backup method:  From SQL Management Studio on the Outside SQL Sever, select the OutsideDB, right click and select backup.  Select the location to save the backup.

b.      Option 2, Detach method:  From SQL Management Studio on the Outside SQL Server, select OutsideDB and right click and select detach and follow the instructions to detach.  Then make copies of the OutsideDB.mdf and OutsideDB_log.ldf files.

3.       Copy the files created from step 2 to the Inside server.

4.       From the inside SQL Server, run SQL Management studio so you can attach OutsideDB to this SQL Server instance.

a.       Option1, Backup method from step 2: Right click on the database and select Restore.  Select the backup file from step 3 to restore and follow the instructions.

b.      Option 2, Detach method from step 2:  Right click on the database and select Attach.  Select the files copied from step 3 and follow the instructions.

5.       You are now ready to merge.

6.       Run SME on the Inside server.  Select InsideDB.  It’s important to run SME on the database that is going to be merged into.

7.       Select Utilities>Utilities>Import Data

8.       Select Merge from Database and select run it.

9.       Select OutsideDB and select Ok to start the merge.

10.   When the merge is completed, you can detach the OutsideDB from the inside sql server as follows:

a.       Within SQL Management Studio, right click on the OutsideDB and select detach and follow the instructions.