검색결과 리스트
ORACLE /TIP에 해당되는 글 4건
- 2015.07.16 - Archive log mode 확인 및 모드 변경 1
- 2015.07.16 - Tablespace 사용률 관리 확인 스크립트 1
- 2015.07.16 - Redo Log 상태 확인 스크립트
- 2015.07.16 - SQL Prompt 변경하기. (ex. SYS@PROD)
글
- Archive Log mode 확인
SYS@PROD>archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch Oldest online log sequence 24 Current log sequence 26 |
- Archive Log Mode로 변경
해당 모드로의 변경은 데이터베이스가 Mount 상태일 때 가능.
SYS@PROD>alter database archivelog; alter database archivelog * ERROR at line 1: ORA-01126: database must be mounted in this instance and not open in any instance SYS@PROD>shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SYS@PROD>startup mount ORACLE instance started.
Total System Global Area 417546240 bytes Fixed Size 2213936 bytes Variable Size 327157712 bytes Database Buffers 83886080 bytes Redo Buffers 4288512 bytes Database mounted.
Database altered.
SYS@PROD>archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch Oldest online log sequence 24 Next log sequence to archive 26 Current log sequence 26 |
- No Archive Log mode 변경
SYS@PROD>startup mount ORACLE instance started.
Total System Global Area 417546240 bytes Fixed Size 2213936 bytes Variable Size 327157712 bytes Database Buffers 83886080 bytes Redo Buffers 4288512 bytes Database mounted. SYS@PROD>alter database noarchivelog;
Database altered.
SYS@PROD>archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch Oldest online log sequence 24 Current log sequence 26 |
'ORACLE > TIP' 카테고리의 다른 글
- Tablespace 사용률 관리 확인 스크립트 (1) | 2015.07.16 |
---|---|
- Redo Log 상태 확인 스크립트 (0) | 2015.07.16 |
- SQL Prompt 변경하기. (ex. SYS@PROD) (0) | 2015.07.16 |
설정
트랙백
댓글
글
- 스크립트
set lines 1000; col file# for 999; col ts_name for a10; col total_blocks for 9999999; col used_blocks for 9999999; col pct_used for a10; col file_dir for a45 select distinct d.file_id file#, d.tablespace_name ts_name, d.bytes /1024 / 1024 MB, d.bytes / 8192 MB, sum(e.blocks) used_blocks, to_char(nvl(round(sum(e.blocks)/(d.bytes/8192),4),0)*100,'09.99')|| ' %' pct_used, d.file_name file_dir from dba_extents e, dba_data_files d where d.file_id = e.file_id group by d.file_id , d.tablespace_name , d.bytes, d.file_name
order by 1,2; |
- 조회결과
'ORACLE > TIP' 카테고리의 다른 글
- Archive log mode 확인 및 모드 변경 (1) | 2015.07.16 |
---|---|
- Redo Log 상태 확인 스크립트 (0) | 2015.07.16 |
- SQL Prompt 변경하기. (ex. SYS@PROD) (0) | 2015.07.16 |
설정
트랙백
댓글
글
- Redo Log 상태확인 스크립트.
set line 200 col group# for 999 col mb for 999 col member for a45 col sql# for a8 col arc for a5
select a.group#, a.member, b.bytes/1024/1024 MB, b.sequence# "SEQ#", b.status, b.archived "ARC" from v$logfile a, v$log b where a.group#=b.group# order by 1,2 / |
- 출력결과
'ORACLE > TIP' 카테고리의 다른 글
- Archive log mode 확인 및 모드 변경 (1) | 2015.07.16 |
---|---|
- Tablespace 사용률 관리 확인 스크립트 (1) | 2015.07.16 |
- SQL Prompt 변경하기. (ex. SYS@PROD) (0) | 2015.07.16 |
설정
트랙백
댓글
글
* 위와같이 접속 계정과 인스턴스명으로 구성하기위한 방법.
- 오라클 홈디렉토리 하위 $ORACLE_HOME/sql/admin 디렉토리로 이동 glogin.sql편집.
- sql 접속 후 set을 통해 수행해도되지만, 수행할 때마다 세팅해줘야하는 번거로움이 있으므로 위에 스크립트 편집.
- vi 편집기를 이용하여, 하단에 세줄 추가.
[oracle@edydr1p0-PROD dbhome_1]$ cd $ORACLE_HOME/sqlplus/admin [oracle@edydr1p0-PROD admin]$ ls -ltr total 20 -rw-r--r-- 1 oracle oinstall 2118 Feb 16 2003 pupbld.sql -rw-r--r-- 1 oracle oinstall 813 Mar 7 2006 plustrce.sql -rw-r--r-- 1 oracle oinstall 226 Aug 3 2009 libsqlplus.def drwxr-xr-x 2 oracle oinstall 4096 Jun 8 10:37 help -rw-r--r-- 1 oracle oinstall 421 Jul 13 15:25 glogin.sql |
저장 후 실행.
'ORACLE > TIP' 카테고리의 다른 글
- Archive log mode 확인 및 모드 변경 (1) | 2015.07.16 |
---|---|
- Tablespace 사용률 관리 확인 스크립트 (1) | 2015.07.16 |
- Redo Log 상태 확인 스크립트 (0) | 2015.07.16 |
RECENT COMMENT