Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 11

[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:29:16 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> restore tablespace users;


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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:29:48 2021

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

reconnected to target database: ORCL (DBID=1597410846)

RMAN>restore tablespace users;

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: "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-01008: the bad identifier was: rrestore
RMAN-01007: at line 1 column 1 file: standard input

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:30:11
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup
RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:31: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> administer key management set keystore open identified by password;


administer key management set keystore open identified by password
*
ERROR at line 1:
ORA-28354: Encryption wallet, auto login wallet, or HSM is already open

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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:33:13 2021

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

connected to target database: ORCL (DBID=1597410846)

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:33:25
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> administer key management set keystore close identified by password;

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: "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-01008: the bad identifier was: administer
RMAN-01007: at line 1 column 1 file: standard input

RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:35:36 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> administer key management set keystore close identified by password;

keystore altered.

SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@myhost orcl]$ ll
total 2553100
-rw-r----- 1 oracle oinstall 10600448 Apr 16 12:35 control01.ctl
-rw-r----- 1 oracle oinstall 10600448 Apr 16 12:35 control02.ctl
-rw-r----- 1 oracle oinstall 209715712 Apr 16 11:51 redo01.log
-rw-r----- 1 oracle oinstall 209715712 Apr 16 12:20 redo02.log
-rw-r----- 1 oracle oinstall 209715712 Apr 16 12:35 redo03.log
-rw-r----- 1 oracle oinstall 503324672 Apr 16 12:35 sysaux01.dbf
-rw-r----- 1 oracle oinstall 849354752 Apr 16 12:32 system01.dbf
-rw-r----- 1 oracle oinstall 33562624 Apr 16 11:51 temp01.dbf
-rw-r----- 1 oracle oinstall 536879104 Apr 16 12:25 tsrman01.dbf
-rw-r----- 1 oracle oinstall 73408512 Apr 16 12:32 undotbs01.dbf
[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:39: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> administer key management set keystore open identified by password;

keystore altered.

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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:39:54 2021

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

connected to target database: ORCL (DBID=1597410846)

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:40:06
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:40: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 tablespace users offline immediate;

Tablespace altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production
[oracle@myhost orcl]$ rman target /
Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:40:36 2021

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

connected to target database: ORCL (DBID=1597410846)

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=73 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:40:42
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> select WRL_PARAMETER,STATUS,WALLET_TYPE from v$encryption_wallet;

WRL_PARAMETER
--------------------------------------------------------------------------------
STATUS WALLET_TYPE
------------------------------ --------------------

/u02/wallet/
OPEN PASSWORD

RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:44: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> administer key management set keystore close identified by 'password';


administer key management set keystore close identified by 'password'
*
ERROR at line 1:
ORA-00988: missing or invalid password(s)
SQL> administer key management set keystore close identified by password;

keystore altered.

SQL> select WRL_PARAMETER,STATUS,WALLET_TYPE from v$encryption_wallet;

WRL_PARAMETER
--------------------------------------------------------------------------------
STATUS WALLET_TYPE
------------------------------ --------------------
/u02/wallet/
CLOSED UNKNOWN

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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:45:23 2021

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

connected to target database: ORCL (DBID=1597410846)

RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:45:29 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> administer key management set keystore open identified by password;

keystore altered.

SQL> select WRL_PARAMETER,STATUS,WALLET_TYPE from v$encryption_wallet;

WRL_PARAMETER
--------------------------------------------------------------------------------
STATUS WALLET_TYPE
------------------------------ --------------------
/u02/wallet/
OPEN PASSWORD

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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:46:33 2021


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

connected to target database: ORCL (DBID=1597410846)

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:46:43
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> shutdown immediate

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount

connected to target database (not started)


Oracle instance started
database mounted

Total System Global Area 1660944384 bytes

Fixed Size 8621376 bytes


Variable Size 1056965312 bytes
Database Buffers 587202560 bytes
Redo Buffers 8155136 bytes

RMAN> restore tablespace users;

Starting restore at 16-APR-21


allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:47:35
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup
ORA-28365: wallet is not open

RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:48:06 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> administer key management set keystore open identified by password;

keystore altered.

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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:48:26 2021

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

connected to target database: ORCL (DBID=1597410846, not open)

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:48:44
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> exit

Recovery Manager complete.


[oracle@myhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 16 12:50:15 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 status from v$encryption_wallet;

STATUS
------------------------------
OPEN

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

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 16 12:50:33 2021

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

connected to target database: ORCL (DBID=1597410846, not open)

RMAN> show all;

using target database control file instead of recovery catalog


RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u02/rman_bkp/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE ON;
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD
TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO
'/u01/app/oracle/product/12.2.0/db_1/dbs/snapcf_ORCL.f'; # default

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON;

old RMAN configuration parameters:


CONFIGURE ENCRYPTION FOR DATABASE ON;
new RMAN configuration parameters:
CONFIGURE ENCRYPTION FOR DATABASE ON;
new RMAN configuration parameters are successfully stored

RMAN> restore tablespace users;

Starting restore at 16-APR-21


allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:51:23
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> CONFIGURE ENCRYPTION ALGORITHM 'AES256';

new RMAN configuration parameters:


CONFIGURE ENCRYPTION ALGORITHM 'AES256';
new RMAN configuration parameters are successfully stored

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using channel ORA_DISK_1

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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:51:41
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> SET ENCRYPTION ON IDENTIFIED BY 'password' only;

executing command: SET encryption

RMAN> restore tablespace users;

Starting restore at 16-APR-21


using channel ORA_DISK_1

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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2021 12:55:16
ORA-19870: error while restoring backup piece /u02/rman_bkp/df_ORCL_11_1
ORA-19913: unable to decrypt backup

RMAN> set DECRYPTION identified by 'password';

executing command: SET decryption


RMAN> restore tablespace users;

Starting restore at 16-APR-21


using channel ORA_DISK_1

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 00007 to
/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/rman_bkp/df_ORCL_11_1
channel ORA_DISK_1: piece handle=/u02/rman_bkp/df_ORCL_11_1 tag=TAG20210416T121924
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 16-APR-21

RMAN>

You might also like