-- CREATE pluggable DATABASE --
[oracle@testdbslvd01 ~]$ . oraenv
ORACLE_SID = [stgcont1] ? testcont1
[oracle@testdbslvd01 ~]$ sqlplus / as sysdba
SYS@ testcont1 SQL> create pluggable database TESTDEV admin user PDBADMIN identified by ********;
Pluggable database created.
SYS@ testcont1 SQL> alter pluggable database TESTDEV open instances=all;
Pluggable database altered.
SYS@ testcont1 SQL> alter session set container = TESTDEV;
Session altered.
SYS@ testcont1 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
15 TESTDEV READ WRITE NO
SYS@ testcont1 SQL> exit
-- CREATE SERVICE NAME --
[oracle@testdbslvd01 ~]$ srvctl add service -d tevcont-s test_test_srv -pdb TESTDEV -r testcont1,testcont2 -m BASIC -e SELECT -z 180 -w 5
[oracle@testdbslvd01 ~]$ srvctl start service -s test_test_srv-d testcont
[oracle@testdbslvd01 ~]$ srvctl status service -s test_test_srv -d testcont
Service test_test_srv is running on instance(s) testcont1,testcont2
[oracle@testdbslvd01 ~]$
-- CREATE TABLESPACE & USER --
create tablespace USERS;
create tablespace TEST_TBS;
create user TEST_DEV identified by test_test1144;
grant connect to TEST_DEV;
grant resource to TEST_DEV;
grant unlimited tablespace TO TEST_DEV;
alter user TEST_DEV default tablespace TEST_TBS;
alter user TEST_DEV quota unlimited on TEST_TBS;
GRANT CREATE VIEW TO TEST_DEV;
GRANT CREATE TRIGGER TO TEST_DEV;
-- grant access rights to resolve lock issues
GRANT EXECUTE ON DBMS_LOCK TO TEST_DEV;
-- grant access rights to resolve XA related issues:
GRANT SELECT ON PENDING_TRANS$ TO TEST_DEV;
GRANT SELECT ON DBA_2PC_PENDING TO TEST_DEV;
GRANT SELECT ON DBA_PENDING_TRANSACTIONS TO TEST_DEV;
GRANT EXECUTE ON DBMS_XA TO TEST_DEV;
alter profile default LIMIT PASSWORD_LIFE_TIME UNLIMITED;
No comments:
Post a Comment