Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Pass Path parameter to RMAN

Deepak VargheseFeb 10 2014 — edited Feb 10 2014

hi,

Is it possible to pass "path variable"  to rman as input parameter(using syntax) ?

I am trying to pass ORACLE_HOME path which has a forward slash and i am getting "RMAN-02001: unrecognized punctuation symbol "/"" error and without forward slash input is working fine.

Has anyone tried this ?

Regards,

Deepak

Comments

Baris Yildirim

Hi,

What exactly do you need?

Why do you want to pass a path variable?

Regards

Deepak Varghese

i am trying to pass ORACLE_HOME in run block of RMAN.

'SBT_LIBRARY=/u06/app/oracle/sbl/product/11.2.0/db_1/lib/libddobk.so' and is there any way i can pass it as variable

something like this 'SBT_LIBRARY=&1/lib/libddobk.so'

Regards,

Deepak

Baris Yildirim

Hi

You don't need to indicate the sbt_library parameter

You can create a link for example, you can replace "/opt/omni/lib/libob2oracle8_64bit.so" with your configuration

ln -s /opt/omni/lib/libob2oracle8_64bit.so /u06/app/oracle/sbl/product/11.2.0/db_1/lib/libddobk.so

on the other hand, maybe you can create a rman command file and run rman with it.

Regards

Deepak Varghese

The reason being i have multiple oracle_homes in the same server.

Regards,

Deepak

Baris Yildirim

There is an example here

Improved Scripting with RMAN Substitution Variables

Substitution variables can now be used in RMAN command scripts in a similar manner to SQL*Plus scripts. For example, the following command script requires a tag name to be entered for each backup run.

CONNECT TARGET / BACKUP DATABASE TAG '&1'; BACKUP ARCHIVELOG ALL TAG '&2'; EXIT;

Notice the "&1" and "&2" placeholders. Assuming this were saved with a filename of "/scripts/backup.cmd", it might be called with the following syntax.

$ rman @'/tmp/backup.cmd' USING DB_20070108 ARCH_20070108

http://www.oracle-base.com/articles/11g/rman-enhancements-11gr1.php#improved_scripting_with_rman_substitution_variables

Regards

Deepak Varghese

Sorry, i guess you havent got by question.I know that variables can be passed in rman but i am  not able to pass a parameter with forward slash

Baris Yildirim

sorry I see, the below example, the parameter's value is "/u06/app/oracle/sbl/product/11.2.0" and is getting the error. is it corrrect?

Regards

'SBT_LIBRARY=/u06/app/oracle/sbl/product/11.2.0/db_1/lib/libddobk.so' and is there any way i can pass it as variable

something like this 'SBT_LIBRARY=&1/lib/libddobk.so'

Deepak Varghese

'SBT_LIBRARY=/u06/app/oracle/sbl/product/11.2.0/db_1/lib/libddobk.so' --> this works

'SBT_LIBRARY=&1/lib/libddobk.so' --> this is not working (i am passing /u06/app/oracle/sbl/product/11.2.0/db_1 as input)

Regards,

Deepak

Baris Yildirim

sorry did you try to pass the whole content to variable

'SBT_LIBRARY=&1'

/u06/app/oracle/sbl/product/11.2.0/db_1/lib/libddobk.so


Regards

Deepak Varghese

Very simple to show that

rman target / using home ( works)

rman target / using /home (doesnt work)

I need to know how to override that / .i guess it has special meaning in rman

Deepak Varghese

I guess i found the solution

solution is to use  single quotes around the double quotes for the substitution parameter
Doc ID 1454149.1

Daljit

Hi,

Did you try:

rman target / using \/home

Thanks

Daljit Singh

1 - 12
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 10 2014
Added on Feb 10 2014
12 comments
8,584 views