Skip to Content

Copy of Database Copy Note

>>> This is a copy of SAP Note number 1594214.  Reproduced for the SCN by permission.

This note provides the basic steps that are required to take a SAP Sourcing database instance from one environment and apply it to a different environment. For example, taking a database instance for a production environment and utilizing it in a development environment. Some steps provided require specific SQL statements to be executed. Those specific statements are not provided here, but rather are described in concept here. This note also assumes that the backup procedures will backup only SAP Sourcing related tables (i.e., this procedure should not be used if the backup also includes NetWeaver related tables).

NOTE: The system that is being used as the Source system should have little to no activity on it.

1.      Take a database backup of the environment to be replaced (Target System).

This will allow for restoration in the event that the write-back is not successful. 

2.      In the application instance to be copied (Source System), perform the following:

a.  Confirm that the #automatically add services to cluster# setting is checked in the System Default Cluster configuration. If it is not checked, check it now and save the cluster, prior to the next steps.

b.  Confirm that there are no messages in the #queued messages#.  This ensures that when the database is copied to the new environment, no queued messages are sent.

3.      Ensure that no users are logged into the application instance of the Source System.

4.      Stop the Sourcing/CLM Application in the Source System.

5.      Take a database backup / Export the user/schema of the Source System.  The specific procedure to be determined and provided by the DBA.

NOTE: There should not be ANY errors, if there are they should be corrected / explained before proceeding.  This ensures that no errors are copied to the new Target system. 

6.      Shut down Target Application environment

7.      Create a NEW (empty) User/Schema per requirements in the Installation Guide. 

NOTE: This step is critical that the Target system is a new (empty) schema.

8.      Import the database into the User/Schema that was created in step 7.  The specific procedure to be determined and provided by the DBA.

9.      ***OPTIONAL*** Using SQL, overwrite all email addresses in the copied database with a valid email address (use of an invalid email address will result in downstream issues so should not be done). It is best to use a generic internal email account that can receive the email messages. This ensures that buyer and supplier users are not inadvertently informed of upcoming events in the system. Email addresses are stored in the User Account and Supplier Contact tables.

NOTE: If you choose not to do this step, it is strongly advised that you do NOT change the “delete” rule that you set in the Mail Configuration (step 2b) so that Suppliers in this new environment do NOT get mail.   

10.     Run the configure utility to reset the database connection information.

NOTE: If the application context is changed, or if additional custom jars are added, the .ear/.sca will need to be re-built and re-deployed. 

11.     Start up the environment with the database copy (Target System)   

a.  Check the application log to determine the application started.  Look for the following sequence in the logs:

Successful 5.X Startup contains a sequence like this:

Setting static content refresh time to 86400 seconds.

Servlet starting

IMBOFrameworkServlet starting

Setting default UI transaction timeout to 300000 milliseconds

AjaxServlet starting

CustomContentServlet starting

UtilServlet starting

runtime status: free/total = 2385313/3088384 kb, max = 3088384 kb, hitrate = 0.0 pgs/sec, active = 0 pgs, users = 0, ct = 0

Successful 7.X Startup contains a sequence like this:

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001A500001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.install.sysinfo.mbeans.MBeanRegistrationServlet.init#ume_dude#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;sessionid=system-7430;tenantid=\#system\#;username=system;registered SAP MBean: :SAP_J2EEApplicationPerNode=sap.com/E-Sourcing-Server,SAP_J2EECluster="",SAP_J2EEClusterNode="",j2eeType=SAP_ApplicationResourcePerNode,name=SAPCacheInfo#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001A600001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.servlet.IMBOImageServlet.init#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;Setting static content refresh time to 86400 seconds.#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001A700001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.servlet.IMBOImageServlet.init#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;Servlet starting#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001A800001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.servlet.IMBOFrameworkServlet.init#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;IMBOFrameworkServlet starting#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001A900001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.util.IMBOFrameworkProcessor.<clinit>#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;Setting default UI transaction timeout to 300000 milliseconds#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001AA00001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.servlet.AjaxServlet.init#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;AjaxServlet starting#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001AB00001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.servlet.CustomContentServlet.init#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;CustomContentServlet starting#

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD001B000001AC00001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.servlet.UtilServlet.init#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Application [5]#Plain##

Facility=local4;UtilServlet starting#

....

#Info#/Applications/E-Sourcing/eso#

##sap.com/E-Sourcing-Server#000FFEE4D7BD00210000000000001A3C#9337250000000011#sap.com/E-Sourcing-Server#E-Sourcing.eso.java.com.sap.odp.display.util.SystemStatistics.computeAndLog#Guest#0##AD2A41401CED11E1807D000FFEE4D7BD#ad2a41401ced11e1807d000ffee4d7bd#ad2a41401ced11e1807d000ffee4d7bd#0#Thread[PageHitMonitorThread,5,ApplicationThreadGroup]#Plain##

Facility=local4;sessionid=system-862;tenantid=\#system\#;username=stats_monitor;runtime status: free/total = 860892/1223680 kb, max = 1224704 kb, hitrate = 0.0 pgs/sec, active = 0 pgs, users = 0, ct = 0#

12.     Login to the environment as the #system# user and check the following:

a.  System properties: Adjust system properties that refer to other systems/servers

System Level Properties

* contractgen     contractgen.km_search_webservice.url

* contractgen     contractgen.serviceurl

  j2ee            jndi.java.naming.provider.url

** messaging      messaging.smtp.mailhost

* optimization    optimization.jndi.java.naming.provider.url

  system          system.avscanner.hostname

* optional settings

** Mailhost can be set either as a system level or enterprise level property.

b.  Review the cluster configurations:

i.      In the “System Default” cluster, confirm the new service is shown and active and remove the service(s) that remain from the source system.  Save the cluster.

ii.      In the other cluster(s), add a new service member(s) using the add button on the cluster configuration UI. Then delete the service(s) that remain from the source system.  Update the hostname and port (if used). Save the cluster(s).  Make sure all cluster members added are set active and make sure the internal hostname is set correctly.

c.       (Version 7.x and up only) Update the directory configuration(s) to reflect that authentication method being used in the environment and if the host information is different, that should be updated as well.

  1. 13.  Login to the environment as the #enterprise# user and check the following:
  2. a. System properties: Adjust any system properties that refer to other systems/servers.

   1. Enterprise Level Properties

** messaging messaging.smtp.mailhost

** Mailhost can be set either as a system level or enterprise level property.

  1. b. Edit the Mail Configuration and set it to delete all email that is not going to the internal domain. 

For example:

We would like to send mail to sap.com and delete everything else.

In the company specific Mail Configuration,

Check the Use Global Rules checkbox.

Add the specific domain(s) to “send” mail

@sap.com=send;

Add the global all else delete rule.

@all=delete

Complete Rule:  @sap.com=send;@all=delete

There are other options like redirection. Consult the online SAP documentation for more information.

  1. c. (Version 5.x and earlier only) Update the directory configuration(s) to reflect that authentication method being used in the environment and if the host information is different, that should be updated as well.
  2. d. Integrated System Configurations: Ensure that any integrated system parameters are updated in the Integrated System Configuration.
  3. e. If using FTP/Scheduled imports, change all scheduled tasks to point to the proper file directories.
  4. f. Review log files for any errors
  5. g. ***Optional***Enable email via the daemon tab if required

  1. 14.  Test the updated environment

No comments