Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the rman command in Oracle database

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to use rman commands in Oracle database. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

How to use common commands in Oracle database rman

Connect to rman

1. Connect to the target database (do not use the recovery directory)

[oracle@localhost~] $rmantargetevan/evan@oralifenocatalog

Connect to the target database at the rman prompt:

[oracle@localhost~] $rmannocatalogRMAN > connecttargetevan/evan@oralife

2 connect to the target database and the recovery catalog database

Rmantargetevan/evan@oralifecatalogrman/rman@rcat

Connect to the target database at the rman prompt:

[oracle@localhost~] $rmanRMAN > connecttargetevan/evan@oralifeRMAN > connectcatalogrman/rman@rcat

3 connect to the target database and the secondary database

Connect at the terminal.

Connect at the rman prompt.

Rman command

1. Stand-alone commands, such as: RMAN > shutdownimmediate,RMAN > backup...

two。 Job command

Commands that cannot be used in active commands:

CONNECTCONFIGURECREATECATALOG,DROPCATALOG,UPGRADECATALOGCREATESCRIPT,DELETESCRIPT,REPLACESCRIPTLISTREPORTrun block example: RMAN > RUN {...}

3. Run the sql command

Use sql

For example: RMAN > sql'altersystemswitchlogfile'

How to use common commands in Oracle database rman

4. Run the storage script

Create a storage script using the recovery directory. To run the storage script, you must run it within the run block, such as:

RMAN > run {executescripttest;}

5. Run the OS command

In rman, you must use the run block to run os commands, such as:

RMAN > run {host "ls-l/home";} Total 12drwx-26evanevan409608-1421:27evandrwx-10oracleoinstall409608-1420:58oraclehostcommandcomplete

6. Run a batch file

Example:

TestBat.bat:sql'altersystemswitchlogfile';backup. [oracle@localhost~] $rmantargetevan/evan@oralifenocatalog@/home/oracle/testBat.batlogtestlog.log

Log specifies the log file.

This is how to use the rman command in the Oracle database shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report