RMAN throw error ORA-01031: insufficient privileges

RMAN throw error ORA-01031: insufficient privileges

One of my friend call and say after giving the DBA privileges to the User in Oracle Database.
Tried to run the rman backup and getting the below error:


C:\Users\oracle>rman target backup1
Recovery Manager: Release 11.2.0.2.0 - Production on Fri Feb 22 14:34:35 2019
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
target database Password:
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

Then i check the permission he given:

SQL> create user backup1 identified by "xxxx";
User created.

SQL> grant connect,resource to backup1;
Grant succeeded.

SQL> grant all privileges to backup1;
Grant succeeded.

SQL> grant dba to backup1;
Grant succeeded.

SQL> grant create session to backup1;
Grant succeeded.

Solution
Not assigned the role of SYSDBA. Only DBA role assigned to user which not have permission to take RMAN backup.
After assigned the following role to user then RMAN script is connected perfectly without error.

GRANT SYSDBA to backup1;

-- You can also assign SYSBACKUP Role introduced in Oracle 12c
GRANT SYSBACKUP to backup1;

After assigned SYSDBA role to user it will connect:

C:\Users\oracle>rman target backup1
Recovery Manager: Release 11.2.0.2.0 - Production on Fri Feb 22 14:34:55 2019
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: XE (DBID=2837611007)
RMAN> exit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.