DBA Tips Archive for Oracle
Creating an RMAN Database User on the Target Database for Backups
by Jeff Hunter, Sr. Database Administrator
By default, when RMAN logs into the target database, it does so as the SYS account (as SYSDBA) without any configuration required. This is commonly not what you would want to do in a production system. It is recommended that you create specific database accounts to be used just for RMAN backup purposes. Before going in to the details of how to do this, lets first look at how to log in using the default SYS account:
% ORACLE_SID=TARGDB; export ORACLE_SID % rman target /The above command will login to the target database (TARGDB) using the SYS account (as SYSDBA).
Now, let's go ahead and create the database user that will be used for all RMAN backups:
% sqlplus "/ as sysdba" SQL> CREATE USER backup_admin IDENTIFIED BY backup_admin 2 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; SQL> GRANT sysdba TO backup_admin;
After creating the RMAN backup user, you can now login to the target database using the following:
% rman target backup_admin/backup_adminNotice that the above command will login to the target database (in this case, whatever database is set by the ORACLE_SID environment variable) using SYSDBA privileges. We do not have to specify the "as sysdba" clause when logging into RMAN; it is assumed and RMAN will always use SYSDBA privileges.
Copyright (c) 1998-2018 Jeffrey M. Hunter. All rights reserved.
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at email@example.com.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.