rman的连接

发布时间:2020-08-11 08:51:02 作者:波仔strong
来源:ITPUB博客 阅读:117
1 本地连接 
[oracle@pc6 ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Mar 24 21:23:15 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: HYYK (DBID=2117284640)

2.远处连接

首先在远程创建tnsnames
[oracle@ogg-80 admin]$ vim tnsnames.ora
HYYK =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = hyyk)
    )
  )

其次在远程链接
[oracle@ogg-80 ~]$ rman target sys/oracle@hyyk
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Mar 24 21:38:51 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 11.02.00.01 in TARGET database is not current
PL/SQL package SYS.DBMS_RCVMAN version 11.02.00.01 in TARGET database is not current
connected to target database: HYYK (DBID=2117284640)

这里说明一下rman和数据库的权限RMAN 需要访问目标数据库上sys用户存在的各种数据包,还需要具有启动和关闭目标数据库的权限。因此RMAN 通常以sysdba 用户身份连接到目标数据库。 如果以不具有sysdba 权限的用户连接到目标数据库,RMAN 会报ORA-01031: insufficient privileges 错误。
 
做以下实验

创建一个用户
SYS@hyyk> create user rman identified by rman;

授予权限
SYS@hyyk> grant connect,resource to rman;

测试连接
[oracle@pc6 ~]$ rman target rman/rman
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Mar 24 21:43:04 2018

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: HYYK (DBID=2117284640)


如果在远程用rman用户连接

[oracle@ogg-80 ~]$ rman target rman/rman@hyyk
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Mar 24 21:45:03 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges

这里在本机授予rman用户sysdba权限
SYS@hyyk> grant sysdba to rman;

Grant succeeded.

在次从远程连连接,显示连接成功
[oracle@ogg-80 ~]$ rman target rman/rman@hyyk
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Mar 24 21:59:32 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

PL/SQL package SYS.DBMS_BACKUP_RESTORE version 11.02.00.01 in TARGET database is not current
PL/SQL package SYS.DBMS_RCVMAN version 11.02.00.01 in TARGET database is not current
connected to target database: HYYK (DBID=2117284640)




  




推荐阅读:
  1. Oracle Rman
  2. rman 脚本

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

rman 连接 ma

上一篇:细致入微:如何使用数据泵导出表的部分列数据

下一篇:全面解读自动驾驶的关键组成部分

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》