Code used to setup an oracle schema and tablespace etc. for playing about with.
-
--run as system
-
--whenever sqlerror exit;
-
-
drop tablespace RJM_USER INCLUDING CONTENTS AND DATAFILES;
-
create
-
tablespace RJM_USER
-
DATAFILE '/u01/app/oracle/oradata/ORCL/rjm_users.dbf' size 40M;
-
-
-
drop USER ODI_SOURCE CASCADE;
-
create USER ODI_SOURCE
-
IDENTIFIED BY ODI_SOURCE
-
DEFAULT TABLESPACE RJM_USER
-
;
-
-
ALTER USER ODI_SOURCE QUOTA 40M ON RJM_USER;
-
-
GRANT create session TO ODI_SOURCE;
-
GRANT create table TO ODI_SOURCE;
-
GRANT create view TO ODI_SOURCE;
-
GRANT create any trigger TO ODI_SOURCE;
-
GRANT create any procedure TO ODI_SOURCE;
-
GRANT create sequence TO ODI_SOURCE;
-
GRANT create synonym TO ODI_SOURCE;
Adjustment for 12c - Multitenant
Log in as system as normal
View pdb's:
-
SELECT name, pdb
-
FROM v$services
-
ORDER BY name;
-
-
show con_name;
PDBORCL is a default pdb to use:
-
alter session set container=PDBORCL;
RJM Article Type
Quick Reference