Skip to main content

Posts

Showing posts from 2017

Configuring Hot physical backup for PITR with continuous archiving.

Configuring Hot physical backup for PITR with continuous archiving: The hot backup with continuous archiving help us to allow to recover the database point in time(PITR) from the time of database backup. Make sure to complete the basic requirement before starting the backup configuration, like where to store the base backup, WAL archives etc. So, My environment contains the following, pg01 --> PostgreSQL database server pg03 --> Backup server PGDATA --> Path to postgresql data directory /u01/backups/base --> for storing the database base backup /u01/backups/archive --> for storing WAL archives. BACKUP_NAME--> Backup file name Steps to configure the backup as follows, 1.) Create the backup and archive directories on backup server, if not already created. Here /u01/backups/base and /u01/backups/archive. 2.) Configure the passwordless ssh connectivity between database and backup server. 3.) Configure the database server, set the below parameters in postgr

Configure Hot Backup (Physical) for PostgreSQL database on local or shared filesystem

PostgreSQL physical database backup (Hot) on local or shared filesystem. Physical backup is copying of all the required database files to secondary location using OS command or any other available utility. Physical backup can be taken as hot or cold. The cold backup will be done while database or processes are completely stopped and the database files or directories will be copied to secondary or secure location. On the other hand, the Hot backup will be done while the database and processes are up and running, application will be connected and using the database. user or application sessions might be doing either DDL or DML operations. So lets get set go and configure the Hot backup for postgreSQL database on local file system. Environment details: I have two machines currently configured. pg01 -> postgreSQL database. pg03 -> Used in future for pushing the database backup to remote. Postgresql version -> 9.6.5 PGDATA = /u01/app/postgres/data (Database file loc

Permission denied (publickey,gssapi-keyex,gssapi-with-mic) while configuring passwordless SSH

I have wasted hour to figure out why i am getting issue while configuring the passwordless ssh connectivity between Linux7.2 nodes(pg01 and pg02) for PostgreSQL backup configuration with BARMAN. Even google didn't helped me much to figure out what went wrong in configuration. I am getting permission denied while transferring the authorized_keys file from pg01 server to pg03. I have gone through multiple blogs and tried almost all of the solutions but nothing worked for me. There will be multiple reason for the same issue. But in my case, this is something not working for me even all the permissions are correct for files and directories. [postgres@pg01 .ssh]$ scp authorized_keys pg03:/home/postgres/.ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic). lost connection Finally, I have enabled the SCP in debug mode to see more details as below. [postgres@pg01 .ssh]$ scp -v authorized_keys pg03:/home/postgres/.ssh Executing: program /usr/bin/ssh host pg03, user

datapatch failed with ORA-27477: "SYS"."LOAD_OPATCH_INVENTORY_X" already exists

We have received the below error while working on the 6-node cluster patching. The patch has been applied on software GRID and RDBMS on all the node but the datapatch execution is failed with ORA-27477. rac06:dbp01:/u01/app/oracle/product/12.1.0.2/database/OPatch$ ./datapatch -verbose SQL Patching tool version 12.1.0.2.0 on Wed Oct 25 12:55:45 2017 Copyright (c) 2016, Oracle. All rights reserved. Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_12298_2017_10_25_12_55_45/sqlpatch_invocation.log Connecting to database…OK Bootstrapping registry and package to current versions…done Queryable inventory could not determine the current opatch status. Execute ‘select dbms_sqlpatch.verify_queryable_inventory from dual’ and/or check the invocation log /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_12298_2017_10_25_12_55_45/sqlpatch_invocation.log for the complete error. Prereq check failed, exiting without installing any patches. Solution:  The

ORA-29913: error in executing ODCIEXTTABLEOPEN callout

While running oracle datapatch in 12c, ORA-29913 error raised due to corrupted external table. The error you might see while running the datapatch after patching. $ ./datapatch -verbose Connecting to database...OK Determining current state... Currently installed SQL Patches: 18522516 DBD::Oracle::st execute failed: ORA-04063: package body "SYS.DBMS_QOPATCH" has errors ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_QOPATCH" ORA-06512: at line 4 (DBD ERROR: OCIStmtExecute) [for Statement "DECLARE x XMLType; BEGIN x := dbms_qopatch.get_pending_activity; ? := x.getStringVal(); END;" with ParamValues: :p1=undef] at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pm line 1293. or Connecting to database...OK catcon: ALL catcon-related output will be written to /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_53150146_2017_05_09_21_37_14/sqlpatch_catcon__catcon_53150146.lst catcon: See /u01/app/oracle/cfgtoollogs/sqlpatc

datapatch failed with error ORA-20009: Job Load_opatch_inventory_1execution failed

Today we have hit with issue while applying the OCT-2017 PSU. The Cluster and RDBMS software patched successfuly but while running the datapatch automation failed with below error. ERROR: Can't locate XML/Simple.pm in @INC (@INC contains: /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch /u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/lib /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/site_perl/5.14.1/x86_64-linux-thread-multi /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/site_perl/5.14.1 /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/5.14.1/x86_64-linux-thread-multi /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/5.14.1 .) at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pm line 173. BEGIN failed--compilation aborted at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pm line 173. Compilation failed in require at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pl line 64. BEGIN failed--compilatio