Hide RMAN Passwords when Connecting to a Target Database (Doc ID 183377.1)

rongshiyuan發表於2014-05-13

How to Hide RMAN Passwords when Connecting to a Target Database (Doc ID 183377.1)


goal: How to connect to RMAN from the operating system command line and hide authentication information

  • fact: Recovery Manager (RMAN)
  • fact: Oracle Server - Enterprise Edition 8.1
  • fix: There are three options available to hide the password :- Method 1 ======== Run the CONNECT commands at the RMAN prompt % rman RMAN> CONNECT TARGET sys/target_pwd@target_str RMAN> CONNECT CATALOG rman/cat_pwd@cat_str Method 2 ======== Run a command file at the RMAN prompt that contains the connection information. Create execute-only privileges on the command file. For example, if running RMAN in an UNIX environment:- 1. Start RMAN without connecting to any databases: % rman 2. Place the connection information in a text file. For example, place the following lines in a file called connect_rman: CONNECT TARGET sys/target_pwd@target_str CONNECT CATALOG rman/cat_pwd@cat_str 3. Change the permissions on the connect script so that everyone can execute the script but only the desired users have read access. For example, enter: % chmod 711 connect_rman 4. Run the script from the RMAN prompt to connect to the target and catalog databases. For example: RMAN> @connect_rman Method 3 ========= Run RMAN using the cmdfile option by using the following lines in the backup script file:- set echo off; @ connect target sys/my_secret_password; set echo on; There are four ways to run the cmdfile :- (1) cmdfile option on rman command: $ rman cmdfile scriptname.rm (2) Unix file redirection: $ rman < scriptname.rm (3) Unix pipe: $ cat scriptname.rm | rman (4) RMAN's "@" command: $ echo '@scriptname.rm' | rman

    來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1160625/,如需轉載,請註明出處,否則將追究法律責任。

    相關文章