You are on page 1of 29

login as: root

root@192.168.56.12's password:
        ┌──────────────────────────────────────────────────────────────────────┐
        │                                  • MobaXterm Personal Edition v21.3 •     

        │                              (SSH client, X server and network tools)     

        │                                                                           

        │ → SSH session to root@192.168.56.12                                       

        │      • Direct SSH            :    v                                       

        │      • SSH compression :    v                                             

        │      • SSH-browser          :    v                                         

        │      • X11-forwarding    :    v    (remote display is forwarded through
SSH)    │
        │                                                                           

        │ → For more info, ctrl+click on help or visit our website.                 

        └──────────────────────────────────────────────────────────────────────┘

Last login: Tue Nov 16 11:08:25 2021 from 192.168.56.1


[root@ambasanode1 ~]# su - oracle
Last login: Tue Nov 16 11:08:44 IST 2021 on pts/1
[oracle@ambasanode1 ~]$ . oraenv
ORACLE_SID = [oracle] ? PRODB
The Oracle base has been set to /u01/app/oracle
[oracle@ambasanode1 ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 16:47:47 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> shut immediate;


ORA-01507: database not mounted

ORACLE instance shut down.


SQL> startup mount restrict;
ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
ORA-00205: error in identifying control file, check alert log for more info
SQL> sho parameter con

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
cluster_interconnects                                string
connection_brokers                                      string           
((TYPE=DEDICATED)(BROKERS=1)),
                                                                                     
((TYPE=EMON)(BROKERS=1))
containers_parallel_degree                      integer          65535
control_file_record_keep_time                integer          7
control_files                                                string           
/u01/app/oracle/oradata/PRODB/
                                                                                     
control01.ctl, /u01/app/oracle
                                                                                     
/oradata/PRODB/control02.ctl
control_management_pack_access              string            DIAGNOSTIC+TUNING
db_file_name_convert                                  string
dg_broker_config_file1                              string           
/u01/app/oracle/product/dbhome

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
                                                                                     
_2/dbs/dr1PRODB.dat
dg_broker_config_file2                              string           
/u01/app/oracle/product/dbhome
                                                                                     
_2/dbs/dr2PRODB.dat
dst_upgrade_insert_conv                            boolean          TRUE
log_archive_config                                      string
log_file_name_convert                                string
nls_nchar_conv_excp                                    string            FALSE
pdb_file_name_convert                                string
SQL> sho parameter dbname
SQL> sho parameter db_name

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_name                                                            string           
PRODB
SQL> sho parameter db_

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
DBFIPS_140                                                      boolean         
FALSE
allow_global_dblinks                                  boolean          FALSE
autotask_max_active_pdbs                          integer          2
awr_pdb_autoflush_enabled                        boolean          FALSE
cdb_cluster                                                    boolean          FALSE
cdb_cluster_name                                          string            PRODB
clonedb_dir                                                    string
db_16k_cache_size                                        big integer 0
db_2k_cache_size                                          big integer 0
db_32k_cache_size                                        big integer 0
db_4k_cache_size                                          big integer 0

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_8k_cache_size                                          big integer 0
db_big_table_cache_percent_target        string            0
db_block_buffers                                          integer          0
db_block_checking                                        string            FALSE
db_block_checksum                                        string            TYPICAL
db_block_size                                                integer          8192
db_cache_advice                                            string            ON
db_cache_size                                                big integer 0
db_create_file_dest                                    string
db_create_online_log_dest_1                    string
db_create_online_log_dest_2                    string

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_create_online_log_dest_3                    string
db_create_online_log_dest_4                    string
db_create_online_log_dest_5                    string
db_domain                                                        string
db_file_multiblock_read_count                integer          87
db_file_name_convert                                  string
db_files                                                          integer         
200
db_flash_cache_file                                    string
db_flash_cache_size                                    big integer 0
db_flashback_retention_target                integer          1440
db_index_compression_inheritance          string            NONE

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_keep_cache_size                                      big integer 0
db_lost_write_protect                                string            NONE
db_name                                                            string           
PRODB
db_performance_profile                              string
db_recovery_file_dest                                string
db_recovery_file_dest_size                      big integer 0
db_recycle_cache_size                                big integer 0
db_securefile                                                string           
PREFERRED
db_ultra_safe                                                string            OFF
db_unique_name                                              string            PRODB
db_unrecoverable_scn_tracking                boolean          TRUE

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_writer_processes                                    integer          1
dbwr_io_slaves                                              integer          0
disable_pdb_feature                                    big integer 0
enabled_PDBs_on_standby                            string            *
max_pdbs                                                          integer         
4098
noncdb_compatible                                        boolean          FALSE
one_step_plugin_for_pdb_with_tde          boolean          FALSE
outbound_dblink_protocols                        string            ALL
pdb_file_name_convert                                string
pdb_lockdown                                                  string
pdb_os_credential                                        string

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
rdbms_server_dn                                            string
standby_archive_dest                                  string            ?#/dbs/arch
standby_db_preserve_states                      string            NONE
standby_file_management                            string            MANUAL
target_pdbs                                                    integer          0
xml_db_events                                                string            enable
SQL> sho parameter db_uni

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                                              string            PRODB
SQL> sho parameter spfile;

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
spfile                                                              string
SQL> create spfile from pfile;

File created.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:11:58 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> startup nomount force


ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 ~]$ df -kh
Filesystem            Size    Used Avail Use% Mounted on
devtmpfs                1.4G          0    1.4G      0% /dev
tmpfs                      1.4G    688M    698M    50% /dev/shm
tmpfs                      1.4G    9.6M    1.4G      1% /run
tmpfs                      1.4G          0    1.4G      0% /sys/fs/cgroup
/dev/sda5              100G    4.7G      96G      5% /
/dev/sda7                50G    4.3G      46G      9% /usr
/dev/sda10            264G      25G    240G    10% /u01
/dev/sda9                50G    198M      50G      1% /var
/dev/sda3              200G      34M    200G      1% /u02
/dev/sda2              200G    6.2G    194G      4% /softwares
/dev/sda6              100G      38M    100G      1% /home
/dev/sda1                10G    209M    9.8G      3% /boot
tmpfs                      278M      52K    278M      1% /run/user/0
tmpfs                      278M          0    278M      0% /run/user/1001
[oracle@ambasanode1 ~]$ cd $ORACLE_HOME
[oracle@ambasanode1 dbhome_2]$ pwd
/u01/app/oracle/product/dbhome_2
[oracle@ambasanode1 dbhome_2]$ cd /u01/
[oracle@ambasanode1 u01]$ ls
app    database    linuxx64_12201_database.zip
[oracle@ambasanode1 u01]$ mkdir backup
[oracle@ambasanode1 u01]$ rm -rf backup/
[oracle@ambasanode1 u01]$
[oracle@ambasanode1 u01]$ cd Backup/
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ ls -ltr
total 409748
-rw-r----- 1 oracle oinstall 358260736 Nov 16 17:14 PRODB_20211116_1_1_FULL
-rw-r----- 1 oracle oinstall      1105920 Nov 16 17:14 PRODB_20211116_2_1_FULL
-rw-r----- 1 oracle oinstall    49137664 Nov 16 17:14 PRODB_20211116_4_1_ARCHIVE
-rw-r----- 1 oracle oinstall        372736 Nov 16 17:14 PRODB_20211116_5_1_ARCHIVE
-rw-r----- 1 oracle oinstall          35840 Nov 16 17:14 PRODB_20211116_6_1_ARCHIVE
-rw-r----- 1 oracle oinstall    10665984 Nov 16 17:14 PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:14:39 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.
connected to target database: PRODB (not mounted)

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus / as syssdba

SQL*Plus: Release 12.2.0.1.0 Production

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus statements.

Usage 1: sqlplus -H | -V

        -H                          Displays the SQL*Plus version and the


                                      usage help.
        -V                          Displays the SQL*Plus version.

Usage 2: sqlplus [ [<option>] [{logon | /nolog}] [<start>] ]

    <option> is: [-AC] [-C <version>] [-L] [-M "<options>"] [-NOLOGINTIME] [-R
<level>]
                              [-S]

        -AC                        Enable Application Continuity.


        -C <version>      Sets the compatibility of affected commands to the
                                      version specified by <version>.    The version
has
                                      the form "x.y[.z]".    For example, -C 10.2.0
        -L                          Attempts to log on just once, instead of
                                      reprompting on error.
        -M "<options>" Sets automatic HTML or CSV markup of output.    The options
                                      have the form:
                                      {HTML html_options|CSV csv_options}
                                      See SQL*Plus User's Guide for detailed HTML and
CSV options.
        -NOLOGINTIME      Don't display Last Successful Login Time.
        -R <level>          Sets restricted mode to disable SQL*Plus commands
                                      that interact with the file system.    The
level can
                                      be 1, 2 or 3.    The most restrictive is -R 3
which
                                      disables all user commands interacting with the
                                      file system.
        -S                          Sets silent mode which suppresses the display of
                                      the SQL*Plus banner, prompts, and echoing of
                                      commands.

    <logon> is: {<username>[/<password>][@<connect_identifier>] | / }


                            [AS {SYSDBA | SYSOPER | SYSASM | SYSBACKUP | SYSDG |
SYSKM | SYSRAC}] [EDITION=value]
        Specifies the database account username, password and connect
        identifier for the database connection.    Without a connect
        identifier, SQL*Plus connects to the default database.

        The AS SYSDBA, AS SYSOPER, AS SYSASM, AS SYSBACKUP, AS SYSDG,


        AS SYSKM and AS SYSRAC options are database administration privileges.

        <connect_identifier> can be in the form of Net Service Name


        or Easy Connect.

            @[<net_service_name> | [//]Host[:Port]/<service_name>]

                <net_service_name> is a simple name for a service that resolves


                to a connect descriptor.

                Example: Connect to database using Net Service Name and the


                                  database net service name is ORCL.

                      sqlplus myusername/mypassword@ORCL

                Host specifies the host name or IP address of the database


                server computer.

                Port specifies the listening port on the database server.

                <service_name> specifies the service name of the database you


                want to access.

                Example: Connect to database using Easy Connect and the


                                  Service name is ORCL.

                      sqlplus myusername/mypassword@Host/ORCL

        The /NOLOG option starts SQL*Plus without connecting to a


        database.

        The EDITION specifies the value for Session Edition.

    <start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]

        Runs the specified SQL*Plus script from a web server (URL) or the
        local file system (filename.ext) with specified parameters that
        will be assigned to substitution variables in the script.

When SQL*Plus starts, and after CONNECT commands, the site profile
(e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
(e.g. login.sql in the working directory) are run.    The files may
contain SQL*Plus commands.

Refer to the SQL*Plus User's Guide and Reference for more information.
[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:15:02 2021


Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> sho parameter spfile

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
spfile                                                              string           
/u01/app/oracle/product/dbhome
                                                                                     
_2/dbs/spfilePRODB.ora
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ pwd
/u01/Backup
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:15:16 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (not mounted)

RMAN> restore controlfile from '/u01/Backup/PRODB_20211116_7_1_CONTROL';

Starting restore at 16-NOV-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK

channel ORA_DISK_1: restoring control file


channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/PRODB/control01.ctl
output file name=/u01/app/oracle/oradata/PRODB/control02.ctl
Finished restore at 16-NOV-21

RMAN> alter database mount;

Statement processed
released channel: ORA_DISK_1

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:16:13 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name,open_mode from v$database;

NAME            OPEN_MODE
--------- --------------------
PRODB          MOUNTED

SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:16:32 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (DBID=2490898024, not open)

RMAN> catalog start with '/u01/Backup'


2> ;

using target database control file instead of recovery catalog


searching for all files that match the pattern /u01/Backup

List of Files Unknown to the Database


=====================================
File Name: /u01/Backup/PRODB_20211116_7_1_CONTROL

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files


=======================
File Name: /u01/Backup/PRODB_20211116_7_1_CONTROL

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ pwd
/u01/Backup
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ rman target /
Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:18:03 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (DBID=2490898024, not open)

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:18:25 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> catalog start with '/u01/Backup'


SP2-0734: unknown command beginning "catalog st..." - rest of line ignored.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:18:53 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (DBID=2490898024, not open)

RMAN> catalog start with '/u01/Backup';

using target database control file instead of recovery catalog


searching for all files that match the pattern /u01/Backup
no files found to be unknown to the database

RMAN> restore database;

Starting restore at 16-NOV-21


allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK

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 00005 to
/u01/app/oracle/oradata/PRODB/df01.dbf
channel ORA_DISK_1: restoring datafile 00007 to
/u01/app/oracle/oradata/PRODB/users01.dbf
channel ORA_DISK_1: restoring datafile 00008 to
/u01/app/oracle/oradata/PRODB/df03.dbf
channel ORA_DISK_1: restoring datafile 00009 to
/u01/app/oracle/oradata/PRODB/df04.dbf
channel ORA_DISK_1: restoring datafile 00010 to
/u01/app/oracle/oradata/PRODB/df06.dbf
channel ORA_DISK_1: restoring datafile 00011 to
/u01/app/oracle/oradata/PRODB/df07.dbf
channel ORA_DISK_1: reading from backup piece /u01/Backup/PRODB_20211116_2_1_FULL
channel ORA_DISK_1: piece handle=/u01/Backup/PRODB_20211116_2_1_FULL tag=DB_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
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 00001 to
/u01/app/oracle/oradata/PRODB/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to
/u01/app/oracle/oradata/PRODB/df02.dbf
channel ORA_DISK_1: restoring datafile 00003 to
/u01/app/oracle/oradata/PRODB/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to
/u01/app/oracle/oradata/PRODB/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/datafile1.dbf
channel ORA_DISK_1: restoring datafile 00013 to /u02/datafile2.dbf
channel ORA_DISK_1: reading from backup piece /u01/Backup/PRODB_20211116_1_1_FULL
channel ORA_DISK_1: piece handle=/u01/Backup/PRODB_20211116_1_1_FULL tag=DB_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 16-NOV-21

RMAN> recover database;

Starting recover at 16-NOV-21


using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination


channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=22
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=23
channel ORA_DISK_1: reading from backup piece /u01/Backup/PRODB_20211116_5_1_ARCHIVE
channel ORA_DISK_1: piece handle=/u01/Backup/PRODB_20211116_5_1_ARCHIVE tag=ARCH_LOG
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/app/oracle/product/dbhome_2/dbs/arch1_22_1087576555.dbf
thread=1 sequence=22
archived log file name=/u01/app/oracle/product/dbhome_2/dbs/arch1_23_1087576555.dbf
thread=1 sequence=23
unable to find archived log
archived log thread=1 sequence=24
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/16/2021 17:22:23
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence
24 and starting SCN of 1697116
RMAN> alter database open resetlogs;

Statement processed

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:25:11 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name,open_mode from v$database;

NAME            OPEN_MODE
--------- --------------------
PRODB          READ WRITE

SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:25:44 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (DBID=2490898024)

RMAN> catalog start with '/u01/Backup';

using target database control file instead of recovery catalog


searching for all files that match the pattern /u01/Backup
no files found to be unknown to the database

RMAN>

RMAN>

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ nid TARGET=sys DBNAME=LTECHDB

DBNEWID: Release 12.2.0.1.0 - Production on Tue Nov 16 17:28:03 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.
Password:
Connected to database PRODB (DBID=2490898024)

NID-00121: Database should not be open

Change of database name failed during validation - database is intact.


DBNEWID - Completed with validation errors.

[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:28:23 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> alter user SYS identified by oracle;

User altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ nid TARGET=sys DBNAME=LTECHDB

DBNEWID: Release 12.2.0.1.0 - Production on Tue Nov 16 17:28:40 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

Password:
Connected to database PRODB (DBID=2490898024)

NID-00121: Database should not be open

Change of database name failed during validation - database is intact.


DBNEWID - Completed with validation errors.

[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:28:57 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> shut immediate;


Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ nid TARGET=sys DBNAME=LTECHDB

DBNEWID: Release 12.2.0.1.0 - Production on Tue Nov 16 17:29:38 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

Password:
Connected to database PRODB (DBID=2490898024)

Connected to server version 12.2.0

Control Files in database:


        /u01/app/oracle/oradata/PRODB/control01.ctl
        /u01/app/oracle/oradata/PRODB/control02.ctl

Change database ID and database name PRODB to LTECHDB? (Y/[N]) => Y

Proceeding with operation


Changing database ID from 2490898024 to 3598243077
Changing database name from PRODB to LTECHDB
        Control File /u01/app/oracle/oradata/PRODB/control01.ctl - modified
        Control File /u01/app/oracle/oradata/PRODB/control02.ctl - modified
        Datafile /u01/app/oracle/oradata/PRODB/system01.db - dbid changed, wrote new
name
        Datafile /u01/app/oracle/oradata/PRODB/df02.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/oradata/PRODB/sysaux01.db - dbid changed, wrote new
name
        Datafile /u01/app/oracle/oradata/PRODB/undotbs01.db - dbid changed, wrote new
name
        Datafile /u01/app/oracle/oradata/PRODB/df01.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/oradata/PRODB/users01.db - dbid changed, wrote new
name
        Datafile /u01/app/oracle/oradata/PRODB/df03.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/oradata/PRODB/df04.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/oradata/PRODB/df06.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/oradata/PRODB/df07.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/datafile1.db - dbid changed, wrote new name
        Datafile /u02/datafile2.db - dbid changed, wrote new name
        Datafile /u01/app/oracle/oradata/PRODB/temp01.db - dbid changed, wrote new
name
        Control File /u01/app/oracle/oradata/PRODB/control01.ctl - dbid changed,
wrote new name
        Control File /u01/app/oracle/oradata/PRODB/control02.ctl - dbid changed,
wrote new name
        Instance shut down

Database name changed to LTECHDB.


Modify parameter file and generate a new password file before restarting.
Database ID for database LTECHDB changed to 3598243077.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.

[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:31:05 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to an idle instance.

SQL> stratup nomount;


SP2-0734: unknown command beginning "stratup no..." - rest of line ignored.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
SQL> sho parameter db_name

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_name                                                            string           
PRODB
SQL> alter system set db_name='LTECHDB' scope=spfile;

System altered.

SQL> sho parameter db_un

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                                              string            PRODB
db_unrecoverable_scn_tracking                boolean          TRUE
SQL> alter system set db_unique_name='LTECHDB' scope=spfile;

System altered.

SQL>
SQL> startup mount force
ORACLE instance started.
Total System Global Area 1174405120 bytes
Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
Database mounted.
SQL> sho parameter db_name

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_name                                                            string           
LTECHDB
SQL> sho parameter db_un

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                                              string            LTECHDB
db_unrecoverable_scn_tracking                boolean          TRUE
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;

Database altered.

SQL> select name,open_mode from v$database;

NAME            OPEN_MODE
--------- --------------------
LTECHDB      READ WRITE

SQL> exit;
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ sqlplus 'as sysdba'

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:34:55 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Enter user-name:
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|
SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
            <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied

Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus


[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:35:26 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> drop database;


drop database
*
ERROR at line 1:
ORA-01586: database must be mounted EXCLUSIVE and not open for this operation

SQL> alter database mount restrict force;


alter database mount restrict force
                                          *
ERROR at line 1:
ORA-02232: invalid MOUNT mode

SQL> shut immediate


Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount restrict;
ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
SQL> exit
[oracle@ambasanode1 Backup]$ rman target /
Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:38:04 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database (not started)

RMAN>

RMAN>

RMAN>

RMAN> ^[

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse
RMAN-02003: unrecognized character:

MAN> ^[

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse
RMAN-02003: unrecognized character:

MAN> ^[

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse
RMAN-02003: unrecognized character:

MAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN>

RMAN> clear

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "clear": expecting one of: "advise, allocate, alter,
analyze, associate statistics, audit, backup, begin, @, call, catalog, change,
comment, commit, configure, connect, convert, copy, create, create catalog, create
global, create script, create virtual, crosscheck, declare, delete, delete from,
describe, describe catalog, disassociate statistics, drop, drop catalog, drop
database, duplicate, exit, explain plan, flashback, flashback table, grant, grant
catalog, grant register, host, import, insert, list, lock, merge, mount, noaudit,
open, print, purge, quit, recover, register, release, rename, repair, replace,
report, "
RMAN-01007: at line 1 column 1 file: standard input

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:39:08 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to an idle instance.

SQL> startup database nomount;


SP2-1547: Can not startup Pluggable database - Consolidated Database down.
SQL> show parameter spfile;
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

SQL> exit
Disconnected
[oracle@ambasanode1 Backup]$ show parameter spfile
bash: show: command not found...
[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:40:26 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to an idle instance.

SQL> create spfile from pfile;

File created.

SQL> startup database nomount;


SP2-1547: Can not startup Pluggable database - Consolidated Database down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:42:06 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (not mounted)

RMAN> restore controfile from 'u01/Backup';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "allforeign,
archivelog, as, backupset, channel, check, controlfile, database, database root,
datafile, device, dump, farsync, file_name_convert, force, foreign, from,
frompreplugin, from service, high, pluggable, preview, primary, section, skip
readonly, spfile, standby, tablespace, to restore point, until restore point, until,
using, validate, ("
RMAN-01008: the bad identifier was: controfile
RMAN-01007: at line 1 column 9 file: standard input

RMAN> restore controlfile from 'u01/Backup'


2>
3>

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "end-of-file": expecting one of: "allforeign,
archivelog, as, backupset, channel, check, controlfile, database, database root,
datafile, device, dump, farsync, file_name_convert, force, foreign, from,
frompreplugin, from service, high, pluggable, preview, primary, section, skip
readonly, spfile, standby, tablespace, to restore point, until restore point, until,
using, validate, (, ;"
RMAN-01007: at line 3 column 1 file: standard input

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ cd /u01
[oracle@ambasanode1 u01]$ cd Backup/
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 17:47:58 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (not mounted)

RMAN> restore controfile from 'u01/Backup/PRODB_20211116_7_1_CONTROL';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "allforeign,
archivelog, as, backupset, channel, check, controlfile, database, database root,
datafile, device, dump, farsync, file_name_convert, force, foreign, from,
frompreplugin, from service, high, pluggable, preview, primary, section, skip
readonly, spfile, standby, tablespace, to restore point, until restore point, until,
using, validate, ("
RMAN-01008: the bad identifier was: controfile
RMAN-01007: at line 1 column 9 file: standard input

RMAN> restore controlfile from 'u01/Backup/PRODB_20211116_7_1_CONTROL';

Starting restore at 16-NOV-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/16/2021 17:49:05
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 17:49:58 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> alter database mount;


alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info
SQL> PRODB_20211116_7_1_CONTROL
Network error: Software caused connection abort

─────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────

Session stopped
        - Press <return> to exit tab
        - Press R to restart session
        - Press S to save terminal output to file
login as: root
root@192.168.56.12's password:
        ┌──────────────────────────────────────────────────────────────────────┐
        │                                  • MobaXterm Personal Edition v21.3 •     

        │                              (SSH client, X server and network tools)     

        │                                                                           

        │ → SSH session to root@192.168.56.12                                       

        │      • Direct SSH            :    v                                       

        │      • SSH compression :    v                                             

        │      • SSH-browser          :    v                                         

        │      • X11-forwarding    :    v    (remote display is forwarded through
SSH)    │
        │                                                                           

        │ → For more info, ctrl+click on help or visit our website.                 

        └──────────────────────────────────────────────────────────────────────┘

Last login: Tue Nov 16 16:47:13 2021 from 192.168.56.1


[root@ambasanode1 ~]# su - oracle
Last login: Tue Nov 16 16:47:21 IST 2021 on pts/4
[oracle@ambasanode1 ~]$ . oraenv
ORACLE_SID = [oracle] ? PRODB
The Oracle base has been set to /u01/app/oracle
[oracle@ambasanode1 ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 20:30:43 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select dbname, open_mode from v$database;


select dbname, open_mode from v$database
              *
ERROR at line 1:
ORA-00904: "DBNAME": invalid identifier

SQL> select * from v$database;


select * from v$database
                            *
ERROR at line 1:
ORA-01507: database not mounted

SQL> startup mount;


ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate;
ORA-01507: database not mounted

ORACLE instance shut down.


SQL> startup mount;
ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
ORA-00205: error in identifying control file, check alert log for more info

SQL> exit;
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 ~]$ pwd
/home/oracle
[oracle@ambasanode1 ~]$ cd /u01/Backup
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 20:35:25 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (not mounted)

RMAN> restore controlfile from 'u01/Backup/PRODB_20211116_7_1_CONTROL';

Starting restore at 16-NOV-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=36 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/16/2021 20:37:05
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> exit

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ rm -f Backup
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_1_1_FULL    PRODB_20211116_4_1_ARCHIVE    PRODB_20211116_6_1_ARCHIVE
PRODB_20211116_2_1_FULL    PRODB_20211116_5_1_ARCHIVE    PRODB_20211116_7_1_CONTROL
[oracle@ambasanode1 Backup]$ cd ..
[oracle@ambasanode1 u01]$ rm -f Backup
rm: cannot remove ‘Backup’: Is a directory
[oracle@ambasanode1 u01]$ rm Backup
rm: cannot remove ‘Backup’: Is a directory
[oracle@ambasanode1 u01]$ rm -f Backup
rm: cannot remove ‘Backup’: Is a directory
[oracle@ambasanode1 u01]$ cd    Backup/
[oracle@ambasanode1 Backup]$ rm PRO*
[oracle@ambasanode1 Backup]$ ls
[oracle@ambasanode1 Backup]$ cd ..
[oracle@ambasanode1 u01]$ pwd
/u01
[oracle@ambasanode1 u01]$ cd Backup/
[oracle@ambasanode1 Backup]$ ls
[oracle@ambasanode1 Backup]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 21:06:40 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter spfile;

NAME                                                                  TYPE           
VALUE
------------------------------------ ----------- ------------------------------
spfile                                                              string           
/u01/app/oracle/product/dbhome
                                                                                     
_2/dbs/spfilePRODB.ora
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ cd /u01/app/oracle/product/dbhome_2/dbs/
[oracle@ambasanode1 dbs]$ vi initPRODB.ora
[oracle@ambasanode1 dbs]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 21:09:58 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> create spfile from pfile;


create spfile from pfile
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance

SQL> shutdown immediate;


ORA-01507: database not mounted

ORACLE instance shut down.


SQL> create spfile from pfile;

File created.

SQL> startup nomount;


ORACLE instance started.

Total System Global Area 1174405120 bytes


Fixed Size                                    8619984 bytes
Variable Size                          822085680 bytes
Database Buffers                    335544320 bytes
Redo Buffers                                8155136 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 dbs]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 21:11:31 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (not mounted)

RMAN> exit;

Recovery Manager complete.


[oracle@ambasanode1 dbs]$ cd /u01/Backup/
[oracle@ambasanode1 Backup]$ ls
PRODB_20211116_17_1_FULL    PRODB_20211116_20_1_ARCHIVE   
PRODB_20211116_22_1_ARCHIVE
PRODB_20211116_18_1_FULL    PRODB_20211116_21_1_ARCHIVE   
PRODB_20211116_23_1_CONTROL
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 21:12:31 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (not mounted)

RMAN> restore controlfile from 'u01/Backup/PRODB_20211116_23_1_CONTROL';

Starting restore at 16-NOV-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/16/2021 21:13:25
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> /

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse
RMAN-02001: unrecognized punctuation symbol "/"

RMAN> restore controlfile from '/u01/Backup/PRODB_20211116_23_1_CONTROL';

Starting restore at 16-NOV-21


using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file


channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/PRODB/control01.ctl
output file name=/u01/app/oracle/oradata/PRODB/control02.ctl
Finished restore at 16-NOV-21

RMAN> alter database mount;

Statement processed
released channel: ORA_DISK_1

RMAN> exit;

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 21:21:32 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name,open_mode from v$database;

NAME            OPEN_MODE
--------- --------------------
PRODB          MOUNTED

SQL> exit;
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@ambasanode1 Backup]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Nov 16 21:24:17 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.    All rights reserved.

connected to target database: PRODB (DBID=2490898024, not open)

RMAN> restore database;

Starting restore at 16-NOV-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK

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 00005 to
/u01/app/oracle/oradata/PRODB/df01.dbf
channel ORA_DISK_1: restoring datafile 00007 to
/u01/app/oracle/oradata/PRODB/users01.dbf
channel ORA_DISK_1: restoring datafile 00008 to
/u01/app/oracle/oradata/PRODB/df03.dbf
channel ORA_DISK_1: restoring datafile 00009 to
/u01/app/oracle/oradata/PRODB/df04.dbf
channel ORA_DISK_1: restoring datafile 00010 to
/u01/app/oracle/oradata/PRODB/df06.dbf
channel ORA_DISK_1: restoring datafile 00011 to
/u01/app/oracle/oradata/PRODB/df07.dbf
channel ORA_DISK_1: reading from backup piece /u01/Backup/PRODB_20211116_18_1_FULL
channel ORA_DISK_1: piece handle=/u01/Backup/PRODB_20211116_18_1_FULL tag=DB_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
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 00001 to
/u01/app/oracle/oradata/PRODB/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to
/u01/app/oracle/oradata/PRODB/df02.dbf
channel ORA_DISK_1: restoring datafile 00003 to
/u01/app/oracle/oradata/PRODB/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to
/u01/app/oracle/oradata/PRODB/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/datafile1.dbf
channel ORA_DISK_1: restoring datafile 00013 to /u02/datafile2.dbf
channel ORA_DISK_1: reading from backup piece /u01/Backup/PRODB_20211116_17_1_FULL
channel ORA_DISK_1: piece handle=/u01/Backup/PRODB_20211116_17_1_FULL tag=DB_FULL
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 16-NOV-21

RMAN> recover database;

Starting recover at 16-NOV-21


using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination


channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=26
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=27
channel ORA_DISK_1: reading from backup piece /u01/Backup/PRODB_20211116_21_1_ARCHIVE
channel ORA_DISK_1: piece handle=/u01/Backup/PRODB_20211116_21_1_ARCHIVE tag=ARCH_LOG
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/app/oracle/product/dbhome_2/dbs/arch1_26_1087576555.dbf
thread=1 sequence=26
archived log file name=/u01/app/oracle/product/dbhome_2/dbs/arch1_27_1087576555.dbf
thread=1 sequence=27
unable to find archived log
archived log thread=1 sequence=28
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/16/2021 21:25:33
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence
28 and starting SCN of 1701834

RMAN> alter database open resetlogs;

Statement processed

RMAN> exit;

Recovery Manager complete.


[oracle@ambasanode1 Backup]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 16 21:27:04 2021

Copyright (c) 1982, 2016, Oracle.    All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name, open_mode from v$database;

NAME            OPEN_MODE
--------- --------------------
PRODB          READ WRITE

SQL>

You might also like