Set up HDR 8.1 database on a new machine

To set up HDR 8.1 on a new database machine, you need to do the following:

  1. Perform a backup of your existing HDR 7.x schemas for CTB and HCT. Export the CTB and HCT schemas to a dump.
  2. Copy the dump files to new database machine.
  3. Create the following tablespaces on the HDR 8.1 target database by connecting as the system user:
    • Tablespace for CTB user(CTB_TBS).
    • Tablespace for HCT user(HCT_TBS).
    • Tablespace for Context (CTX_TBS).
    • Tablespace for Indexes (IDX_TBS).
  4. Create the HCT and CTB schema users on the HDR 8.1 target database by connecting as the system user.
  5. Run CREATE OR REPLACE DIRECTORY HDR_DMP_DIR as '<path>' to create the HTB_DUMP_DIR directory on the target HDR 8.1 Oracle database where the HDR 7.x dump file is located.
  6. Import the HCT objects from HDR 7.x to the target HCT schema.
  7. Import the CTB objects from HDR7.x to the target CTB schema. Run the example script above with HTB replaced by CTB where it applies.

Example 2-1 Schema dump

expdp system/<password>@<SID> schemas=CTB,HCT exclude=GRANT,USER,STATISTICS,TABLESPACE_QUOTA,DEFAULT_ROLE directory=hdr_dmp_dir dumpfile=<dump file name>.dmp logfile=hdr_dump.log

Example 2-2 Create migration tablespaces

TABLESPACE <tablespace name>
 
        LOGGING
 
        DATAFILE '<data file path>/hdr_hcttb.dbf'
 
        SIZE <100M>
 
        AUTOEXTEND ON
 
        NEXT <100M> MAXSIZE UNLIMITED
 
        EXTENT MANAGEMENT LOCAL;

Example 2-3 Create HCT user on HCT_TBS

  ALTER USER HCT QUOTA unlimited ON IDX_TBS;
 
        ALTER USER HCT QUOTA unlimited ON CTX_TBS;
 
        GRANT UNLIMITED TABLESPACE TO HCT;
 
        grant CREATE INDEXTYPE to HCT;  
 
        grant CREATE PROCEDURE to HCT;
 
        grant CREATE SEQUENCE to HCT;
 
        grant CREATE SESSION to HCT;
 
        grant CREATE TABLE to HCT;
 
        grant CREATE TYPE to HCT;
 
        grant CREATE VIEW to HCT;
 
        grant ALTER SESSION to HCT;
 
        grant ANALYZE ANY to HCT;
 
        grant EXECUTE on CTXSYS.ctx_ddl to HCT;
 
        grant Create Any Job to HCT;
 
        grant Create External Job to HCT;
 
        grant Create Job to HCT;
 
        grant Execute Any Class to HCT;
 
        grant Execute Any Program to HCT;
 
        grant Manage Scheduler to HCT;
 
        GRANT CREATE ANY DIRECTORY TO HCT;

Example 2-4 Create CTB user on CTB_TBS

 ALTER USER CTB QUOTA unlimited ON IDX_TBS;        GRANT UNLIMITED TABLESPACE TO CTB;         grant CREATE INDEXTYPE to CTB;          grant CREATE PROCEDURE to CTB;        grant CREATE SEQUENCE to CTB;        grant CREATE SESSION to CTB;        grant CREATE TABLE to CTB;        grant CREATE TYPE to CTB;        grant CREATE VIEW to CTB;        grant CREATE SYNONYM to CTB;        grant ALTER SESSION to CTB;        grant ANALYZE ANY to CTB;        GRANT EXECUTE ON SYS.DBMS_AQIN TO CTB;        GRANT EXECUTE ON SYS.DBMS_AQADM TO CTB;        grant Create Any Job to CTB;        grant Create External Job to CTB;        grant Create Job to CTB;        grant Execute Any Class to CTB;        grant Execute Any Program to CTB;        grant Manage Scheduler to CTB;        grant create any directory to CTB;        GRANT CREATE ANY DIRECTORY TO CTB;

Example 2-5 Import HCT objectsto the target schema

impdp system/<password> exclude=GRANT,USER,STATISTICS,TABLESPACE_QUOTA,DEFAULT_ROLE schemas=hct directory=HDR_DMP_DIR  dumpfile=< HDR7.x dump file name >.dmp logfile=hdr_hct_import.log.