RMAN客户端是通过在你的操作系统的提示符下输入rman命令而启动的。
|
[oracle@S1011:/export/home/oracle]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jul 4 09:12:58 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> |
到数据库的RMAN连接的指定和认证方式与SQL*Plus一致。
唯一的区别是RMAN连接到目标或辅助数据库需要SYSDBA权限。
AS SYSDBA关键字是隐式的,不能被显式地指定。
注意:好的安全的实践是不应该在命令行以文本的形式输入口令,而是应该在RMAN提示输入口令时再输入。
|
# 使用CONNECT TARGET连接到目标数据库 RMAN> connect target sys@testdb11
target database Password: connected to target database: TESTDB11 (DBID=2578856066)
# 使用操作系统认证连接到目标数据库 RMAN> connect target /
connected to target database: TESTDB11 (DBID=2578856066)
# rman命令行选项的语法 RMAN [ TARGET connectStringSpec | { CATALOG connectStringSpec } | LOG ['] filename ['] [ APPEND ] . . . ]...
connectStringSpec::= ['] [userid] [/ [password]] [@net_service_name] [']
# 将RMAN会话的输出附加到/export/home/oracle/rman.log文件 # 1. 自己创建一个日志文件 oracle@Redhat55.cuug.net:/home/oracle> touch rman.log oracle@Redhat55.cuug.net:/home/oracle> ls rman.log # 2. 启动RMAN时指定自己的日志文件 oracle@Redhat55.cuug.net:/home/oracle> rman target / log /home/oracle/rman.log append # 3. 执行一些操作 RMAN> report obsolete; RMAN> list backup; RMAN> exit oracle@Redhat55.cuug.net:/home/oracle> more rman.log
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Jul 12 00:19:44 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTDB12 (DBID=2811829300)
RMAN> using target database control file instead of recovery catalog RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 no obsolete backups found
RMAN> specification does not match any backup in the repository
RMAN>
Recovery Manager complete. |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1079865/ ,如需转载,请注明出处,否则将追究法律责任。