Recovery Manager (Rman) is a utility provided by Oracle that uses RMAN to back up, restore, restore, and so on to an Oracle database. Rman can also automate the management of Oracle's backup strategy. Rman provides two ways to access the command line and graphical interface. We mainly study the command line mode of Operation Rman.
It is very simple to enter Rman, which can be done by typing the Rman command in an OS environment.
[[email protected] ~]# su-oracle11gdg-> rmanrecovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:30:07 2 015Copyright (c) 1982, Oracle and/or its affiliates. All rights reserved. Rman>
We want to use Rman to back up the database, restore, and so on, first need to log on to the target database. There are several ways to connect to the target database:
11gdg-> Rman target/recovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:32:36 2015Copyright (c) 1982, 20 One, Oracle and/or its affiliates. All rights reserved.connected to target Database:devdb (dbid=789087786) rman>
The target keyword is used to specify the destination database. If you have multiple instances of the local server and want to log on to a specific instance, you need to declare the environment variable export ORACLE_SID=ORCL
To log on to a remote server, you must first provide a connection string that edits the local Tnsnames.ora file to add the database to which you want to connect.
11gdg-> rman target Sys/[email protected]recovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:40:05 2015Co Pyright (c) 1982, Oracle and/or its affiliates. All rights reserved.connected to target Database:devdb (dbid=789087786) rman>
Of course, the above two ways, you can also use Rman to start the program, in Rman using connect connection database.
11gdg-> rmanrecovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:42:47 2015Copyright (c) 1982, Oracl e and/or its affiliates. All rights reserved. Rman> Connect targetconnected to target Database:devdb (dbid=789087786) rman>
Or
11gdg-> rmanrecovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:42:47 2015Copyright (c) 1982, Oracl e and/or its affiliates. All rights reserved. Rman> Connect target sys/[email protected]connected to target Database:devdb (dbid=789087786) rman>
Exit Rman. Press Ctrl+d in the Rman environment, or enter the Exit command.
11gdg-> rmanrecovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:42:47 2015Copyright (c) 1982, Oracl e and/or its affiliates. All rights reserved. Rman> Connect target sys/[email protected]connected to target Database:devdb (dbid=789087786) rman> exitrecovery Ma Nager complete.11gdg->
Rman provides the log parameter to redirect the logs that are printed during Rman execution to the file specified by log. The log parameter can only be used on the command line and cannot be used in the Rman runtime environment.
11gdg-> Rman target/log=rman.logrman> 11gdg-> cat rman.log Recovery manager:release 11.2.0.3.0-production on Wed Jul 8 00:47:05 2015Copyright (c) 1982, and Oracle and/or its affiliates. All rights reserved.connected to target Database:devdb (dbid=789087786) 11gdg->
This article is from the "Ding Dong" blog, please be sure to keep this source http://lqding.blog.51cto.com/9123978/1679566
The Oracle Learning Rman (i)