[oracle@srv1 28440711]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.16
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_16-19-02PM_1.log
[oracle@srv1 28440711]$ opatch apply (Apply on both node1 and node 2)
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.16
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_16-20-33PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 28440711
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.1.0/dbhome_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '28440711' to OH '/u01/app/oracle/product/12.1.0/dbhome_2'
ApplySession: Optional component(s) [ oracle.sqlj, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Copy p6880880 patch to Oracle Home
[root@srv1 u01]# cp p6880880_121010_Linux-x86-64.zip /u01/app/oracle/product/12.1.0/dbhome_2/
[root@srv1 u01]# cd /u01/app/oracle/product/12.1.0/dbhome_2/
STEP 3 :
OPatch status before unzip p6880880_121010_Linux-x86-64.zip
[oracle@srv1 OPatch]$ . oraenv
ORACLE_SID = [+ASM1] ? rac1
The Oracle base has been changed from /u01/app/grid to /u01/app/oracle
[oracle@srv1 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.1.0.1.3
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_12-23-38PM_1.log
Check Opatch status after unzip p6880880_121010_Linux-x86-64.zip on oracle home
[oracle@srv1 dbhome_2]$ cd OPatch
[oracle@srv1 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.16
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_12-31-35PM_1.log
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: srv1.example.com
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Check Opatch status after unzip p6880880_121010_Linux-x86-64.zip on GRID home
[grid@srv1 OPatch]$ . oraenv
ORACLE_SID = [rac1] ? +ASM1
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid
[grid@srv1 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/12.1.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/12.1.0/grid/oraInst.loc
OPatch version : 12.1.0.1.3
OUI version : 12.1.0.2.0
Log file location : /u01/app/12.1.0/grid/cfgtoollogs/opatch/opatch2019-05-31_12-33-23PM_1.log
[oracle@srv2 28259833]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.16
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_12-55-27PM_1.log
[oracle@srv1 28259833]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.16
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_12-59-01PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 19769480 20299023 20831110 21359755 21948354 22291127 23054246 24006101 24732082 25171037 25755742 26609783 26713565 26925311 27338041 27547329 28259833
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.1.0/dbhome_2')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '19769480' to OH '/u01/app/oracle/product/12.1.0/dbhome_2'
chmod: changing permissions of `/u01/app/oracle/product/12.1.0/dbhome_2/bin/extjobO': Operation not permitted make: [iextjob] Error 1 (ignored) DOCID : 2265726.1
sqlplus prompt login
[oracle@srv1 28259833]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri May 31 13:19:22 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
RAC READ WRITE PRIMARY
SQL> exit
################################################################################# STEP 14 :
Apply data patch verbose (check html file for instruction also). |No need to run datapatch verbose on 2nd node.
[oracle@srv1 OPatch]$ ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Fri May 31 13:24:22 2019
Copyright (c) 2012, 2016, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_22774_2019_05_31_13_24_22/sqlpatch_invocation.log
Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...
done
Current state of SQL patches:
Bundle series PSU:
ID 181016 in the binary registry and not installed in the SQL registry
Adding patches to installation queue and performing prereq checks...
Installation queue:
Nothing to roll back
The following patches will be applied:
28259833 (DATABASE PATCH SET UPDATE 12.1.0.2.181016)
Installing patches...
Patch installation complete. Total patches installed: 1
Validating logfiles...
Patch 28259833 apply: SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/28259833/22488632/28259833_apply_RAC_2019May31_13_25_31.log (no errors)
SQL Patching tool complete on Fri May 31 13:28:27 2019
[oracle@srv1 OPatch]$
STEP 15:
Check Opatch lsinventory
[oracle@srv1 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.16
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_13-29-56PM_1.log
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: srv1.example.com
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
SQL*Plus: Release 12.1.0.2.0 Production on Fri May 31 13:30:53 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> set lines 200
SQL> select BUNDLE_SERIES,PATCH_UID,PATCH_ID,VERSION,ACTION,STATUS,ACTION_TIME ,DESCRIPTION from dba_registry_sqlpatch;
BUNDLE_SERIES PATCH_UID PATCH_ID VERSION ACTION STATUS ACTION_TIME
------------------------------ ---------- ---------- -------------------- --------------- --------------- ---------------------------------------------------------------------------
DESCRIPTION
----------------------------------------------------------------------------------------------------
PSU 22488632 28259833 12.1.0.2 APPLY SUCCESS 31-MAY-19 01.28.27.449554 PM
DATABASE PATCH SET UPDATE 12.1.0.2.181016
The basic oracleasm commands are:
configure Configure the Oracle Linux ASMLib driver
init Load and initialize the ASMLib driver
exit Stop the ASMLib driver
scandisks Scan the system for Oracle ASMLib disks
status Display the status of the Oracle ASMLib driver
listdisks List known Oracle ASMLib disks
querydisk Determine if a disk belongs to Oracle ASMlib
createdisk Allocate a device for Oracle ASMLib use
deletedisk Return a device to the operating system
renamedisk Change the label of an Oracle ASMlib disk
update-driver Download the latest ASMLib driver
[root@srv1 bin]# oracleasm deletedisk CRS1
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# oracleasm deletedisk CRS2
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# oracleasm deletedisk CRS3
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# oracleasm deletedisk DATA1
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# oracleasm deletedisk DATA2
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# oracleasm deletedisk FRA1
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# oracleasm deletedisk FRA2
Clearing disk header: done
Dropping disk: done
[root@srv1 bin]# ls -ltr
total 0
[root@srv1 bin]# oracleasm listdisks
[root@srv1 bin]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@srv1 bin]# fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 7833 62401536 8e Linux LVM
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@srv1 bin]#
[root@srv1 bin]# fdisk /dev/sdd
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): 1
1: unknown command
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@srv1 bin]#
[root@srv1 bin]# fdisk /dev/sde
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): 1
1: unknown command
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@srv1 bin]# fdisk /dev/sdf
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@srv1 bin]# fdisk /dev/sdg
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@srv1 bin]# fdisk /dev/sdh
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
:~# chattr +i /etc/resolv.conf (to make permanent entry on resolv.conf entry)
########################################################################
[root@smrprodb1 named]# cat /etc/resolv.conf
# Generated by NetworkManager
search example.com
nameserver srv-scan.example.com
domain example.com
########################################################################
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
[root@smrprodb1 named]#
########################################################################
[root@smrprodb1 named]# cat /var/named/chroot/etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
# SCAN (in production this should be configured in DNS)
192.168.56.91 srv-scan.example.com srv-scan
192.168.56.92 srv-scan.example.com srv-scan
192.168.56.93 srv-scan.example.com srv-scan
SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 16 13:12:08 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> shut immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
D:\>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 16 13:14:17 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 8.2678E+10 bytes
Fixed Size 7774968 bytes
Variable Size 1.2885E+10 bytes
Database Buffers 6.9525E+10 bytes
Redo Buffers 260657152 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
D:\>rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Tue Apr 16 13:16:49 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: SMRPRODB (not mounted)
RMAN> restore standby controlfile from 'D:\rman_backup_smrprodb\standbycontrol_SMRPRODB_20190416_latv3rcd_1_1.ctl';
Starting restore at 16-APR-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=430 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 04/16/2019 13:19:15
ORA-00940: invalid ALTER command
RMAN> shutdown immediate;
database dismounted
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
D:\>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 16 13:20:06 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 8.2678E+10 bytes
Fixed Size 7774968 bytes
Variable Size 1.2885E+10 bytes
Database Buffers 6.9525E+10 bytes
Redo Buffers 260657152 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
D:\>rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Tue Apr 16 13:22:25 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: SMRPRODB (not mounted)
RMAN> restore standby controlfile from 'D:\rman_backup_smrprodb\standbycontrol_SMRPRODB_20190416_latv3rcd_1_1.ctl';
Starting restore at 16-APR-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=430 device type=DISK
Starting implicit crosscheck copy at 16-APR-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
using channel ORA_DISK_11
using channel ORA_DISK_12
using channel ORA_DISK_13
using channel ORA_DISK_14
using channel ORA_DISK_15
using channel ORA_DISK_16
using channel ORA_DISK_17
using channel ORA_DISK_18
using channel ORA_DISK_19
using channel ORA_DISK_20
Crosschecked 2 objects
Finished implicit crosscheck copy at 16-APR-19
searching for all files in the recovery area
cataloging files...
cataloging done
List of Files Which Were Not Cataloged
=======================================
File Name: D:\RMAN_BACKUP_SMRPRODB\RMAN_SMRPRODB_FULL.LOG
RMAN-07517: Reason: The file header is corrupted
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRIDE_FULL.LOG
RMAN-07517: Reason: The file header is corrupted
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRMINDDEV_FULL.LOG
RMAN-07517: Reason: The file header is corrupted
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_FULL.LOG
RMAN-07517: Reason: The file header is corrupted
File Name: D:\RMAN_BACKUP_SMRPRODB\SMRTESTENV_FULL.LOG
RMAN-07517: Reason: The file header is corrupted
RMAN>
RMAN> RUN
2> {
3> set newname for datafile 1 to "D:\app\plmadmin\oradata\smrprodb\system01.dbf";
4> set newname for datafile 2 to "D:\app\plmadmin\oradata\smrprodb\sysaux01.dbf";
5> set newname for datafile 3 to "D:\app\plmadmin\oradata\smrprodb\undotbs01.dbf";
6> set newname for datafile 4 to "D:\app\plmadmin\oradata\smrprodb\idata01.dbf";
7> set newname for datafile 5 to "D:\app\plmadmin\oradata\smrprodb\ilog01.dbf";
8> set newname for datafile 6 to "D:\app\plmadmin\oradata\smrprodb\indx01.dbf";
9> set newname for datafile 7 to "D:\app\plmadmin\oradata\smrprodb\idata02.dbf";
10> set newname for tempfile 1 to "D:\app\plmadmin\oradata\smrprodb\temp01.dbf";
11> RESTORE DATABASE;
12>
13> SWITCH DATAFILE ALL;
14>
15> SWITCH TEMPFILE ALL;
16> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 16-APR-19
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
using channel ORA_DISK_11
using channel ORA_DISK_12
using channel ORA_DISK_13
using channel ORA_DISK_14
using channel ORA_DISK_15
using channel ORA_DISK_16
using channel ORA_DISK_17
using channel ORA_DISK_18
using channel ORA_DISK_19
using channel ORA_DISK_20
skipping datafile 1; already restored to file D:\app\plmadmin\oradata\smrprodb\system01.dbf
skipping datafile 5; already restored to file D:\app\plmadmin\oradata\smrprodb\ilog01.dbf
skipping datafile 2; already restored to file D:\app\plmadmin\oradata\smrprodb\sysaux01.dbf
skipping datafile 7; already restored to file D:\app\plmadmin\oradata\smrprodb\idata02.dbf
skipping datafile 3; already restored to file D:\app\plmadmin\oradata\smrprodb\undotbs01.dbf
skipping datafile 6; already restored to file D:\app\plmadmin\oradata\smrprodb\indx01.dbf
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to D:\app\plmadmin\oradata\smrprodb\idata01.dbf
channel ORA_DISK_1: reading from backup piece D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_L2TV3RBP_1_1.BCKP
channel ORA_DISK_1: piece handle=D:\RMAN_BACKUP_SMRPRODB\SMRPRODB_L2TV3RBP_1_1.BCKP tag=TAG20190416T040513
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 16-APR-19
renamed tempfile 1 to D:\app\plmadmin\oradata\smrprodb\temp01.dbf in control file
RMAN> select process,status,sequence# from v$managed_standby;
PROCESS STATUS SEQUENCE#
--------- ------------ ----------
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CONNECTED 0
RMAN> select max(sequence#) from v$archvied_log;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 04/16/2019 13:27:29
ORA-01219: database or pluggable database not open: queries allowed on fixed tables or views only
RMAN> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
27
RMAN> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
SMRPRODB MOUNTED PHYSICAL STANDBY
RMAN> select member from v$logfile
2> ;
MEMBER
--------------------------------------------------------------------------------
/u04/MasterDB/oradata/SMRPRODB/redo01a.log
/u04/MasterDB/oradata/SMRPRODB/redo02a.log
/u04/MasterDB/oradata/SMRPRODB/redo03a.log
/u04/MasterDB/oradata/SMRPRODB/redo04.log
/u04/MasterDB/oradata/SMRPRODB/redo_05.log
/u04/MasterDB/oradata/SMRPRODB/redo_06.log
/u04/MasterDB/oradata/SMRPRODB/redo_07.log
/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log
/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log
/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log
/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log
/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log
/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log
13 rows selected
RMAN>
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo01a.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo01a.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo01a.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo01a.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo02a.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo02a.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo02a.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo02a.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo03a.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo03a.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo03a.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo03a.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo04.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo04.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo04.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo04.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_05.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo_05.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_05.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo_05.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_06.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo_06.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_06.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo_06.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_07.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo_07.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo_07.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo_07.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo01b.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01b.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo01b.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo01c.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo01c.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo01c.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo02b.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02b.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo02b.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo02c.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo02c.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo02c.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo03b.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03b.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo03b.log''
RMAN> SQL "ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo03c.log'' ";
sql statement: ALTER DATABASE RENAME FILE ''/u04/MasterDB/oradata/SMRPRODB/redo/redo03c.log'' to ''D:\app\plmadmin\oradata\smrprodb\redo03c.log''
RMAN>
RMAN>
RMAN>
RMAN>
RMAN> select member from v$logfile
2> ;
MEMBER
--------------------------------------------------------------------------------
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO04.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_05.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_06.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_07.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03C.LOG
13 rows selected
RMAN> select member from v$logfile
2> ;
MEMBER
--------------------------------------------------------------------------------
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO04.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_05.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_06.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_07.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03C.LOG
13 rows selected
RMAN> alter database register logfile 'D:\app\plmadmin\fast_recovery_area\smrprodb\ARCHIVELOG\2019_04_15\1_28_1005460847.arc';
Statement processed
RMAN> alter database register logfile 'D:\app\plmadmin\fast_recovery_area\smrprodb\ARCHIVELOG\2019_04_15\1_29_1005460847.arc';
Statement processed
RMAN> select member from v$logfile
2> select member from v$logfile
3> select member from v$logfile
4>
5>
MEMBER
--------------------------------------------------------------------------------
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO04.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_05.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_06.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_07.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03C.LOG
13 rows selected
RMAN> select max(sequence#) from v$archvived_log;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 04/16/2019 13:47:34
ORA-01219: database or pluggable database not open: queries allowed on fixed tables or views only
RMAN> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
29
RMAN> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
29
RMAN> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
29
RMAN> select sequence#,archived,applied from v$archived_log;
MEMBER
--------------------------------------------------------------------------------
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03A.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO04.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_05.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_06.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO_07.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO01C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO02C.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03B.LOG
D:\APP\PLMADMIN\ORADATA\SMRPRODB\REDO03C.LOG
13 rows selected
RMAN> exit
Recovery Manager complete.
D:\>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 16 14:07:57 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter database reocver managed standby database disconnect from session;
alter database reocver managed standby database disconnect from session
*
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
SQL> alter database recover managed standby database disconnect from session;
alter database recover managed standby database disconnect from session
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
SQL> alter database recover managed standby database logfile current;
alter database recover managed standby database logfile current
*
ERROR at line 1:
ORA-00274: illegal recovery option LOGFILE
SQL> alter database recover managed standby database current logfile;
alter database recover managed standby database current logfile
*
ERROR at line 1:
ORA-00274: illegal recovery option CURRENT
SQL> alter database recover database cancel;
alter database recover database cancel
*
ERROR at line 1:
ORA-00274: illegal recovery option CANCEL
SQL> alter database recover database;
alter database recover database
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
D:\>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 16 14:11:19 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select sequence#,archived,applied from v$archived_log;