Get the App
SLTechnology News&Howtos  ›  Database  › 

Connection of rman

Shulou Source: shulou.com Published: 2022-06-01 05:38:39 10月02日 Update

1 Local connection [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)

two。 Remote connection

First create 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)) remotely)

Secondly, the remote link [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)

It is explained here that the permissions for rman and database RMAN requires access to various packets that exist by the sys user on the target database, as well as permission to start and shut down the target database. Therefore, RMAN usually connects to the target database as the sysdba user. If you connect to the target database with a user who does not have sysdba privileges, RMAN reports an ORA-01031: insufficient privileges error. Do the following experiments

Create a user SYS@hyyk > create user rman identified by rman

Grant permissions SYS@hyyk > grant connect,resource to rman

Test connection [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)

If you connect remotely with a rman user

[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

Here, the rman user is granted sysdba permissions SYS@hyyk > grant sysdba to rman locally.

Grant succeeded.

On the second remote connection, the connection is successful [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)

Tags: Data user database permissions target success identity link error will report native lab test Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Xiaomi Shulou Technology OPPO Reno Shulou Information