전체 글 110

[PostgreSQL] 복구 시 테이블에 AccessExclusiveLock

// version 10.15 // occur AccessExclusivLock on table when recover using recover_target_time // 데이터베이스 사용자가 실수로 table drop을 했다고 가정하여 복구 테스트 // base backup -bash-4.2$ pg_basebackup -D /postgres/basebackup/backup_20210315 -p 5401 -F t -z -bash-4.2$ ls -l /postgres/basebackup/backup_20210315 -rw-r--r--. 1 postgres postgres 15531124 Mar 15 15:45 base.tar.gz -rw-------. 1 postgres postgres 18432 Mar ..

PostgreSQL 2021.03.15

[Oracle] Oracle grid rac 설치 시 root.sh 에러 (CRS-4046, CRS-4000, CLSRSC-331)

# root.sh error when oracle grid rac installation2021/03/12 10:25:54 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'. PROCL-00041: Oracle Local Registry is incorrectly configured   clsu-00600: Internal Error [(:CLSUG00122:)] [5] [OLR error] [41] [Error retrieving olrconfig_loc property.] CRS-4046: Invalid Oracle Clusterware configuration. CRS-4000: Command Create failed, or complete..

Oracle 2021.03.12

[Oracle] ORA-19909: datafile 1 belongs to an orphan incarnation

RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 03/08/2021 05:02:07 ORA-00283: recovery session canceled due to errors RMAN-11003: failure during parse/execution of SQL statement: alter da..

Oracle 2021.03.09

[Oracle] 데이터베이스 강제 Open (ORA-00704 ORA-00604 ORA-01555)

Steps to attempt to force the database open: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  1) Backup the database while the database is closed. 2) Disable this database from EM if running. We also need to disable RAC to avoid Auto restart. 3) If your datafiles are from different points in time, it is best to try to use system tablespace datafiles at a similar timestamp to the OLDEST files you ha..

Oracle 2021.03.09

[PostgreSQL] PostgreSQL standby recovery script

// postgreSQL 이중화 도중 다운된 노드 recovery script (docker에서 사용 시) // get_primary_ip.sh (현재 동작하고 있는 primary의 ip를 가져오는 스크립트) # get_primary_ip.sh sudo -u postgres psql -p 54321 -t -A -F ' ' -n -c 'show pool_nodes;' | grep primary | awk '{print $2}' // create_recovery.sh (recovery.conf 를 찍어낼 스크립트) # create_recovery.sh HOST_ADDR=`sh /usr/pgsql-10/share/get_primary_ip.sh` echo -e "standby_mode=on primary_co..

PostgreSQL 2021.02.08

[Oracle] 커널 세마포어와 Oracle DB의 관계

// kernel Semaphore 파라미터// 세마포어는 여러 프로세스가 공유 자원(메모리 같은?)를 사용하기위해 프로세스의 접근을 직렬화 시켜주는 수단. // 왼쪽 부터 SEMMSL, SEMMNS, SEMOPM, SEMMNIsysctl -a | grep kernel.semkernel.sem = 250        32000   100     128 SEMMSL: 배열당 최대 세마포어 수 (max semaphores per array) SEMMNS: 시스템 전체 최대 세마포어 수 (max semaphores system wide) SEMOPM : 세마포어 호출당 최대 operation 수 (max ops per semop call) SEMMNI: 최대 배열 수(max number of arrays)  ..

Oracle 2021.02.04

[PostgreSQL] PostgreSQL docker를 이용한 replication

// docker를 이용한 PostgreSQL replication // OS release : centos 7 (3.10.0-1127.el7.x86_64) // docker 설치 [root@test]$ yum install docker -y [root@test]$ systemctl enable docker [root@test]$ systemctl start docker // pgpool 설치 (failover 및 failback에 사용되는 패키지) [root@test]$ yum install -y https://www.pgpool.net/yum/rpms/4.2/redhat/rhel-7-x86_64/pgpool-II-pg10-4.2.1-1pgdg.rhel7.x86_64.rpm [root@test]$ yu..

PostgreSQL 2021.01.22

[Oracle] Oracle logminer (로그마이너)

// Oracle 로그마이너 SQL > @redo     GROUP# MEMBER                                                MB        SEQ STATUS ---------- --------------------------------------------- ---------- ---------- ----------------          1 +DATA/RMANDB/ONLINELOG/redo1_a.log                    50          4 CURRENT          1 +DATA/RMANDB/ONLINELOG/redo1_b.log                    50          4 CURRENT          2 +DA..

Oracle 2021.01.13