Home » RDBMS Server » Backup & Recovery » Problem in Registering a Database through cmdfile
Problem in Registering a Database through cmdfile [message #267093] Wed, 12 September 2007 08:16 Go to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
Hi,

I have a problem in Registering a Database through a file. The file has the below contents
RUN
{
REGISTER DATABASE;
}

When I run this file through the command line, by giving the 'cmdfile' parameter It is giving me the following error

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "register": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, copy, crosscheck, configure, duplicate, debug, delete, execute, endinline, host, mount, open, plsql, recover, release, replicate, report, restore, resync, set, setlimit, sql, switch, startup, shutdown, send, show, validate"
RMAN-01007: at line 4 column 1 file: C:\RMan\RegisterDB.rman

Could any one please help me with this

Many Thanks in advance,
Tuntoo
Re: Problem in Registering a Database through cmdfile [message #267102 is a reply to message #267093] Wed, 12 September 2007 08:41 Go to previous messageGo to next message
Soumen Kamilya
Messages: 128
Registered: August 2007
Location: Kolkata
Senior Member

Which version of the database are you using you did not specified.
Are you sure you have entered RMAN before run the script.

For detail reference about RMAN you can follow this link RMAN

Cheers
Soumen
Re: Problem in Registering a Database through cmdfile [message #267108 is a reply to message #267102] Wed, 12 September 2007 08:58 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
Thanks for replying instantly...

My Oracle Version is 9i

I have used the below line to run the script
Rman target sys/oracle@trgdb catalog rman/cat@catdb cmdfile C:\RMan\RegisterDB.rman

as Mentioned earlier the contents of my RegisterDB.rman is are
RUN
{
REGISTER DATABASE;
}

Re: Problem in Registering a Database through cmdfile [message #267120 is a reply to message #267108] Wed, 12 September 2007 09:16 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't use RUN block. Directly use the REGISTER command.

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #267148 is a reply to message #267120] Wed, 12 September 2007 10:25 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
Thanks a lot Michel its working fine...

But have the following problem while unregistering the database
I have a similar file with the below UNREGISTER command

UNREGISTER DATABASE;

But is giving me the following error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, spool, startup, shutdown, send, show, test, upgrade, validate"
RMAN-01008: the bad identifier was: UNREGISTER
RMAN-01007: at line 3 column 1 file: C:\RMan\UnRegisterDB.rman

Please help me out...

Thanks again Michel
Re: Problem in Registering a Database through cmdfile [message #267159 is a reply to message #267148] Wed, 12 September 2007 10:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Same thing.

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #267168 is a reply to message #267159] Wed, 12 September 2007 11:21 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
I am doing the same, I mean the Unregister command is not in the run block...
The file contains just
UNREGISTER DATABASE;

And yet I receive the above mentioned error.

Please help me...
Re: Problem in Registering a Database through cmdfile [message #267173 is a reply to message #267168] Wed, 12 September 2007 11:33 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Copy and paste the whole RMAN execution.

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #267182 is a reply to message #267159] Wed, 12 September 2007 11:54 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
Rman target sys/oracle@trgdb catalog rman/cat@catdb cmdfile C:\RMan\UnRegisterDB.rman
Re: Problem in Registering a Database through cmdfile [message #267183 is a reply to message #267182] Wed, 12 September 2007 11:56 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Whats the commands in C:\RMan\UnRegisterDB.rman??
Re: Problem in Registering a Database through cmdfile [message #267185 is a reply to message #267183] Wed, 12 September 2007 11:58 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
UNREGISTER DATABASE;
Re: Problem in Registering a Database through cmdfile [message #267200 is a reply to message #267182] Wed, 12 September 2007 13:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I said the FULL session not just the command you typed.

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #267406 is a reply to message #267200] Thu, 13 September 2007 03:54 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
Sorry Michel was off yesterday, and could not reply you yesterday.
Below is the whole session,

C:\Working\Oracle>Rman target sys/oracle@targDB catalog rman/cat@catDB cmdfile C:\RMan\UnRegisterDB.rman

Recovery Manager: Release 9.2.0.7.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: targDB (DBID=2628018123)
connected to recovery catalog database

RMAN> # This will UnRegister the Target Database
2>
3> UNREGISTER
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "allocate, alter
, backup, beginline, blockrecover, catalog, change, connect, copy, create, cross
check, configure, duplicate, debug, delete, drop, exit, endinline, host, {, libr
ary, list, mount, open, print, quit, recover, register, release, replace, report
, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, s
pool, startup, shutdown, send, show, test, upgrade, validate"
RMAN-01008: the bad identifier was: UNREGISTER
RMAN-01007: at line 3 column 1 file: C:\RMan\UnRegisterDB.rman

Cheers,
Tuntoo

[Updated on: Thu, 13 September 2007 04:11]

Report message to a moderator

Re: Problem in Registering a Database through cmdfile [message #267430 is a reply to message #267406] Thu, 13 September 2007 04:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Who say that # introduces a comment in RMAN 9i?

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #267526 is a reply to message #267430] Thu, 13 September 2007 11:04 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
Sorry Michel, was tied up with something else today and could not reply back.

I have taken out the line with # which I thought will act as a comment
Now my file contains nothing else other than
UNREGISTER DATABASE;

even now I am getting the error as before -

Recovery Manager: Release 9.2.0.7.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: targdb (DBID=2628018754)
connected to recovery catalog database

RMAN> UNREGISTER
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "allocate, alter, ...
RMAN-01008: the bad identifier was: UNREGISTER
RMAN-01007: at line 1 column 1 file: C:\RMan\UnRegisterDB.rman

Please help ...
Re: Problem in Registering a Database through cmdfile [message #267534 is a reply to message #267526] Thu, 13 September 2007 11:13 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Where is "database" keyword?

Who says that "unregister" is a RMAN 9i command?

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #267535 is a reply to message #267534] Thu, 13 September 2007 11:17 Go to previous messageGo to next message
tuntoo
Messages: 9
Registered: September 2007
Junior Member
I have the command as -
UNREGISTER DATABASE;

I donno for some reason it is giving this error
Re: Problem in Registering a Database through cmdfile [message #267541 is a reply to message #267535] Thu, 13 September 2007 11:31 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I donno for some reason it is giving this error

Because this command does not exist in 9i.
Please read the manual for your version.

Regards
Michel
Re: Problem in Registering a Database through cmdfile [message #365357 is a reply to message #267093] Thu, 11 December 2008 13:10 Go to previous message
smohsin
Messages: 2
Registered: December 2005
Junior Member
RMAN> unregister database;
This command is for 10g and can be run from the server where the database is or the catalog database.

For 9i, only way is to log on to catalog database and execute a command.

First get the DB_KEY and DBID
SQL> select * from rc_database where name = '<DATABASE>';
(DATABASE = name of the database that was registered)

DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS
-------- --------- --------- ---- ----------------- ---------
12345678 1 87654321 TEST 1 10-DEC-08

SQL> execute dbms_rcvcat.unregisterdatabase(12345678, 87654321);
PL/SQL procedure successfully completed.
SQL>

This unregisters the database.
Previous Topic: Archivelog issue - minor but puzzeling
Next Topic: ORA-19554: error allocating device, device type: SBT_TAPE, device name:
Goto Forum:
  


Current Time: Thu Dec 08 10:15:45 CST 2016

Total time taken to generate the page: 0.06119 seconds