The Oracle Learning Rman (i)

Source: Internet
Author: User
Tags reserved

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:

    • Log on to the local server

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

    • Log on to the remote server

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.