0% found this document useful (0 votes)
221 views7 pages

Cloning Oracle Transportation Management Database Schemas For 6.4.3 (Doc ID 2593800.1)

This document provides instructions for cloning Oracle Transportation Management database schemas from one database to another. It describes exporting schemas from the source database using Oracle Data Pump utilities, preparing the target database, and importing the schemas. It also includes steps for post-import tasks and modifying configuration data.

Uploaded by

Sreekar Pamu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
221 views7 pages

Cloning Oracle Transportation Management Database Schemas For 6.4.3 (Doc ID 2593800.1)

This document provides instructions for cloning Oracle Transportation Management database schemas from one database to another. It describes exporting schemas from the source database using Oracle Data Pump utilities, preparing the target database, and importing the schemas. It also includes steps for post-import tasks and modifying configuration data.

Uploaded by

Sreekar Pamu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.

Cloning Oracle Transportation Management Database Schemas for 6.4.3 (Doc ID 2593800.1)

In this Document

Abstract
Method
Naming Conventions
Prerequisites
History
Details
Export Option 1 - Clone Entire Schemas
Step 1. Export Schemas
Sample Command
Export option 2 - Export Schemas without TRANSIENT Data and with Metadata
Sample Command
Step 2. Prepare Target Database
Step 3. Import Schemas
Sample Command
3.1 Import Schemas without TRANSIENT Data Tables
Sample Command
3.2 Import TRANSIENT Data Tables Metadata
Sample Command
Step 4. Post Import Tasks
Step 5. Clean Up Data (Optional)
Step 6. Review Oracle Transportation Management Configuration Data (Optional)
Step 7. Modify Scalability Configuration Settings in the Database (Optional)
Summary

APPLIES TO:

Oracle Transportation Management - Version 6.4.3 to 6.4.3 [Release 6.4]


Information in this document applies to any platform.

ABSTRACT

This document explains how to copy Oracle Transportation Management database schemas from one database to another
for version 6.4.3 only. This procedure could be used, for instance, to copy production Oracle Transportation Management
database schemas to a test database.

Note: This note only covers the export and import of the following schemas:

GLOGOWNER, REPORTOWNER, GLOGOAQ, ARCHIVE_C, ARCHIVE_C_USER, GLOGLOAD, GLOGDBA, GLOBALREPORTUSER,


DIR_XML_USER

FTI/GTI and ADF repository schemas are not covered in this process.

1 of 7 6/14/2021, 8:57 AM
Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

Method

The following method will be used to perform schema cloning:

1. Export Oracle Transportation Management schemas of the source database using data pump.
2. Prepare destination database.
3. Import Oracle Transportation Management schemas into the destination database using data pump.
4. Perform post import tasks which recompiles objects, creates remaining objects and perform grants.
5. Modify configuration data to reflect new database in the Oracle Transportation Management configuration tables.

Naming Conventions

Source database: Database from where Oracle Transportation Management schemas and data is being copied.
Target database: Database to where Oracle Transportation Management schemas and data are being copied.
TRANSIENT data: Temporary data which is no longer required by Oracle Transportation Management for day to
day functionality.
Data pump: Oracle Database utility to export and import schemas.
DATAPUMP DIRECTORY: Directory on the database server available to store exported schema and data.

Prerequisites

Oracle Transportation Management application version of target database should be the same as source database.
Target database should be installed with proper Oracle Transportation Management init.ora parameters similar to
source.
Source and Target database has DATAPUMP DIRECTORY created and proper disk space and permissions are
available to user.
Person performing this task needs basic DBA skills as well as person must have used Data Pump previously. Refer to
Oracle Database Utilities documentation to get more information about Data Pump.

There are two options available for cloning schemas.

1. Clone entire schemas


2. Export Schemas without TRANSIENT Data and with Metadata

The second option can significantly reduce runtime and disk space during copy process. This option can be used to copy
production database to development systems.

HISTORY

DETAILS

Export Option 1 - Clone Entire Schemas

Step 1. Export Schemas

Export following schemas from the source database. Use SYS or other DBA account to perform export/import. Make sure
that the other DBA account has "Exempt Access Policy" role assigned because Oracle Transportation Management uses
VPD for data security.

GLOGOWNER, REPORTOWNER, GLOGOAQ, ARCHIVE_C, ARCHIVE_C_USER, GLOGLOAD, GLOGDBA, GLOBALREPORTUSER,


DIR_XML_USER

Sample Command

expdp sys/<SysUserPWD>@<source_dbsid> directory=<DATAPUMP_DIR_NAME>


DUMPFILE=OTM_643_exp_<source_dbsid>_%U.dmp

2 of 7 6/14/2021, 8:57 AM
Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

schemas=GLOGOWNER,REPORTOWNER,GLOGOAQ,ARCHIVE_C,ARCHIVE_C_USER,GLOGLOAD,GLOGDBA,GLOBALREPORTUSER,DIR_XML_USER
logfile=otm_643_full_<source_dbsid>.log

All of these parameters can be combined into a single par file you can use for the export.

Create a file called full_643_exp_<source_dbsid>.par with the following parameters defined.

Userid='sys/<SysUserPWD>@<source_dbsid> as sysdba'
DIRECTORY=<DATAPUMP_DIR_NAME>
DUMPFILE=OTM_643_exp_%U.dmp
SCHEMAS=GLOGOWNER,REPORTOWNER,GLOGOAQ,ARCHIVE_C,ARCHIVE_C_USER,GLOGLOAD,GLOGDBA,GLOBALREPORTUSER,DIR_XML_USER
LOGFILE=otm_643_full_<source_dbsid>.log

Run the export using the new par file.

expdp parfile=full_643_exp_<source_dbsid>.par

Note: Be sure and review the otm_643_full_<source_dbsid>.log file for any errors before moving to the next step.

Export option 2 - Export Schemas without TRANSIENT Data and with Metadata

Export schemas from the source database excluding tables which contains transient data. The exclude table list is provided
in the parameter file otm_643_expdp_exclude_list.par and the same tables are listed in the
otm_643_expdp_include_list.par (these files are an attachment to this knowledge document).

otm_643_expdp_exclude_list.par - this file contains the Userid, DIRECTORY, FILESIZE, DUMPFILE, LOGFILE,
schemas and the exclude ( list of tables to be excluded from the export ) parameters
otm_643_expdp_metadata_list.par- this file contains the Userid, DIRECTORY, FILESIZE, DUMPFILE, LOGFILE,
CONTENT=METADATA_ONLY, TABLES ( list of tables to have their metadata exported ) parameters. The TABLES
parameter has schema owner of GLOGOWNER and the full tablename associated with it. If you view the file you will
see all the tables end with a _T.

Each file has several parameters that need to be updated before running expdp.

Userid='sys/<SysUserPWD>@<source_dbsid> as sysdba'
DIRECTORY=<DATAPUMP_DIR_NAME>
FILESIZE=2G
DUMPFILE=otm_exclude_643_<source_dbsid>_%U.dmp

Note: Review and modify otm_643_expdp_exclude_list.par and the corresponding otm_643_expdp_metadata_list.par to


include table data in the cloning process according to your requirements. Any table being excluded from the export should
be included in the list of tables the metadata data is being exported for. If you use an account other than SYS for the
export or import make sure that any other DBA account has the "Exempt Access Policy" role assigned because Oracle
Transportation Management uses VPD for data security.

Sample Command

expdp parfile=otm_643_expdp_exclude_list.par

and this:

expdp parfile=otm_643_expdp_metadata_list.par

Note: Check the otm_643_exp_exclude.log and otm_643_metadata_exp.log log files generated for errors before moving
to the next step.

Step 2. Prepare Target Database

3 of 7 6/14/2021, 8:57 AM
Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

1. Create the Oracle Transportation Management tablespaces similar to the source database. Make sure enough space is
allocated to accommodate source data. You can use Oracle Transportation Management provided script
create_gc3_tablespaces.sql to create tablespaces. Script is located in the directory < OTM Home >/glog/oracle/script8.

2. Create the Oracle Transportation Management users on the target database using create_glog_users.sql script. It is
important to use this script because it also grants necessary privileges which do not get transferred by data pump. Go to
directory < OTM Home >/glog/oracle/script8 of the application server, Log in as SYS and run the following script:
@create_glog_users.sql. Make sure no errors are generated.

3. Setup editioning on the Target DB

Log into the database using sqlplus as sys and run the following commands. Enter OTM643 when prompted.

define edition_name=&edname

create edition &edition_name ;


alter database default edition= &edition_name;
alter user archive_c enable editions;
alter user archive_c_user enable editions;
alter user glogdba enable editions;
alter user glogowner enable editions;
alter user glogload enable editions;
alter user globalreportuser enable editions;
alter user dir_xml_user enable editions;
alter user reportowner enable editions;
grant use on edition &edition_name to archive_c;
grant use on edition &edition_name to archive_c_user;
grant use on edition &edition_name to glogdba;
grant use on edition &edition_name to glogowner;
grant use on edition &edition_name to glogload;
grant use on edition &edition_name to globalreportuser;
grant use on edition &edition_name to dir_xml_user;
grant use on edition &edition_name to reportowner;
commit;

Step 3. Import Schemas

Import schemas exported in Step 1 to the target database. This may involve transfer of DUMP file from source database
DATAPUMP DIRECTORY to target database DATAPUMP DIRECTORY.

Sample Command

impdp sys/<SysUserPWD>@<target_dbsid> as sysdba DIRECTORY=<DATAPUMP_DIR_NAME>


DUMPFILE=OTM_643_exp_<source_dbsid>_01.dmp
SCHEMAS=GLOGOWNER,REPORTOWNER,GLOGOAQ,ARCHIVE_C,ARCHIVE_C_USER,GLOGLOAD,GLOGDBA,GLOBALREPORTUSER,DIR_XML_USER
LOGFILE=import_otm_643_<target_dbsid>.log

These parameters can be combined into a single .par file to make the import process easier.

Create a imp_643_<target_dbsid>.par file with the following info.

Userid='sys/<SysUserPWD>@<target_dbsid> as sysdba'
DIRECTORY=<DATAPUMP_DIR_NAME>
DUMPFILE=OTM_643_exp_<source_dbsid>_01.dmp
SCHEMAS=GLOGOWNER,REPORTOWNER,GLOGOAQ,ARCHIVE_C,ARCHIVE_C_USER,GLOGLOAD,GLOGDBA,GLOBALREPORTUSER,DIR_XML_USER
LOGFILE=import_otm_643_<target_dbsid>.log

Run impdp with the imp_643_<target_dbsid>.par file to start the import.

impdp parfile=imp_643_<target_dbsid>.par

Note: Review the import_otm_643_<target_dbsid>.log for errors. You can ignore "user already exists", trigger errors, and

4 of 7 6/14/2021, 8:57 AM
Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

compilation warnings as shown below.

ORA-31684: Object type USER:"ARCHIVE_C" already exists


ORA-31684: Object type USER:"ARCHIVE_C_USER" already exists
ORA-31684: Object type USER:"GLOGDBA" already exists
ORA-31684: Object type USER:"GLOGOWNER" already exists
ORA-31684: Object type USER:"GLOGLOAD" already exists
ORA-31684: Object type USER:"GLOBALREPORTUSER" already exists
ORA-31684: Object type USER:"REPORTOWNER" already exists
ORA-31684: Object type USER:"DIR_XML_USER" already exists
ORA-31684: Object type USER:"GLOGOAQ" already exists

Follow Step 4: Post Import Tasks further below.

3.1 Import Schemas without TRANSIENT Data Tables

These steps are not required if a full export was taken. Use the steps listed below to import the Transient and Metadata.

Import Schemas without TRANSIENT Data Tables into the Target Database Using the DUMP file created earlier. This may
involve the transfer of DUMP file from the source database DATAPUMP DIRECTORY to the target database DATAPUMP
DIRECTORY.

Sample Command

impdp sys/<SysUserPWD>@<target_dbsid> DIRECTORY=<DATAPUMP_DIR_NAME>


DUMPFILE=otm_exclude_643_<source_dbsid>_01.dmp
schemas=GLOGOWNER,REPORTOWNER,GLOGOAQ,ARCHIVE_C,ARCHIVE_C_USER,GLOGLOAD,GLOGDBA,GLOBALREPORTUSER,DIR_XML_USER
logfile=import_exclude_643_<target_dbsid>.log

Similar to the export command, a .par file can be created for the import process too. Create a file called
imp_exclude_643_<target_dbsid>.par with the following parameters updated for your environment.

Userid='sys/<sysUserPWD>@<target_dbsid> as sysdba'
directory=<DATAPUMP_DIR_NAME>
DUMPFILE=otm_exclude_643_<source_dbsid>_01.dmp
LOGFILE=import_exclude_643_<target_dbsid>.log
SCHEMAS=GLOGOWNER,REPORTOWNER,GLOGOAQ,ARCHIVE_C,ARCHIVE_C_USER,GLOGLOAD,GLOGDBA,GLOBALREPORTUSER,DIR_XML_USER

Run the import using the following command.

impdp parfile=imp_643_exclude_<target_dbsid>.par

Note: Review the import_exclude_643_<target_dbsid>.log file generated for possible errors. You can ignore the "user
already exists" errors, trigger errors and compilation warnings as shown below.

ORA-31684: Object type USER:"ARCHIVE_C" already exists


ORA-31684: Object type USER:"ARCHIVE_C_USER" already exists
ORA-31684: Object type USER:"GLOGDBA" already exists
ORA-31684: Object type USER:"GLOGOWNER" already exists
ORA-31684: Object type USER:"GLOGLOAD" already exists
ORA-31684: Object type USER:"GLOBALREPORTUSER" already exists
ORA-31684: Object type USER:"REPORTOWNER" already exists
ORA-31684: Object type USER:"DIR_XML_USER" already exists
ORA-31684: Object type USER:"GLOGOAQ" already exists

5 of 7 6/14/2021, 8:57 AM
Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

3.2 Import TRANSIENT Data Tables Metadata

Import TRANSIENT Data Tables Metadata Only into the Target Database Using the DUMP file created earlier. This may
involve transfer of DUMP file from source database DATAPUMP DIRECTORY to target database DATAPUMP DIRECTORY.

Sample Command

impdp sys/<SysUserPWD>@<target_dbsid> directory=<DATAPUMP_DIR_NAME>


DUMPFILE=otm_metadata_643_<source_dbsid>_01.dmp logfile=import_metadata_643_<target_dbsid>.log

A .par file can be created for the import process. Create a file called imp_643_metadata_<target_dbsid>.par with the
following parameters updated for your environment.

Userid='sys/<sysUserPWD>@<target_dbsid> as sysdba'
directory=<DATAPUMP_DIR_NAME>
DUMPFILE=otm_metadata_643_<source_dbsid>_01.dmp
LOGFILE=import_metadata_643_<target_dbsid>.log

Run the metadata import using the following command.

impdp parfile=imp_643_exclude_<target_dbsid>.par

Note: Review the import_metadata_643_<target_dbsid>.log file generated for possible errors.

Follow post import task listed in the step 4.

Step 4. Post Import Tasks

1. Copy the post_import_643.sql script from this note to the < OTM Home >/glog/oracle/script8 directory on the instance
that just had the data imported.

2. Go to the < OTM Home >/glog/oracle/script8 directory and log into the database using sqlplus as sys and run the
following commands.

begin
sys.utl_recomp.recomp_serial();
end;
/

3. While logged into the databased as sys run the following script.

@cloud/install_pkg_awr_report.sql

4. Log into database as GLOGOWNER user via SQLPLUS and run post_import_643.sql

@post_import_643.sql

You may see compilation errors at the start of the script; however at the end there should be no invalid objects.

The following steps are optional.

Step 5. Clean Up Data (Optional)

The "Clean-up Data" step is optional depending on the intention of the cloned instance. For instance, if a production

6 of 7 6/14/2021, 8:57 AM
Document 2593800.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

instance is being cloned to a test environment, it may be necessary to disable production contacts/external systems. You
may need to update the password for the "guest" and "system" user via the update_password.sh script.

The following SQL statements are commonly used to clean-up production data that should not be used in a test instance.

Note: Review these statements and analyze their impact on the installation before running them.

Note: This list of statements is not meant to be a comprehensive list. It may be necessary to modify other data when
cloning a production instance.

UPDATE APP_MACHINE SET MACHINE_URL = 'XX-' || MACHINE_URL;


UPDATE WEB_MACHINE SET MACHINE_URL = 'XX-' || MACHINE_URL;
UPDATE PROBLEM SET PROBLEM_URL = 'XX-' || PROBLEM_URL;
UPDATE X_UN_LOC_CODE SET EMAIL_ADDRESS = 'XX-'|| EMAIL_ADDRESS, FAX = NULL;
UPDATE CONTACT SET EMAIL_ADDRESS = 'XX-'|| EMAIL_ADDRESS WHERE EMAIL_ADDRESS IS NOT NULL;
UPDATE CONTACT SET FAX =NULL;
UPDATE CONTACT_POINT SET COM_ADDRESS = 'XX-' || COM_ADDRESS WHERE COM_METHOD_GID = 'EMAIL';
UPDATE NOTIFY_REQUEST SET COM_ADDRESS = 'XX-' || COM_ADDRESS WHERE COM_METHOD_GID = 'EMAIL';
UPDATE ADHOC_NOTIFY SET COM_ADDRESS = 'XX-' || COM_ADDRESS WHERE COM_METHOD_GID = 'EMAIL';
UPDATE REPORT_EMAIL SET EMAIL_ADDRESS = 'XX-' || EMAIL_ADDRESS;
UPDATE EXTERNAL_SYSTEM SET HOSTNAME='XX-'||HOSTNAME WHERE HOSTNAME IS NOT NULL;
UPDATE EXTERNAL_SYSTEM SET URL = 'XX-' || URL, IP_ADDRESS = NULL;
UPDATE PROCESS_CONTROL_REQUEST SET NEXT_PROCESS_TIME = NULL WHERE NEXT_PROCESS_TIME IS NOT NULL;

Step 6. Review Oracle Transportation Management Configuration Data (Optional)

Please review the listed data below and make necessary changes before starting Oracle Transportation Management.

Table Column
------------------ ------------------
APP_MACHINE MACHINE_URL
DATA_SOURCE JDBC URL
EXTERNAL_SYSTEM URL
USER_MENU URL
LOGFILE FILE_NAME: Verify it does not have absolute path
STYLESHEET_PROFILE TEMPLATE_NAME: Verify it does not have absolute path
WEB_SERVICE_ENDPOINT SERVICE_ENDPOINT
REPORT_COMMON_PROPERTIES REPORT_COMMON_PROPERTY_VALUE: Verify URL of web server is correct

Also check that other database objects, such as database links, match with the target database.

Step 7. Modify Scalability Configuration Settings in the Database (Optional)

If source database was part of Oracle Transportation Management scalability configuration then refer to Oracle
Transportation Management scalability guide to change configuration data to match the target configuration.

SUMMARY

Didn't find what you are looking for?

7 of 7 6/14/2021, 8:57 AM

You might also like