You may need to restore a database to a new server due to the following reasons: confirming your disaster recovery strategy cloning a database to a new server for UAT or or PRE-PRODUCTION moving the database to a new server This post will work for all file systems - ASM, OCFS, raw, cooked etc. The steps can be summarised as: take a backup of the database on the existing host on the new host, restore the controlfiles, datafiles and tempfiles to the new location on the new host, … [Read more...] about How to Move/Restore Oracle Database to New Host and File System using RMAN
Archives for April 2019
Oracle Interview Questions : Recovery catalog for RMAN backup
Why use a recovery catalog? The RMAN catalog has several benefits. It makes restore if all the target database is lost, including the controlfile. As that controlfile contains all backup information, the catalog would then be used to identify a controlfile backup. If an RMAN catalog is not used, the controlfile autobackup should be configured to ON. There are some features which are only supported using an RMAN catalog. Primarily the ability to store scripts which would be available to all … [Read more...] about Oracle Interview Questions : Recovery catalog for RMAN backup
How to Configure rsyslog Server to Accept Logs via SSL/TLS
Purpose of this post is to explain how to configure rsyslog server to transmit logs via SSL/TLS. Logs which were transmitted from client to rsyslog server will be encrypted over n/w so that we have additional level security. Procedure Summary As we need to establish trust between client/server we would need to generate the CA certificates for each of the server/client. We will copy the respective client certificate to client node and server certificate to rsyslog server. Certificate … [Read more...] about How to Configure rsyslog Server to Accept Logs via SSL/TLS
How to duplicate a Oracle Database to a previous Incarnation
NOTE: In 11.2, there is a new option to duplicate syntax, INCARNATION, which allows you to duplicate the database to a previous incarnation using the RMAN duplicate command. For example: run { allocate auxiliary channel ch1 type 'SBT_TAPE' parms'ENV=(NB_ORA_CLIENT=xxx.com,NB_ORA_SERV=xxx.com)'; allocate auxiliary channel ch2 type 'SBT_TAPE' parms'ENV=(NB_ORA_CLIENT=xxx.com,NB_ORA_SERV=xxx.com)'; allocate auxiliary channel ch3 type 'SBT_TAPE' … [Read more...] about How to duplicate a Oracle Database to a previous Incarnation
How to Enable Remote Desktop to Share the Current Desktop Session in CentOS/RHEL 7
Steps to enable remote desktop access in CentOS/RHEL 7. This can either be done via the following: In the GUI 1. From an active desktop session, do the following: Ciick on Applications -> System Tools -> Settings -> Sharing -> Screen Sharing and turn it on. Using Command Line 1. Install vino-server package, vino is the VNC server in CentOS/RHEL to share the existing desktop session: # yum install vino-server 2. Open the terminal on the existing gnome session, then run these … [Read more...] about How to Enable Remote Desktop to Share the Current Desktop Session in CentOS/RHEL 7
Running RMAN DUPLICATE / RESTORE on a different version than source database version.
The Problem 1. RMAN DUPLICATE fails as below: input datafile copy recid=22 stamp=717598749 filename=/temp_datavol/clone_files/DUPTEST1/datafile/largetbl.298.684694005 datafile 24 switched to datafile copy input datafile copy recid=23 stamp=717598749 filename=/temp_datavol/clone_files/DUPTEST1/datafile/audittbl.449.690377511 datafile 25 switched to datafile copy input datafile copy recid=24 stamp=717598750 … [Read more...] about Running RMAN DUPLICATE / RESTORE on a different version than source database version.
Oracle RMAN: Monitoring Recovery Manager Jobs
Sometimes it is useful to identify what a server session performing a backup or copy operation is doing. You have access to several views that can assist in monitoring the progress of or obtaining information about RMAN jobs: ViewDescription V$PROCESSIdentifies currently active processes. V$SESSION Identifies currently active sessions. Use this view to determine which Oracle database server sessions correspond to which RMAN allocated channels. V$SESSION_LONGOPSProvides progress … [Read more...] about Oracle RMAN: Monitoring Recovery Manager Jobs
How to Delete the Files Which are Older Than n Days WITHOUT Using find Command
Question: How to delete the files which are older than n days WITHOUT use find command? For some reason, the find command is not used to check which files are older than n days, as a substitute, 'tmpwatch' can be used The syntax is: # tmpwatch [time in hours] [directory] For example, to delete files under /root/testdir/ not accessed for last 45 days ( 24x45 = 1018 hours), run the following command: # tmpwatch 1080 /root/testdir/ You could also specify the atime/mtime/ctime etc, to … [Read more...] about How to Delete the Files Which are Older Than n Days WITHOUT Using find Command
How to determine file and free space fragmentation of OCFS2
Below is a list of steps to determine the extent fragmentation of disk space on OCFS2. Steps should work on an offlined o2image and provide an indication for fragmentation-related performance problems. Checking the fragments in OCFS2 volume 1.Use debugfs.ocfs2 to display on-disk OCFS2 filesystem structures on /dev/$your_ocfs2_volume, see the following example: # debugfs.ocfs2 /dev/sdb debugfs.ocfs2 1.6.3 debugfs: 2. Run "stat //global_bitmap": debugfs: stat //global_bitmap Inode: … [Read more...] about How to determine file and free space fragmentation of OCFS2
Connection using SSH to a Host Not in DNS/hosts Stalls for Some Time at Connection Initiation
ssh, scp or sftp to a node that doesn't appear in DNS or /etc/hosts file is slow to make an initial connection. After the connection is established, the speed is as expected. There are two cases to consider, see below. Note that in most environments this issue will not occur since IPs will be in /etc/hosts or DNS. The time is spent while resolving the IP address of the target/source hostname or finding the hostname for the target/source IP address and / or doing authentication based on the … [Read more...] about Connection using SSH to a Host Not in DNS/hosts Stalls for Some Time at Connection Initiation