데이터베이스2015. 9. 4. 13:55

root계정으로 접속 후 

su - oracle


sysdba계정으로 sqlplus에 접속 후

sqlplus "/ as sysdba"


Data tablespace 생성

CREATE TABLESPACE LBS_DATA DATAFILE '/home/oracle/ordata/LBS/LBS_DATA.DBF' SIZE 1G AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;

Index tablespace 생성

CREATE TABLESPACE LBS_IDX DATAFILE '/home/oracle/ordata/LBS/LBS_IDX.DBF' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;


Temp tablespace 생성

CREATE TEMPORARY TABLESPACE LBS_TMP TEMPFILE '/home/oracle/ordata/LBS/temp/LBS_TMP.DBF' SIZE 50M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED;


사용자 생성

CREATE USER lbs IDENTIFIED BY 비밀번호입력 DEFAULT TABLESPACE LBS_DATA TEMPORARY TABLESPACE LBS_TMP PROFILE DEFAULT ACCOUNT UNLOCK;


사용자 권한 부여

GRANT RESOURCE TO lbs;

GRANT CONNECT TO lbs;

GRANT CREATE VIEW TO lbs;

GRANT CREATE SYNONYM TO lbs;

Posted by 미랭군