oracle(4)
-
Oracle ARCHIVELOG 삭제 하는 방법
오라클 ARCHIVELOG 때문에 Disk가 Full 났다. 더 이상 오라클에 Insert를 못하는 상태도 됬다 ㅠㅠ ARCHIVELOG를 삭제해 주어야 된다.. RMAN 사용 #$ORACLE_HOME/bin/rman RMAN> connect target / RMAN> LIST ARCHIVELOG LIKE '%.arc'; RMAN> LIST ARCHIVELOG ALL; RMAN> DELETE ARCHIVELOG LIKE '%.arc'; -- 하루치만 남겨 놓고 나머지 삭제 RMAN> delete archivelog all completed before 'sysdate -1'; 그럼 다음과 같은 질문을 한다 Do you really want to delete the above objects (enter Y..
2022.03.22 -
ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory
오라클 기동시 아래와 같은 오류가 날 때 ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory 터미널로 접속해서 기동해 보면..... SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 8 16:56:11 2022 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> connect /as sysdba Connected to an idle instance. SQL> startup ORA-01261: Parameter db_r..
2022.02.08 -
Oracle plan_hash_value가 0 값을 가지는 이유
보통 plan_hash_value의 값은 큰 값을 가지고 있는데, 가끔 조회해 보면 0 인 값이 나오는 경우가 있다. 0 이라고 해서 비정상적인 것은 아니며 정상적인 값으로 해석할 수 있다. plan_hash_value 라는게 쿼리가 수행할때 하나의 참조용 경로이긴한데, Query가 bind 변수를 사용하고 커서가 구문을 분석하게 되지만 실행계획 생성이 bind 값이 제공될때 실행 시간까지 연기되기 때문에 발생 할 수 있다, 즉, 쿼리가 bind 되어 실행 될때 까지 계획이 없으므로 0 값으로 나타난다. 또 다른 이유로는 Query가 PL/SQL 블록인 경우 plan_hash_value가 0 인 경우도 발생한다, 위 쿼리에 sql_text까지 넣어보자. insert into 구문인 경우에도 plan_ha..
2021.11.23 -
DBMS별 Table / Index 용량 확인하는 쿼리
Oracle SELECT a.tablespace_name AS TablespaceName , a.file_name FileName , (a.bytes - b.free) AS Used , b.free AS Free , a.bytes Total FROM ( SELECT file_id , tablespace_name , file_name , SUM(bytes) bytes FROM dba_data_files GROUP BY file_id, tablespace_name, file_name) a, ( SELECT tablespace_name , file_id , SUM(NVL(bytes,0)) FREE FROM dba_free_space GROUP BY tablespace_name, file_id ) B WHERE..
2021.11.11