▶ 리스너 체크
lsnrctl status

 

 


▶ DB체크
sqlplus / as sysdba

 

- putty = local -> 리스너가 꺼져있어도 연결된다.
- sqldeveloper에서 DB접속 -> 리스너가 켜져있어야 연결된다.

 

 

 

▶ SELECT status, instance_name FROM v$instance;

 

 

 

▶ TableSpace 체크
SELECT
    A.tablespace_name AS "TABLESPACE",          -- 테이블스페이스명
    B.file_name AS "FILE",                      -- 파일주소
    A.status,                                   -- 연결상태
    B.bytes AS "TOTAL SIZE",                    -- 총 용량
    (B.bytes - C.free_bytes) AS "USED SIZE",    -- 사용중인 용량
    C.free_bytes AS "FREE SIZE"                 -- 여유 공간
FROM
    DBA_TABLESPACES A,
    DBA_DATA_FILES B,
    (SELECT tablespace_name, file_id, SUM(bytes) AS free_bytes
        FROM DBA_FREE_SPACE
        GROUP BY tablespace_name, file_id
    ) C
WHERE A.tablespace_name = B.tablespace_name
AND A.tablespace_name = C.tablespace_name
AND B.file_id = C.file_id
ORDER BY B.file_id;

 

 

 

▶ 객체관리 >> INVALID 실행불가 상태 >> COMPILE
SELECT object_name, object_type, status
FROM dba_objects
WHERE status = 'INVALID';

 

 

▶ index 깨짐
select index_name, status from dba_indexes


STATUS : UNUSABLE


alter index hr.mig_table_idx rebuild online;

 

 

 

▶ alert log file 실시간
$ORACLE_BASE/diag/rdbms/ora11g/ora11g/trace/

tail -f alert_ora11g.log

 

 

 

▶ SELECT * FROM v$log;

 

 

 

▶ 있어야할 자리에 아카이브 파일이 있는가
SELECT name,sequence#,first_change#,first_time,next_change#,next_time
FROM v$archived_log;

SQL> ! ls /home/oracle/arch*

 

 

 

▶ Archive Log File 여유공간 체크

SQL> ! df -h

 

 

 

▶ child cursor가 만들어지는 57가지 이유
select * from v$sql_shared_cursor;

 

 

 

▶ nologging -> logging

대량작업 시 nologging 설정 후 다시 logging 바꿔주기

누락 체크

alter table hr.emp logging;

'Oracle 11g > Script' 카테고리의 다른 글

Alert Log File  (0) 2024.02.07
sqlplus 환경설정  (0) 2024.02.07