본문 바로가기

Oracle DataBase/Admin

(16)
Role 관리 Role 관리 실습 SQL> conn /as sysdba Connected. SQL> col PRIVILEGE format a20 SQL> select * from dba_sys_privs where grantee = 'RESOURCE'; SQL> create role dev; Role created. SQL> grant create table, create view to dev; Grant succeeded. SQL> grant select on scott.emp to dev; Grant succeeded. SQL> grant dev,connect,resource to bob; Grant succeeded. SQL> select * from dba_role_privs where grantee='BOB'..
Privileges 관리 실습 : 권한 관리 SQL> alter user bob identified by linux; //bob 에 대한 유저를 linux로 패스워드 변경 SQL> grant create user to scott with admin option; SQL> conn scott/tiger Connected. SQL> grant create user to bob; Grant succeeded. SQL> select * from dba_sys_privs where grantee in ('SCOTT','BOB'); SQL> revoke create user from scott; Revoke succeeded. SQL> select * from dba_sys_privs where grantee in ('SCOTT','BOB..
User 생성과 관리 실습 : User 생성과 관리 SQL> create user bob identified by bob default tablespace test temporary tablespace temp quota 1m on test; User created. SQL> create user kay 2 identified by abcd 3 default tablespace test 4 temporary tablespace temp; SQL> select username,default_tablespace,temporary_tablespace from dba_users where username in ('BOB','KAY') SQL> select * from dba_ts_quotas; SQL> drop user kay; U..
PROFILE 생성과 관리 실습 : profile 이용 user를 제한한다. SQL> conn / as sysdba; SQL> desc dba_profiles; SQL> select distinct profile from dba_profiles; SQL> select username,profile from dba_users; SQL> !vi /home/oracle/product/10g/dbs/inittestdb.ora resource_limit=true alter system set resource_limit=true; System altered. SQL> create profile test_profile limit 2 sessions_per_user 2 alter profile test_profile limit failed_lo..
테이블스페이스 생성과 관리 테이블스페이스 생성과 관리 실습 1. 데이터베이스의 데이터 파일과 테이블스페이스 상태 조회 SQL> select tablespace_name,status,contents,extent_management,segment_space_management 2 from dba_tablespaces; SQL> select tablespace_name,bytes,file_name from dba_data_files; 실습 2. 현재 temporary tablespace 설정 확인 SQL> select tablespace_name,bytes,file_name from dba_temp_files; SQL> select * from database_properties where property_name like '%TEMP..
Redo log file 구성 및 관리 log switch 및 checkpoint 명령 SQL> alter system switch logfile; alter system checkpoing; select a.group#,a.member,b.bytes/1024/1024 MB,b.archived,b.sequence# "SEQ#", b.status from v$logfile a,v$log b where a.group# = b.group# order by 1,2 redo log group 및 member 추가 SQL> alter database add logfile group 4 '/home/oracle/oradata/testdb/redo04_a.log' size 10m; SQL> alter database add logfile member '/h..
undo tablespace 생성 관리 undo tablespace 생성과 관리 새로운 파라미터의 설정 실습 1 현재 undo 관련 설정 확인 SQL> show parameter undo 실습 2 UNDO tablespace 생성과 default undo 테이블 스페이스 지정 SQL> create undo tablespace undo datafile '/home/oracle/oradata/testdb/undo01.dbf' size 10m autoextend on; Tablespace created. SQL> select tablespace_name,bytes,file_name from dba_data_files; SQL> alter system set undo_tablespace=undo; System altered. SQL> show par..
Control file 다중화 실습 Control file 확인 SQL > select name from v$controlfile; Control file 다중화 및 이동 과정 1) Pfile 이용 step 1. Shutdown step 2. 파일 복사(또는 이동) step 3. 파라미터 파일 편집 step 4. startup 컨트롤 파일의 안정성을 위한 다중화 실습 ( Pfile ) $ sqlplus '/as sysdba' Connected. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL>!vi /home/oracle/product/10g/dbs/inittestdb.ora control_files="/home/orac..