Merge Database: Difference between revisions

From High5Wiki
Jump to navigation Jump to search
Created page with "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 se..."
 
No edit summary
Line 1: Line 1:
Title: SME Merge Databases
<p class=MsoNoSpacing><b>Title:  SME Merge Databases      </b></p>


Subject:  Instructions of how to Merge SME databases.
<p class=MsoNoSpacing>&nbsp;</p>


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.
<p class=MsoNoSpacing>Subject:  Instructions of how to Merge SME databases.</p>


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.
<p class=MsoNoSpacing>&nbsp;</p>


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.
<p class=MsoNoSpacing>SME has the capability to merge databases.  For example
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.
if you have database on an outside server that needs to merge into an inside
server, the SME merge capability will manage this.</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>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.</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing><span style='position:absolute;z-index:251658240;
margin-left:222px;margin-top:188px;width:96px;height:88px'><img width=96
height=88 src="MergeDatabase_files/image001.png" alt="Right Arrow: Merge"></span>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.</p>


<p class=MsoNoSpacing><span style='position:absolute;z-index:251657216;
margin-left:349px;margin-top:36px;width:198px;height:129px'><img width=198
height=129 src="MergeDatabase_files/image002.png"
alt="Can: InsideDB (before merge)&#13;&#10;Customers: C, D, E&#13;&#10;"></span>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.</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>


<table cellpadding=0 cellspacing=0 align=left>
<tr>
  <td width=94 height=11></td>
  <td width=108></td>
  <td width=147></td>
  <td width=203></td>
</tr>
<tr>
  <td height=100></td>
  <td rowspan=2 align=left valign=top><img width=108 height=129
  src="MergeDatabase_files/image003.png"
  alt="Can: OutsideDB:&#13;&#10;Customers: A, B, C&#13;&#10;"></td>
</tr>
<tr>
  <td height=29></td>
  <td></td>
  <td rowspan=2 align=left valign=top><img width=203 height=129
  src="MergeDatabase_files/image004.png"
  alt="Can: InsideDB (after merge)&#13;&#10;Customers: A, B, C, D, E&#13;&#10;"></td>
</tr>
<tr>
  <td height=100></td>
</tr>
</table>


&nbsp;</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>&nbsp;</p>


<p class=MsoNoSpacing>&nbsp;</p>


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.
<p class=MsoNoSpacing>&nbsp;</p>


Steps:
<p class=MsoNoSpacing>&nbsp;</p>
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.
<p class=MsoNoSpacing>&nbsp;</p>
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.
<p class=MsoNoSpacing>&nbsp;</p>
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.
<p class=MsoNoSpacing>&nbsp;</p>
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.
<p class=MsoNoSpacing>&nbsp;</p>
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.
<p class=MsoNoSpacing>&nbsp;</p>
7. Select Utilities>Utilities>Import Data
 
8. Select Merge from Database and select run it.
<p class=MsoNoSpacing>&nbsp;</p>
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:
<br clear=ALL>
a. Within SQL Management Studio, right click on the OutsideDB and select detach and follow the instructions.
 
<p class=MsoNoSpacing>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.</p>
 
<p class=MsoNoSpacing>&nbsp;</p>
 
<p class=MsoNoSpacing>Steps:</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Note:
Be sure to have backups, especially of the InsideDB.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>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.</p>
 
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>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.</p>
 
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>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.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Copy
the files created from step 2 to the Inside server.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>From
the inside SQL Server, run SQL Management studio so you can attach OutsideDB to
this SQL Server instance.</p>
 
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>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.</p>
 
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>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.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>You
are now ready to merge.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>6.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Run
SME on the Inside server.  Select InsideDB.  It’s important to run SME on the
database that is going to be merged into.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>7.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
Utilities&gt;Utilities&gt;Import Data</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>8.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
Merge from Database and select run it.</p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>9.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
OutsideDB and select Ok to start the merge.<img width=624 height=300
id="Picture 4" src="MergeDatabase_files/image005.jpg"></p>
 
<p class=MsoNoSpacing style='margin-left:.5in;text-indent:-.25in'>10.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>When the merge is
completed, you can detach the OutsideDB from the inside sql server as follows:</p>
 
<p class=MsoNoSpacing style='margin-left:1.0in;text-indent:-.25in'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Within
SQL Management Studio, right click on the OutsideDB and select detach and
follow the instructions.</p>

Revision as of 22:42, 5 August 2011

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.

 

<img width=96 height=88 src="MergeDatabase_files/image001.png" alt="Right Arrow: 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.

<img width=198 height=129 src="MergeDatabase_files/image002.png" alt="Can: InsideDB (before merge)&#13; Customers: C, D, E&#13; ">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.

 

<img width=108 height=129
 src="MergeDatabase_files/image003.png"
alt="Can: OutsideDB:&#13; Customers: A, B, C&#13; ">
<img width=203 height=129
 src="MergeDatabase_files/image004.png"
alt="Can: InsideDB (after merge)&#13; Customers: A, B, C, D, E&#13; ">

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


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.<img width=624 height=300 id="Picture 4" src="MergeDatabase_files/image005.jpg">

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.