Duplicate database: problem with the syntax [message #434838] |
Fri, 11 December 2009 03:34 |
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 #434855 is a reply to message #434846] |
Fri, 11 December 2009 04:45 |
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.
|
|
|
|
|