[Tibero] TAC to Single DB로 백업 복구

2023. 11. 29. 15:59DB

[Single DB 설치]

##vi /etc/sysctl.conf
kernel.shmall = 655360
kernel.shmmax = 2684354560
kernel.shmmni = 4096
kernel.sem = 10000 32000 10000 10000
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_max = 4194304
net.ipv4.tcp_rmem = 4194304
net.ipv4.tcp_wmem = 1048576
 
##/etc/security/limits.conf
 
backup soft nofile 1024
backup hard nofile 65536
backup soft nproc 2047
backup hard nproc 16384
 
## .bash_profile 설정
 
export TB_HOME=/home/tibero/Tibero/tibero6
export TB_SID=tibero
export LD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib
export PATH=$PATH:$TB_HOME/bin:$TB_HOME/client/bin
 
##tip.file 설정
CONTROL_FILES="/home/tibero/tbdata/tac1/c1.ctl"
DB_CREATE_FILE_DEST="/home/tibero/tbdata"
LOG_ARCHIVE_DEST="/home/tibero/tbdata/arch“
 
##.passwd 파일 확인
 

 

[복구]

## control trace file 생성
ALTER DATABASE BACKUP CONTROLFILE TO TRACE
AS '/home/oracle/myctlbkg.trc' reuse resetlogs;
 
##control file 경로 바꿔서 control file 생성
 
##tbdown
 
## thread 1 redo log 생성
 
## thread 1 enable
ALTER DATABASE ENABLE PRIVATE THREAD 1;
 
##archive log 확인
select * from v$archive_dest_files;
 
 
## --복구할 때 사용 된 TSN 번호는 각 노드의 마지막 Archive Log 파일에서
--TSN - 1 값 중 작은 값(: min(NODE1, NODE2) = min(14609-1, 14622-1) = 14608)
SQL> alter database recover automatic database until change 14608;
 
 
##tbdown
 
##tbboot resetlogs
 
##temp file 만들기