3

oracle 19c中连接rman客户端的连接方法 -利来国际app

 rman客户端是用于执行backup,restore和recover命令的rman程序。本文介绍几种连接rman客户端的办法,sysbackup是12c开始引入的新的角色,目地在于分离权限,使数据库的权限管理更
加精准化,同时结合新的权限和角色,在日常运维中我们也可以将rman备份用户进行分离,不再像之前版本大多操作通过sys
用户完成。
1、本地连接方式
分别使用sysbakcup角色和操作系统认证方式
[[email protected] ~]$ export oracle_sid=cdb19c
 [[email protected] ~]$ rman target '"/as sysbackup"'
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 11:46:29 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 connected to target database: cdb19c (dbid=509743990)
 
 
[[email protected] ~]$ rman target /
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 11:48:42 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 connected to target database: cdb19c (dbid=509743990)
 rman>
通过创建一个用户授予sysbackup角色进行连接
创建备份用户,这里我们创建一个公共用户 c##backupuser 
[email protected] >create user c##backupuser identified by oracle_123;
 user created.
 [email protected] >grant sysbackup to  c##backupuser;
 grant succeeded.
 [email protected] >
 [[email protected] ~]$ rman target c##backupuser/oracle_123
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 11:51:30 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 connected to target database: cdb19c (dbid=509743990)
 
[[email protected] ~]$ rman
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 11:53:30 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 rman> connect target c##backupuser/oracle_123
 connected to target database: cdb19c (dbid=509743990)
 rman> exit
 recovery manager complete.
 
[[email protected] ~]$ rman
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 11:53:54 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 rman> connect target /
 connected to target database: cdb19c (dbid=509743990)
 rman> exit
 [[email protected] ~]$ rman
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 11:55:28 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 rman> connect target '"/ as sybackup"'
 target database password:
 connected to target database: cdb19c (dbid=509743990)
 rman>
 2、远程连接
 通过配置tnsnames.ora文件连接rman客户端,cdb19c的别名是已经配置好的,这里也可以使用easy connect连接
 使用我们创建的c##backupuser备份用户连接
 [[email protected] ~]$ rman target '"c##backupuser/[email protected] as sysbackup"'
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 12:53:06 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 connected to target database: cdb19c (dbid=509743990)
 rman>
 通过sys用户连接到cdb
 [[email protected] ~]$ rman target sys/[email protected]
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 12:53:49 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 connected to target database: cdb19c (dbid=509743990)
 rman>
 通过sys用户连接到pdb
 [[email protected] ~]$ rman target sys/[email protected]
 recovery manager: release 19.0.0.0.0 - production on sat aug 21 12:54:07 2021
 version 19.3.0.0.0
 利来娱乐 copyright (c) 1982, 2019, oracle and/or its affiliates.  all rights reserved.
 connected to target database: cdb19c:hrpdb (dbid=3868540829)
 rman>
 -the end-
最后修改时间:2021-11-02 09:44:18
「喜欢文章,快来给作者赞赏墨值吧」
【利来手机国际的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:[email protected]进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论