Contents [hide ]
Need to follow the below steps for Create User and Grant Permissions:
Step 1: Connect sysdba
sqlplus / as sysdba;
Step 2: Create user command syntex:
CREATE USER USER_NAME IDENTIFIED BY PASSWORD DEFAULT TABLESPACE USERS QUOTA 20M ON USERS;
CREATE USER c##blog_user_10 IDENTIFIED BY test#0010 DEFAULT TABLESPACE USERS QUOTA 20M ON USERS;
Step 3:
Syntex: grant create session, create table, create sequence, create view to USER_NAME;
grant create session, create table, create sequence, create view to c##blog_user_10;
Step 4:
Syntex: conn USER_NAME/PASSWORD;
conn c##blog_user_10/test#0010;
Step 5: show user;
Step 6: Now you can create a table and insert data into it.
-- Table create command CREATE TABLE student( id NUMBER GENERATED BY DEFAULT AS IDENTITY, first_name VARCHAR2(250) NOT NULL, last_name VARCHAR2(250) NOT NULL, PRIMARY KEY(id) ); -- Insert command INSERT INTO student (first_name, last_name) VALUES ('Hareesh', 'Soni'); -- Commit command commit;