Professional Documents
Culture Documents
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.
│
└──────────────────────────────────────────────────────────────────────┘
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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"
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
connected to target database: PRODB (not mounted)
RMAN> exit
Usage 1: sqlplus -H | -V
<option> is: [-AC] [-C <version>] [-L] [-M "<options>"] [-NOLOGINTIME] [-R
<level>]
[-S]
@[<net_service_name> | [//]Host[:Port]/<service_name>]
sqlplus myusername/mypassword@ORCL
sqlplus myusername/mypassword@Host/ORCL
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
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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 /
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Statement processed
released channel: ORA_DISK_1
RMAN> exit
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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 /
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
RMAN> exit
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
RMAN> exit
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Statement processed
RMAN> exit
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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 /
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
RMAN>
RMAN>
RMAN> exit
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Password:
Connected to database PRODB (DBID=2490898024)
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Password:
Connected to database PRODB (DBID=2490898024)
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Password:
Connected to database PRODB (DBID=2490898024)
NAME TYPE
VALUE
------------------------------------ ----------- ------------------------------
db_name string
PRODB
SQL> alter system set db_name='LTECHDB' scope=spfile;
System altered.
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
Database altered.
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'
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
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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.
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
SQL> exit
Disconnected
[oracle@ambasanode1 Backup]$ show parameter spfile
bash: show: command not found...
[oracle@ambasanode1 Backup]$ sqlplus / as sysdba
File created.
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
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-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
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
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-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
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
─────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────
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.
│
└──────────────────────────────────────────────────────────────────────┘
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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 /
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
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
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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"
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
File created.
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
RMAN> exit;
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
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 "/"
Statement processed
released channel: ORA_DISK_1
RMAN> exit;
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 /
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Statement processed
RMAN> exit;
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
NAME OPEN_MODE
--------- --------------------
PRODB READ WRITE
SQL>