12c Database Create Profile,Tablespace, Add users and insertion conditions

after connect with database need to check the instance status

SQL> select INSTANCE_NAME,STATUS FROM v$instance;

if we are going to start in 12c oracle database we have to set the sessions after connect with database.

sql>alter session set “_ORACLE_SCRIPT”=true;

now here creating the user profile

SQL> create profile querypanel_users limit

    sessions_per_user unlimited

    cpu_per_session   unlimited

    cpu_per_call      4500

    connect_time      30;

Creating tablespace

SQL> create tablespace querypanel_india datafile ‘/u01/app/oracle/oradata/querypanel01/querypanel_india.dbf’ size 200m autoextend on;

so here i have created two database users

  • querypanel_india;

sql> create user querypanel_india identified by querypanel_india profile querypanel_users default tablespace querypanel_india;

both condition we can do it

if we don’t assign tablespace to user after that we can alter

SQL> ALTER USER querypanel_india IDENTIFIED by querypanel_india DEFAULT TABLESPACE querypanel_india;

  • querypanel_delhi;

create user querypanel_india identified by querypanel_delhi profile qurypanel_users;

Here assign the permission to users.

sql>grant all privileges to querypanel_india;

sql>grant all privileges to querypanel_delhi;

SQL> conn querypanel_india/querypanel_india;

SQL> select * from india; (connected by self user)

SQL> select * from querypanel_india.india; (sys user)

SQL> insert into querypanel_india.india values(‘004′,’Panjab’);

SQL> conn querypanel_delhi/qurypanel_delhi;

SQL> grant select,insert on resign_1 to querypanel_delhi;

SQL> grant all privileges to querypanel_delhi;

Grant succeeded.

SQL> commit;

Commit complete.

SQL> conn querypanel_delhi/qurypanel_delhi;

Connected.

SQL> insert into RESIGN_1 values(’89’,’Delhi Laxmi Nagar’);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from resign_1;

 RESIGN_ID RESIGN_NAME

———- ————————————————–

        89 Delhi Laxmi Nagar

SQL>

Leave a Reply

Your email address will not be published. Required fields are marked *