Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMAN error: ORA-01031 Insufficient privileges

2,907 views
Skip to first unread message

gnews...@gmail.com

unread,
Dec 4, 2012, 8:01:33 AM12/4/12
to
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!

gnews...@gmail.com

unread,
Dec 4, 2012, 9:02:24 AM12/4/12
to
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.

Mladen Gogala

unread,
Dec 4, 2012, 10:29:31 AM12/4/12
to
On Tue, 04 Dec 2012 06:02:24 -0800, gnewsgroup wrote:


>
> 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.

Have you tried "BACKUP TABLESPACE"?

http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#i78895

Also, make sure that you are launching rman from the account which is a
member of ORA_DBA group. You need that group to be able to connect as SYSDBA
which is what RMAN does when connecting to the database.
Also, I can wholeheartedly recommend Rob Freeman's RMAN books as well as
Sam Alapati's and Arup Nanda's "RMAN recipes".
In addition to all that, Oracle documentation is accessible freely on the
internet. The addresses are:

http://www.oracle.com/technetwork/indexes/documentation/index.html
http://tahiti.oracle.com/



--
http://mgogala.byethost5.com

ddf

unread,
Dec 4, 2012, 10:44:10 AM12/4/12
to
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

joel garry

unread,
Dec 4, 2012, 1:07:37 PM12/4/12
to
Also note there is a .bat file you can get some clues from. If you
right click on the "backup database" you get to from the start menu,
click on properties, you can see where to look at it. I know I
learned some new things from it.

jg
--
@home.com is bogus.
http://www.theregister.co.uk/2012/12/04/oracle_2013_dividend_pre_paid/

gnews...@gmail.com

unread,
Dec 4, 2012, 7:40:14 PM12/4/12
to
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>

Eric

unread,
Dec 5, 2012, 3:05:46 AM12/5/12
to
On 2012-12-05, gnews...@gmail.com <gnews...@gmail.com> wrote:
>
...
>
> SQL> select count(*) "total_count" from hr.employees;
>
> total_count
> -----------
> 107
>


Which proves that you have a *schema* called HR, not a tablespace! You
appear to be operating in a fog of insufficient knowledge.

Eric
--
ms fnd in a lbry

gnews...@gmail.com

unread,
Dec 5, 2012, 7:47:14 AM12/5/12
to
Thank you. You shouldn't be surprised because I started by saying I am new to Oracle, please help by explaining the difference between a tablespace and a schema, which I have assumed to be the same.

gnews...@gmail.com

unread,
Dec 5, 2012, 7:58:40 AM12/5/12
to
On Wednesday, December 5, 2012 3:05:46 AM UTC-5, Eric wrote:
I ran SELECT * FROM DBA_USERS; and found that the default tablespace of HR is Users.

So, the question becomes what I should do to backup only HR instead of everything in the Users tablespace.

If you'd like to offer a reference to Oracle documentation, please be more specific (instead of doc.oracle.com). Thank you.

Mladen Gogala

unread,
Dec 5, 2012, 10:07:31 AM12/5/12
to
On Wed, 05 Dec 2012 04:47:14 -0800, gnewsgroup wrote:


> Thank you. You shouldn't be surprised because I started by saying I am
> new to Oracle, please help by explaining the difference between a
> tablespace and a schema, which I have assumed to be the same.

You should use expdp to dump an Oracle schema. That utility is similar to
non-transactional MS SQL backups. You are essentially dumping just the
logical structure and the data, not doing a real transactional backup.



--
http://mgogala.byethost5.com

joel garry

unread,
Dec 5, 2012, 4:04:35 PM12/5/12
to
On Dec 5, 4:58 am, gnewsgr...@gmail.com wrote:
> On Wednesday, December 5, 2012 3:05:46 AM UTC-5, Eric wrote:
> > On 2012-12-05, gnewsgr...@gmail.com <gnewsgr...@gmail.com> wrote:
>
> > ...
>
> > > SQL> select count(*) "total_count" from hr.employees;
>
> > > total_count
>
> > > -----------
>
> > >         107
>
> > Which proves that you have a *schema* called HR, not a tablespace! You
>
> > appear to be operating in a fog of insufficient knowledge.
>
> > Eric
>
> > --
>
> > ms fnd in a lbry
>
> I ran SELECT * FROM DBA_USERS; and found that the default tablespace of HR is Users.
>
> So, the question becomes what I should do to backup only HR instead of everything in the Users tablespace.
>
> If you'd like to offer a reference to Oracle documentation, please be more specific (instead of doc.oracle.com). Thank you.

http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#BEHEFFAB

Some people consider requests like that as asking people to do your
work for you. You need to learn what is where in the docs and how to
search them. (Hint: You can download the docs for your version, or
select your version at tahiti.oracle.com. You can also search with
google by adding the qualifiers site:docs.oracle.com and your
marketing version to your search.) Personally I'm not so bothered, as
I consider giving an example link a clue that many people pick up on,
but unfortunately enough people are lazy and stupid enough to expect
people to do their work that it is an issue.

You should read the Concepts manual, which is specifically designed to
tell you how Oracle works and what the terminology is. Some of it is
slightly different than other database engines. Schema pretty much
equals User.

Some people may also disabuse you about the term backup. Usually they
mean a transactional backup, which you can't do with an export.
Export is a logical backup, which means in some situations you can
lose data (which would be some of the data after the start of the
backup, among other things). So many people don't like calling it a
backup. Mladen said it right.

A while back I wrote a page for newbies, not maintained lately but
still useful: http://dbaoracle.net/readme-cdos.htm

jg
--
@home.com is bogus.
http://www.theregister.co.uk/2012/12/05/nirvanix_ceo_out/

John Hurley

unread,
Dec 5, 2012, 9:22:53 PM12/5/12
to
# What do I need to do? Thank you!

Try this ... http://docs.oracle.com/cd/E24693_01/backup.11203/e10642.pdf

Or this ... http://www.mcgraw-hill.co.uk/html/0071628606.html

Not vouching for this at all but take a look http://www.jobacle.nl/?p=849

0 new messages