Step One : Create Table Space
CREATE TABLESPACE SPR_DATA DATAFILE
'location in local hard disk\SPR_DATA_01.DBF'
SIZE 1000M EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE
MANAGEMENT AUTO;
Step Two: Create User
CREATE USER sprora IDENTIFIED BY "sprora" DEFAULT TABLESPACE SPR_DATE;
Step Three: Giving Permission
GRANT CONNECT TO sprora;
ALTER USER SPRORA QUOTA UNLIMITED ON SPR_DATA;
GRANT CREATE TABLE TO SPRORA;
GRANT DBA TO SPRORA;
GRANT CREATE SESSION,CREATE TABLE,CREATE SEQUENCE,CREATE VIEW TO sprora;
GRANT EXECUTE ON DBMS_SQLHASH TO sprora;
GRANT EXECUTE ON DBMS_LOCK TO sprora;
GRANT DEBUG CONNECT SESSION TO sprora;
GRANT DEBUG ANY PROCEDURE TO sprora;
Step Four: Connect as new user and create test table
CONNECT sprora/sprora
CREATE TABLE TEST (CITY varchar2(32), POPULATION number);
INSERT INTO TEST (CITY, POPULATION) values ('edmonton', 10);
INSERT INTO TEST (CITY, POPULATION) values ('vancouver', 20);
COMMIT;
Now test newly created table using select query :
SELECT * FROM TEST
No comments:
Post a Comment