The Setup This post offers step by step procedure to create physical standby from ASM primary. Database Name: chicago Primary db_unique_name: chicago standby db_unique_name: boston Primary Hostname: prim.example.com standby Hostname: stdby.example.com Steps 1. Enable Force Logging: SQL> ALTER DATABASE FORCE LOGGING; Database altered. 2. On the primary node, create a staging directory. For example: [oracle@prim […]
Archives for February 2019
How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies in Oracle Database
The RMAN CATALOG command is used to accomplish the following: Add backup pieces and image copies on disk to the RMAN repository. Record a datafile copy as a level 0 incremental backup in the RMAN repository, which enables you to use it as part of an incremental backup strategy. Record the existence of the last […]
RMAN: SET NEWNAME Command Using SQL
When you must restore the database the same directory structure is not always available. If you have a database containing 1000s of datafiles it can be very tedious to setup the set newname commands for all the datafiles. Using sqlplus we can extract the information we need into a file which can then be easily […]
Nohup Command Examples – Runs a Command that Keeps Running after You Log Out
The nohup utility executes a command line such that the command keeps running after you log out. In other words, nohup causes a process to ignore a SIGHUP signal. Depending on how the local shell is configured, a process started without nohup and running in the background might be killed when you log out. Syntax […]
Script to monitor RMAN Backup and Restore Operations
RMAN is designed to complete a backup or restore as quikly and efficiently as possible. But if a job takes longer than expected to complete it can be confusing trying to determine: What precisely is RMAN doing at any particular time? Is RMAN hung or just slow? How far into the backup/restore has it got? […]
Oracle RMAN Backup Shell Script Example
Pre-requisites 1. Create a catalog database (rmancat) if one does not exist. (With additional UNDO-, USERS- and TEMP-tablespaces) 2. Configure SQL*Net to handle the catalog (rmancat) and the ‘target’ database connections. 3. Create a user ‘RMAN’ in the catalog database. SQL> create user rman identified by rman default tablespace USERS quota unlimited on users temporary […]
How to change a system’s machine-ID in Oracle Enterprise Linux 7
Ask: A system has the same machine-id than the original one, need to differentiate it so that some applications can tell systems apart. What is machine-id – The /etc/machine-id file contains the unique machine ID of the local system that is set during installation. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase machine […]
How to Define PDB Listeners With Different Ports In a Oracle database Multitenant Setup
This post will discuss the necessary steps to create and configure listeners for a Pluggable Database (PDB) in a Multitenant environment. 1. Using netca create a 2nd listener on a unique port. This creates a listener.ora file in the $ORACLE_HOME/network/admin directory similar to: $ cat $ORACLE_HOME/network/admin/listener.ora PDB_LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL […]
What’s different between /bin/false and /sbin/nologin as nologin user’s shell
At times, we may need a user account with a password for authentication with a system, but do not require an interactive shell with that username. This helps in preventing the user account being used for logging in to the system with that password. In those scenarios, we can set the user’s shell to /sbin/nologin […]
What are the Types of DNS Servers
Types of DNS Servers DNS servers play a wide variety of roles—a single name server may be a master for some zones, a slave for others, and provide caching or forwarding services for still others. The role of the name server is controlled by its configuration file, which in the case of BIND is called […]