Re: RMAN error: ORA-01031 Insufficient privileges

From: <gnewsgroup_at_gmail.com>
Date: Tue, 4 Dec 2012 16:40:14 -0800 (PST)
Message-ID: <12857cfe-64dd-4ecd-9f66-9c7233753404_at_googlegroups.com>



On Tuesday, December 4, 2012 10:44:10 AM UTC-5, ddf wrote:
> On Tuesday, December 4, 2012 7:02:24 AM UTC-7, gnews..._at_gmail.com wrote:
>
> > On Tuesday, December 4, 2012 8:01:33 AM UTC-5, gnews..._at_gmail.com wrote:
>
> >
>
> > > I do have a lot of experiences in MS SQL Server, but sorta new to Oracle.
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > > I have Oracle XE on Windows 7 Enterprise. I am learning how to use RMAN to back up my database.
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > > So, I issued rman target / and got this:
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > > Recovery Manager: Release 11.2.0.2.0 - Production on Tue Dec 4 07:55:14 2012
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > > Copyright (c) 1982, 2009, 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
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > >
>
> >
>
> > > I searched and found solutions on a Unix based system. But this is Windows, how do I make sure I can successfully launch rman? What do I need to do? Thank you!
>
> >
>
> >
>
> >
>
> > I did the following.
>
> >
>
> >
>
> >
>
> > Execute rman with 0 arguments, that gets me into the rman prompt.
>
> >
>
> >
>
> >
>
> > Then I execute connect target sys
>
> >
>
> >
>
> >
>
> > Then I entered the password and got in:
>
> >
>
> >
>
> >
>
> > RMAN> connect target sys
>
> >
>
> >
>
> >
>
> > target database Password:
>
> >
>
> > connected to target database: XE (DBID=2681755392)
>
> >
>
> >
>
> >
>
> > RMAN>
>
> >
>
> >
>
> >
>
> > So, I am connected to XE as sys. Now I want to back up only tablespace hr, how to do it? All I found online is this simple command: BACKUP DATABASE. That doesn't tell me what it is backing up. I don't want to back up all tablespaces in my XE instance.
>
> >
>
> >
>
> >
>
> > Thanks.
>
>
>
> First, with Windows, you need to be connected as the Administrator account which installed the Oracle software to use the '/' connection shortcut.
>
>
>
> Now, to backup a tablespace with RMAN the command is simple:
>
>
>
> RMAN> backup tablespace hr tag hr_backup;
>
>
>
> Presuming the database is in ARCHIVELOG mode you can backup the tablespace while the database is running. If the database is in NOARCHIVELOG mode then you must shutdown the database, start it up in mount mode and then backup the tablespace:
>
>
>
> RMAN> shutdown
>
>
>
> database closed
>
> database dismounted
>
> Oracle instance shut down
>
>
>
> RMAN> startup mount
>
>
>
> connected to target database (not started)
>
> Oracle instance started
>
> database mounted
>
>
>
> Total System Global Area 753299456 bytes
>
>
>
> Fixed Size 1387240 bytes
>
> Variable Size 213910808 bytes
>
> Database Buffers 532676608 bytes
>
> Redo Buffers 5324800 bytes
>
>
>
> RMAN> backup tablespace hr tag hr_bkp;
>
>
>
> Starting backup at 04-DEC-12
>
> allocated channel: ORA_DISK_1
>
> channel ORA_DISK_1: SID=63 device type=DISK
>
> channel ORA_DISK_1: starting full datafile backup set
>
> channel ORA_DISK_1: specifying datafile(s) in backup set
>
> input datafile file number=00007 name=C:\ORADB\ORADATA\SMEDLEY\HR01.DBF
>
> channel ORA_DISK_1: starting piece 1 at 04-DEC-12
>
> channel ORA_DISK_1: finished piece 1 at 04-DEC-12
>
> piece handle=C:\ORADB\FLASH_RECOVERY_AREA\SMEDLEY\BACKUPSET\2012_12_04\O1_MF_NNNDF_HR_BKP_8CW68821_.BKP tag=HR_BKP comment=NONE
>
> channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
>
> Finished backup at 04-DEC-12
>
>
>
> RMAN>
>
>
>
> How you can open the database and get back to work:
>
>
>
> RMAN> sql "alter database open";
>
>
>
> sql statement: alter database open
>
>
>
> RMAN>
>
>
>
>
>
> David Fitzjarrell

Thank all of you. I tried exactly like what David did, but I got an error, which says "Could not translate tablespace name "HR". look:

RMAN> connect target sys

target database Password:
connected to target database: XE (DBID=2681865143)

RMAN> backup tablespace hr tag hrbackup
2> ;

Starting backup at 04-DEC-12
using target database control file instead of recovery catalog allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=95 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/04/2012 19:32:21
RMAN-20202: Tablespace not found in the recovery catalog RMAN-06019: could not translate tablespace name "HR"

RMAN> shutdown

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount

connected to target database (not started) Oracle instance started
database mounted

Total System Global Area 1071333376 bytes

Fixed Size                     1388352 bytes
Variable Size                629145792 bytes
Database Buffers             436207616 bytes
Redo Buffers                   4591616 bytes

RMAN> backup tablespace hr tag hr_backup;

Starting backup at 04-DEC-12
allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=5 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/04/2012 19:33:18
RMAN-20202: Tablespace not found in the recovery catalog RMAN-06019: could not translate tablespace name "HR"

RMAN> But, I do have HR. Look:

SQL> select count(*) "total_count" from hr.employees;

total_count


        107

SQL> Received on Wed Dec 05 2012 - 01:40:14 CET

Original text of this message