Home » RDBMS Server » Backup & Recovery » Duplicate database: problem with the syntax (10gR2,RHEL4)
Duplicate database: problem with the syntax [message #434838] Fri, 11 December 2009 03:34 Go to next message
abdulaziz
Messages: 102
Registered: May 2008
Location: Douala
Senior Member
hello,

I am practicing duplicating database. I chose the scenario where we duplicate the database to a new host with a different directory structure.In addition, I would like to rename my datafiles with the SET NEWNAME command. I tried to apply the instructions in the chap 13 of "oracle database backup and recovery advanced user's guide. Both the target and the new host run RHEL4. I have a backup of the target database and I do use a recovery catalog.I prepared a client-side parameter file that I used to start the auxiliary database and keep it in NOMOUNT state.Through RMAN, I connected the target, the recovery catalog, and the auxiliary database. then I issued the following commands in a run block:

RMAN> run
2> {
3> allocate auxiliary channel aux1 device type disk;
4> allocate auxiliary channel aux2 device type disk;
5> set newname for datafile 1 to '/dup/datafiles/system01.dbf';
6> set newname for datafile 2 to '/dup/datafiles/undotbs01.dbf';
7> set newname for datafile 3 to '/dup/datafiles/sysaux01.dbf';
8> set newname for datafile 4 to '/dup/datafiles/users01.dbf';
9> set newname for datafile 5 to'/dup/datafiles/example01.dbf';
10> set newname for datafile 6 to '/dup/datafiles/recov.dbf';
11> set newname for datafile 7 to '/dup/datafiles/m4prod.dbf';
12> duplicate target database to dup
13> logfile
14> group1




but as you can see, RMAN errored out at line 14. Below is the message:
RMAN-00571:================================================
RMAN-00569:====== ERROR MESSAGE STACK FOLLOWS =============
RMAN-00571: ===============================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "double-quoted-string, group, single-quoted-string"
RMAN-01008: the bad identifier was: group1
RMAN-01007: at line 14 column 1 file: standard input
RMAN>


Then I decided to put a space between group and 1 so to have something like "group 1".

13> logfile
14> group 1
15> (
16> '/dup/datafiles/redo01a.log',
17> '/dup/datafiles/redo01b.log';


but then RMAN threw the following
RMAN-00571: ===================================================
RMAN-00569: ======= ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one f: "comma, )"
RMAN-01007: at line 17 column 28 file: standard input


Again at line 17, instead of the semi-colon, I put a bracket and it yielded the following:
15> (
16> '/dup/logfiles/redo01a.log',
17> '/dup/logfiles/redo01b.log)
18> size 50M,
19> group 2
20> (
21> '/dup/logfiles/redo02a.log',

RMAN-00571: ==================================================
RMAN-00569: ====== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signalled during parse
RMAN-02001: unrecognized punctuation symbol "/"


Can anyone help me with my syntax? Any other tips?

Thanks in advance.


Re: Duplicate database: problem with the syntax [message #434846 is a reply to message #434838] Fri, 11 December 2009 03:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
What do you we have to do with all your tries and syntax errors? But instead it would be useful to post the WHOLE script and the WHOLE error messages ONLY for the last one.

Regards
Michel

[Updated on: Fri, 11 December 2009 06:22]

Report message to a moderator

Re: Duplicate database: problem with the syntax [message #434855 is a reply to message #434846] Fri, 11 December 2009 04:45 Go to previous messageGo to next message
abdulaziz
Messages: 102
Registered: May 2008
Location: Douala
Senior Member
Here's the script and the error generated.

RMAN> run
2> {
3> allocate auxiliary channel aux1 device type disk;
4> allocate auxiliary channel aux2 device type disk;
5> set newname for datafile 1 to '/dup/datafiles/system01.dbf';
6> set newname for datafile 2 to '/dup/datafiles/undotbs01.dbf';
7> set newname for datafile 3 to '/dup/datafiles/sysaux01.dbf';
8> set newname for datafile 4 to '/dup/datafiles/users01.dbf';
9> set newname for datafile 5 to'/dup/datafiles/example01.dbf';
10> set newname for datafile 6 to '/dup/datafiles/recov.dbf';
11> set newname for datafile 7 to '/dup/datafiles/m4prod.dbf';
12> duplicate target database to dup
13> logfile
14> group 1
15> (
16> '/dup/logfiles/redo01a.log',
17> '/dup/logfiles/redo01b.log)
18> size 50M,
19> group 2
20> (
21> '/dup/logfiles/redo02a.log',

RMAN-00571:=====================================================
RMAN-00569:========= ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:=====================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signalled during parse
RMAN-02001: unrecognized punctuation symbol "/"


Thanks in advance.
Re: Duplicate database: problem with the syntax [message #434858 is a reply to message #434855] Fri, 11 December 2009 05:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
17> '/dup/logfiles/redo01b.log)

Missing '

Regards
Michel
Re: Duplicate database: problem with the syntax [message #434868 is a reply to message #434858] Fri, 11 December 2009 06:13 Go to previous message
abdulaziz
Messages: 102
Registered: May 2008
Location: Douala
Senior Member
Thanks. Didn't see that before.
Previous Topic: Decide size of LEVEL 0 RMAN backups
Next Topic: Data Recovery after SET UNUSED was performed on a column
Goto Forum:
  


Current Time: Mon Nov 25 04:04:15 CST 2024