Create a Pluggable Database

You can use the pluggable database concept in Oracle 12c and create multiple Marts of the same Mart release.

Follow these steps:

  1. Create a pluggable database in Oracle 12c.

    For example, provide the Global Database Name as erwin and the Pluggable Database Name as erwin_test.

    For more information on how to create a pluggable database, see the Oracle documentation.

  2. Run the following script on the computer where Oracle 12c is installed:
    DROP TABLESPACE MMDATA INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
    
    DROP TABLESPACE MMINDEX INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
    
    DROP TABLESPACE marttemp INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
    
    ALTER SESSION SET CONTAINER=erwin_test;
    
    CREATE TABLESPACE MMDATA datafile 'c:\r9mart2\MMDATA.dbf' size 300m autoextend on;
    
    CREATE TABLESPACE MMINDEX datafile 'c:\r9mart2\MMINDEX.dbf' size 300m autoextend on;
    
    CREATE TEMPORARY TABLESPACE marttemp tempfile 'c:\r9mart2\tempdata.dbf' size 300m autoextend on;
    
    DROP USER MMADMIN CASCADE;
    
    CREATE USER MMADMIN IDENTIFIED BY MMADMIN DEFAULT TABLESPACE MMDATA TEMPORARY TABLESPACE MARTTEMP QUOTA UNLIMITED ON MMDATA QUOTA UNLIMITED ON MMINDEX;
    
    DROP ROLE MMINSTALL;
    
    CREATE ROLE MMINSTALL;
    
    GRANT CREATE SEQUENCE TO MMINSTALL;
    
    GRANT CREATE TABLE TO MMINSTALL;
    
    GRANT CREATE VIEW TO MMINSTALL;
    
    GRANT CREATE MATERIALIZED VIEW TO MMINSTALL;
    GRANT DROP PUBLIC SYNONYM TO MMINSTALL;
    
    GRANT CREATE PUBLIC SYNONYM TO MMINSTALL;
    
    GRANT CREATE PROCEDURE TO MMINSTALL;
    
    GRANT CREATE SESSION TO MMINSTALL;
    
    GRANT MMINSTALL TO MMADMIN;
    
    GRANT DBA TO MMADMIN;