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

[oracle@host01 ~]$ Rman catalog u1/u1@rcat

-bash: Rman: command not found


[oracle@host01 ~]$ rman catalog u1/u1@rcat

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:09:32 2015

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

connected to recovery catalog database

RMAN> create catalog tabalespace ts1;

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: "newline,
tablespace, ;"
RMAN-01008: the bad identifier was: tabalespace
RMAN-01007: at line 1 column 16 file: standard input

RMAN> create catalog tablespace ts1;

recovery catalog created

RMAN> exit

Recovery Manager complete.


[oracle@host01 ~]$ rman target sys/oracle@testdb

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:14:06 2015

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

connected to target database: TESTDB (DBID=2661449548)

RMAN> catalog u1/u1@rcat

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: "archivelog,
backuppiece, backup, controlfilecopy, datafilecopy, db_recovery_file_dest, device,
recovery, start"
RMAN-01008: the bad identifier was: u1
RMAN-01007: at line 1 column 9 file: standard input

RMAN> rman target sys/oracle@testdb catalog u1/u1@rcat


2> ;

using target database control file instead of recovery catalog


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of argument list command at 04/28/2015 12:15:20
RMAN-06014: command not implemented yet: argument list
RMAN> exit

Recovery Manager complete.


[oracle@host01 ~]$ rman target sys/oracle@testdb

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:15:47 2015

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

connected to target database: TESTDB (DBID=2661449548)

RMAN> exit

Recovery Manager complete.


[oracle@host01 ~]$ rman catalog u1/u1@rcat

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:17:21 2015

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

connected to recovery catalog database

RMAN> create catalog tabalespace ts1;

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: "newline,
tablespace, ;"
RMAN-01008: the bad identifier was: tabalespace
RMAN-01007: at line 1 column 16 file: standard input

RMAN> create catalog tablespace ts1;

recovery catalog already exists

RMAN> exit

Recovery Manager complete.


[oracle@host01 ~]$ rman target sys/oracle@testdb catalog u1/u1@rcat

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:18:18 2015

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

connected to target database: TESTDB (DBID=2661449548)


connected to recovery catalog database

RMAN> register database;

database registered in recovery catalog


starting full resync of recovery catalog
full resync complete

RMAN> delete backup;


allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=42 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=38 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=39 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=37 device type=DISK

List of Backup Pieces


BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
84 82 1 1 AVAILABLE DISK /u01/app/oracle/c-2661449548-
20150428-04
85 83 1 1 AVAILABLE DISK /u01/app/oracle/c-2661449548-
20150428-05

Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/u01/app/oracle/c-2661449548-20150428-04 RECID=31
STAMP=878210694
deleted backup piece
backup piece handle=/u01/app/oracle/c-2661449548-20150428-05 RECID=33
STAMP=878210995
Deleted 2 objects

RMAN> exit

Recovery Manager complete.


[oracle@host01 ~]$
[oracle@host01 ~]$
[oracle@host01 ~]$ rman target sys/oracle@testdb

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:26:19 2015

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

connected to target database: TESTDB (DBID=2661449548)

RMAN> backup tablespace users;

Starting backup at 28-APR-15


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=38 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=42 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=41 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=46 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/testdb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-APR-15
channel ORA_DISK_1: finished piece 1 at 28-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2015_04_28/
o1_mf_nnndf_TAG20150428T122652_bmyz4dbc_.bkp tag=TAG20150428T122652 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-APR-15

Starting Control File and SPFILE Autobackup at 28-APR-15


piece handle=/u01/app/oracle/c-2661449548-20150428-06 comment=NONE
Finished Control File and SPFILE Autobackup at 28-APR-15

RMAN> exit

Recovery Manager complete.


[oracle@host01 ~]$ rman target sys/oracle@testdb catalog u1/u1@rcat

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Apr 28 12:28:33 2015

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

connected to target database: TESTDB (DBID=2661449548)


connected to recovery catalog database

RMAN> resync catalog;

starting full resync of recovery catalog


full resync complete

RMAN> backup current controlfile;

Starting backup at 28-APR-15


allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=40 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=44 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=42 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=38 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 28-APR-15
channel ORA_DISK_1: finished piece 1 at 28-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2015_04_28/
o1_mf_ncnnf_TAG20150428T122927_bmyz98jb_.bkp tag=TAG20150428T122927 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-APR-15

Starting Control File and SPFILE Autobackup at 28-APR-15


piece handle=/u01/app/oracle/c-2661449548-20150428-07 comment=NONE
Finished Control File and SPFILE Autobackup at 28-APR-15

RMAN>
RMAN> create script s1
2> {
3> backup tablespace users;
4> }

created script s1
RMAN> list script names;

List of Stored Scripts in Recovery Catalog

Scripts of Target Database TESTDB

Script Name
Description
-----------------------------------------------------------------------
s1

RMAN> print script s1;

printing stored script: s1


{
backup tablespace users;
}

RMAN> replace script s1


2> {
3> backup tablespace users;
4> backup as copy tablespace users;
5> }

replaced script s1

RMAN> print script s1;

printing stored script: s1


{
backup tablespace users;
backup as copy tablespace users;
}

RMAN> list all script names;

List of Stored Scripts in Recovery Catalog

Scripts of Target Database TESTDB

Script Name
Description
-----------------------------------------------------------------------
s1

RMAN> run { exec script s1;}

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, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,
duplicate, execute, flashback, host, mount, open, recover, release, repair, report,
restore, resync, send, set, show, shutdown, sql, startup, switch, transport,
validate, "
RMAN-01008: the bad identifier was: exec
RMAN-01007: at line 1 column 7 file: standard input

RMAN> print script s1


2> ;

printing stored script: s1


{
backup tablespace users;
backup as copy tablespace users;
}

RMAN> run { exec script s1; }

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, backup, @, catalog, change, configure, convert, copy, crosscheck, delete,
duplicate, execute, flashback, host, mount, open, recover, release, repair, report,
restore, resync, send, set, show, shutdown, sql, startup, switch, transport,
validate, "
RMAN-01008: the bad identifier was: exec
RMAN-01007: at line 1 column 7 file: standard input

RMAN> run { execute script s1; }

executing script: s1

Starting backup at 28-APR-15


using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/testdb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-APR-15
channel ORA_DISK_1: finished piece 1 at 28-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2015_04_28/
o1_mf_nnndf_TAG20150428T124123_bmyzzmrq_.bkp tag=TAG20150428T124123 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-APR-15

Starting backup at 28-APR-15


using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/testdb/users01.dbf
output file
name=/u01/app/oracle/fast_recovery_area/TESTDB/datafile/o1_mf_users_bmyzzooz_.dbf
tag=TAG20150428T124125 RECID=3 STAMP=878215285
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 28-APR-15

Starting Control File and SPFILE Autobackup at 28-APR-15


piece handle=/u01/app/oracle/c-2661449548-20150428-08 comment=NONE
Finished Control File and SPFILE Autobackup at 28-APR-15

RMAN> delete script s1;

deleted script: s1

lsit script name (local)


list global script name (global)

RMAN> unregister database;

database name is "TESTDB" and DBID is 2661449548

Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog

RMAN> drop catalog;

recovery catalog owner is U1


enter DROP CATALOG command again to confirm catalog removal

You might also like