Re: RMAN error: ORA-01031 Insufficient privileges
Date: Tue, 4 Dec 2012 07:44:10 -0800 (PST)
Message-ID: <2ce3136e-efb5-4421-a495-df72c1c1991b_at_googlegroups.com>
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 setinput 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 Received on Tue Dec 04 2012 - 16:44:10 CET