Posts

Showing posts from September, 2019

Stop AWS RDS instance using the CLI

The easiest method to start/stop AWS RDS instance based on schedule is by using AWS CLI inside a bash/bat script. Download and configure the AWS CLI. Install AWS CLI – https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html Configure AWS CLI for the VPC – https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html CLI Commands. Use “rds stop-db-instance” and “rds start-db-instance” commands in a simple bat file as below, set userprofile=C:\Users\07766 aws rds stop-db-instance --db-instance-identifier qa-rds-ban aws rds stop-db-instance --db-instance-identifier dev-rds-ban aws rds stop-db-instance --db-instance-identifier uat-rds-ban It is required to set the userprofile of the user who configured the AWS CLI in the bat script set userprofile=C:\Users\<username> If you have not configured the AWS CLI using the security parameters, it is required to add below configuration to the script,         aws configure set AWS_ACCES

Oracle 12c datapatch puts pdb$seed to restricted

After applying RU (28828733) patch and running datapatch -verbose on two node RAC cluster, which contains 3 database instances, PDB$SEED of one of the databases was on restricted mode. Also, below sys objects in CDB level got invalidated causing the RMAN backups to fail.  Querying pdb_plug_in_violations showed datapatch errors and recommended to rerun the datapatch verbos. But datapath re run only updated the same error in pdb_plug_in_violations view and the PDB$SEED remained in restricted mode. Invalidted sys objects --> SQL> select owner, object_name, object_type, status from dba_objects where status='INVALID'; OWNER OBJECT_NAME OBJECT_TYPE STATUS -------- -------------------- --------------- -------- SYS DBMS_RCVMAN PACKAGE BODY INVALID SYS INITJVMAUX PACKAGE BODY INVALID PUBLIC SDO_VERSION SYNONYM INVALID WMSYS LT_EXPORT_PKG PACKAGE BODY INVALID MDSYS SDO_VERSION FUNCTION INVALID MDSYS SDO_3GL PACKAGE BODY INVALID MDSYS SDO_NETWORK_

Oracle Rman Backup

Oracle RMAN or the Recovery Manager is the tool provided by Oracle to perform all its database related data protection operations. This include Rman Backups, Restorations and recovery, Flashback, Backup encryption, Duplication and other numerous options. Although a comprehensive article on Rman can be a complex topic, idea of this post is to provide basic understanding of configuring a Oracle rman backup with minimal database administration knowledge. Oracle Backup Types – Online (Hot) Backups and Offline (Cold) Backups Rman backup can be either Online backup where backups is taken while the database is open for users and applications to connect and work. Offline backups are a dying concept as more and more systems are not tolerating downtimes to take backups. In order to take online rman backup the database must be in archive log mode. SQL> select log_mode from v$database; LOG_MODE ------------ ARCHIVELOG SQL> Setting the Oracle database to archivelog mo

Oracle core factor table

Image
What is oracle core factor? Oracle core factor refers to a weightage of licensing that oracle enforce on its software, based on the underlying server infrastructure it is running on. A simple example is when running Oracle database on 4 core AIX POWER 8 system customer should license for 4 database core licenses where as if the database software is running on 4 core SPARC T4 server, customer should only license for 2 database core licenses. This is because core factor for SPARC is 0.5 and it is for POWER is 1. Below is the full core factor table published by Oracle on 29 th July 2019. http://www.oracle.com/us/corporate/contracts/processor-core-factor-table-070634.pdf Why core factor is important? Given the enormous cost involved with Oracle licensing (e.g List price for Oracle enterprise edition database per core is $47,500), it is vital to plan the correct hardware infrastructure considering all the aspects of a deployment. Even with the engineered systems such as Exada