To preserve the transport utility settings in the sandbox environment before you refresh
the production database, the database dump that is taken from the production database should exclude
the transport utility tables.
Procedure
To preserve the transport utility settings on sandbox before database refresh, complete
the following steps:
- Use the following command to export the database dump of the source (production) environment by
excluding the following three tables: OAUTH20CACHE,
OAUTH20CLIENTCONFIG, OAUTH_USER_TOKEN. expdp vsm_src/pgm1@dq11r2e1 parfile=abc.txt
abc.txt
contains
dumpfile=vsm_src_TU.dmp
directory=dumps
schemas=vsm_src
logfile=vsm_src_TU.log
EXCLUDE=TABLE:"IN ('OAUTH20CACHE', 'OAUTH20CLIENTCONFIG' , 'OAUTH_USER_TOKEN')"
- Export the dump of the target (sandbox) database users for the OAUTH20CACHE,
OAUTH20CLIENTCONFIG, OAUTH_USER_TOKEN tables by using the
following command.
expdp <user name>/<password>@<IP address>:<port number>/<SID or Service
name> directory=dumps dumpfile=vsm_trg_tables.dmp
TABLES=vsm_trg.OAUTH20CACHE,vsm_trg.OAUTH20CLIENTCONFIG,vsm_trg.OAUTH_USER_TOKEN
logfile=vsm_tables.log
- Drop the target database user and create a new database user by using standard script.
- Import the dump that was created in step 1 from the source setup to the target setup by using
the following command.
impdp <user name>/<password>@<IP address>:<port number>/<SID or Service
name> dumpfile=vsm_src_TU.dmp logfile=vsm_src_TU.dmp.log DIRECTORY=DUMPS schemas=vsm_src
REMAP_SCHEMA=vsm_src:vsm_trg REMAP_TABLESPACE=temp:temp
- Import the dump again on the target setup to retain the target Oath * by using the following
command.
impdp <user name>/<password>@<IP address>:<port number>/<SID or Service
name> dumpfile=vsm_trg_tables.dmp logfile=vsm_tables.log DIRECTORY=DUMPS schemas=vs m_trg
REMAP_SCHEMA=vsm_trg:vsm_trg REMAP_TABLESPACE=temp:temp