Use the following script to create a new user/schema XDUMMY. Run these scripts as the SYS user:
DEFAULT TABLESPACE "TEMP"
TEMPORARY TABLESPACE "TEMP"
QUOTA 20M on TEMP;
GRANT create table TO XDUMMY;
GRANT create view TO XDUMMY;
GRANT create any trigger TO XDUMMY;
GRANT create any procedure TO XDUMMY;
GRANT create sequence TO XDUMMY;
GRANT create synonym TO XDUMMY;
/* Script to create new user with username XDUMMY and password xdummy */
CREATE USER XDUMMY IDENTIFIED BY xdummyDEFAULT TABLESPACE "TEMP"
TEMPORARY TABLESPACE "TEMP"
QUOTA 20M on TEMP;
/* Script to grant session and create privileges to new user */
GRANT create session TO XDUMMY;GRANT create table TO XDUMMY;
GRANT create view TO XDUMMY;
GRANT create any trigger TO XDUMMY;
GRANT create any procedure TO XDUMMY;
GRANT create sequence TO XDUMMY;
GRANT create synonym TO XDUMMY;
/* Create new objects in schema */
// Connect to DB as as xdummy/ xdummy
create table dummy_tbl (...);
/* Create synonym so that you can query from other schemas */
create public synonym dummy_tbl for xdummy.dummy_tbl;
/* Query your objects from another schema. Example: APPS*/
// Connect to DB as as apps/<apps_pwd>
select * from dummy_tbl;
CaptiveCode
Please share your feedback below. Hope this is helpful!
No comments:
Post a Comment