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