반응형
*. SYS( 관리자 ) 접속방법
-- sqlplus 접속 no login
$> sqlplus /nolog
-- 관리자로 접속
SQL > conn /as sysdba
-- 콘솔에서 바로 관리자 접속
$> sqlplus "/as sysdba" -- window
$> sqlplus '/as sysdba' -- unix, linux
-- DB 가 1개보다 많은 경우
conn system /passwd@db명 /as sysdba
-- User 추가
create user [ID] identified by [PW]
-- User 권한 설정
grant connect, resource to [ID]
-- User 로 로그인
conn [ID]/[PW]
-- User 확인
show user
===>> oracel 9i DB 생성, User 추가 예제
출처 : http://www.itdi.co.kr/onuri/bbs/board.php?bo_table=04_2&wr_id=106
c:\Document and Settings\administrator> sqlplus /nolog
--DB가 1개일때...
SQL> conn /as sysdba
-DB가 여러개일때..
SQL> conn system /passwd@db명 /as sysdba
SQL>
-tablespace create...
CREATE TABLESPACE ITDI_TBL
DATAFILE 'C:\oracle\oradata\ITDI\ITDI_TBL.DBF' SIZE 500M
AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
-user create...
*USER
CREATE USER ITDI IDENTIFIED BY ITDI
DEFAULT TABLESPACE ITDI_TBL
-권한 주기.
*GRANT
GRANT CONNECT, RESOURCE, DBA TO ITDI
CREATE TABLESPACE FNSIA_TBL
DATAFILE 'D:\oradata\FNSIA\FNSIA_TBL.DBF' SIZE 1024M
AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE TABLESPACE FNSIA_IDX
DATAFILE 'D:\oradata\FNSIA\FNSIA_IDX.DBF' SIZE 1024M
AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO ;
CREATE TEMPORARY TABLESPACE FNSIA_TEMP
TEMPFILE 'D:\oradata\FNSIA\FNSIA_TEMP.DBF' Size 1024M;
CREATE USER FNSIA IDENTIFIED BY FNSIA
DEFAULT TABLESPACE FNSIA_TBL
TEMPORARY TABLESPACE FNSIA_TEMP;
GRANT CONNECT, RESOURCE, IMP_FULL_DATABASE, EXP_FULL_DATABASE TO FNSIA;
반응형