개요
tblogdump은 데이터베이스 기동 불가로 인해 Logfile Dump를 사용할 수 없을 시 Dump를 생성할 수 있는 유틸리티입니다.
tblogdump 제약 사항
•
tblogdump는 암호화된 redo log 확인할 수 없습니다.
•
Transparent Tablespace Encryption (TTE) 사용 시 tblogdump 확인이 불가능합니다.
•
NFS에서 tblogdump 대용량 로그덤프 추출 시 시간이 오래 걸릴 수 있습니다.
방법
tblogdump 교체 방법
tblogdump는 Technet에서 다운로드 받아 $TB_HOME/client/bin 디렉토리에서 교체하여 사용합니다.
1.
Tibero Technet 접속
-. Technet > 다운로드 > 데이터베이스 > Tibero > Tibero Trouble Shooting Tools > 다운로드
2.
Tibero Trouble Shooting Tools 플랫폼 선택 > Linux > tblogdump 다운로드
3.
Tibero 서버 접속 > 아래 디렉토리로 이동 후 다운받은 파일 업로드 및 교체
-. 기존 파일 백업
$ cp $TB_HOME/client/bin/tblogdump $TB_HOME/client/bin/tblogdump.bak
-. 신규 파일 덮어쓰기
$ mv tblogdump $TB_HOME/client/bin/
$ chmod +x $TB_HOME/client/bin/tblogdump
SQL
복사
tblogdump 사용 방법
tblogdump 사용 방법에 대한 예시입니다.
$ tblogdump [옵션] <redo log 파일 경로>
SQL
복사
$ tblogdump
Usage: tblogdump [options] <fpath>
<fpath> fullpath of redo log files to dump
Options:
-a | --dba specifies dba (data block address)
-n log block number (format: 5 or 3-7, 0: header blk)
-s log block size (default: 512)
--seq log sequence number (format: 5 or 3-7)
must be used with --thread option
--opcode specifies opcode (format: opcode1.opcode2)
--sgmtid specifies segment id
--xid specifies transaction id (format: xxxx.xx.xxxx)
must be used with --seq option
--thread specifies redo thread id (only valid --seq option)
--unique specifies when the index is unique index
--nonunique specifies when the index is nonunique index
--kd_len specifies kd_len of irp
--keycolcnt specifies keycolcnt of irp
--rowid specifies rowid (format: dba.rowno or sgmtid.dba.rowno)
--over-nab targets all the blocks over the nab but only within the same log sequence.
--tsn specifies tsn (format: xxxx.xxxxxxxx(hex) or decimal value, single value or range(a-b))
Example:
tblogdump $TB_HOME/database/$TB_SID/log001.log
tblogdump --seq 3-5 --thread 0 $TB_HOME/database/$TB_SID/
SQL
복사
tblogdump 옵션
tblogdump 케이스 별 사용 방법
전체 로그 파일 덤프
$ tblogdump <file>
SQL
복사
로그 파일 헤더 블럭 덤프
$ tblogdump -n 0 <file>
SQL
복사
특정 블록에 대한 로그만 덤프 시
$ tblogdump -n <block_no> <file>
SQL
복사
특정 DBA(data block address)에 대한 로그 덤프 시
$ tblogdump -a <dba> <file>
SQL
복사
로그 파일 seq의 range를 input으로 하여 덤프 시
$ tblogdump --seq <seq/seq start-end> <dir_path>
SQL
복사
로그 파일의 특정 opcode를 input으로 하여 덤프 시
$ tblogdump --opcode <major opcode number.minor opcode number> <file>
SQL
복사
로그 파일의 특정 sgmtid에 대하여 로그 덤프 시
$ tblogdump --sgmtid <segment id> <File>
SQL
복사
로그 파일의 특정 트랜잭션 ID 대하여 로그 덤프 시
$ tblogdump --seq <sequence> --xid <xid> --thread <thread_id> <dir_path>
SQL
복사
로그 파일의 특정 Thread 대하여 로그 덤프 시
$ tblogdump --seq <seq> --thread <thread> <dir_path>
SQL
복사
로그 파일의 특정 tsn 대하여 로그 덤프 시
$ tblogdump --tsn <tsn> <file>
SQL
복사