How to pass a parameter into RMAN script

Hello,
I have the following rman script :
run {
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\ora_df%t_s%s_s%p';
This script called configure.rman is launch by a .bat script with the following command:
rman target 'sys/sys12@ORCL102 as sysdba' @c:\oracle\RmanORCL102\configure.rman
How can I pass a parameter into rman script, I want to pass an additional directory like this:
rman target 'sys/sys12@ORCL102 as sysdba' @c:\oracle\RmanORCL102\configure.rman v_dir_name
And use it in rman script:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\$v_dir_name\ora_df%t_s%s_s%p';
Is it a way to do this?
Regards,
Elodie

One option would be to create a file called backup.bat with the following:
echo run {
echo CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
echo CONFIGURE CONTROLFILE AUTOBACKUP OFF;
echo CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
echo CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\%1\ora_df%t_s%s_s%p';
echo } ) | rman target sys/sys12@orcl102and then call the script as:
c:\> backup.bat backup_directory_name

Similar Messages

  • How to Pass multiple parameter into single store procedure

    How to Pass multiple parameter into single store procedure
    like a one to many relationship.
    it is possible then reply me immediatly

    you mean like this .....
    CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
    BEGIN
    DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
    END display_me;
    CREATE OR REPLACE procedure display_me_2 as
    cnt integer :=0;
    BEGIN
    For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
         display_me(in_param => c1_rec.empno);
         cnt := cnt+1;
         end loop;
         DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
    END display_me_2;
    SQL > exec display_me_2
    Values is .....9999....Default
    Values is .....4567....Default
    Values is .....2345....Default
    Values is .....7369....Default
    Values is .....7499....Default
    Values is .....7521....Default
    Values is .....7566....Default
    Values is .....7654....Default
    Values is .....7698....Default
    Values is .....7782....Default
    Values is .....7788....Default
    Values is .....7839....Default
    Values is .....7844....Default
    Values is .....7876....Default
    Values is .....7900....Default
    Values is .....7902....Default
    Values is .....7934....Default
    Values is .....1234....Default
    Total record count is ....18

  • How to pass a parameter into execute sql task and later use it into dataflow task?

    i am in a situation, where i have a logging table in which i have a primary key called ETL_log_ID which is an identity column and acts as a foreign key for various fact table and dimension tables which are populated using SSIS packages. Now i wanna use the
    ETL_log_ID as a parameter in the execute sql task which populates the log table and pass the same value in the data flow task which populates the facts and dimension. Can you let me know how to pass the parameter in a step by step procedure.
    Thanks,
    Nikhil
      

    Nikhil,
    You can check the following :
    http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx
    http://stackoverflow.com/questions/7610491/how-to-pass-variable-as-a-parameter-in-execute-sql-task-ssis
    Regarding the usage in Dataflow task, Can you elaborate on that a little?
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to pass a parameter into a select statement using a bulk collect

    Using a cursors I can use execute immediate to pass a parameter to specify a table name.
    I have modified the procedure not to use the cursor. I am using a collection using a bulk insert into a nested table. How can I specify the table the table name as a parameter without using the execute immediate statement.
    Thank you

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • How to pass a parameter into a sql expression?

    How to pass a report parameter into a sql expression?

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • HOW to pass page parameter into table function in  HTMLDB

    I created this object and table function in database.
    create or replace TYPE date_flow_type
    AS OBJECT (
    time           date,
    max_time      number,
    avg_total           NUMBER,
    sum_total      NUMBER,
    max_total      NUMBER,
    change_rate      number
    create or replace TYPE date_flow_table_type AS TABLE OF date_flow_type;
    create or replace function ret_date(p_date date default sysdate) return date_flow_table_type is
    v_tbl1 date_flow_table_type :=date_flow_table_type();
    begin
    v_tbl1.extend;
    v_tbl1(v_tbl1.last):=date_flow_type (p_date,1,1,1,1,1);
    return v_tbl1;
    end;
    and it is correct in htmldb when using in these ways
    SELECT TIME da,
         max_time max_time,
         sum_total total,
         max_total max_total,
    change_rate
    FROM TABLE ( ret_icp_date_flow ) a;
    SELECT TIME da,
         max_time max_time,
         sum_total total,
         max_total max_total,
    change_rate
    FROM TABLE ( ret_icp_date_flow( sysdate-1 )) a;
    but return error
    ORA-00904: "RET_ICP_DATE_FLOW": &#26080;&#25928;&#30340;&#26631;&#35782;&#31526;
    when pasing page parameter into the table function
    SELECT TIME da,
    max_time max_time,
    sum_total total,
    max_total max_total,
    change_rate
    FROM TABLE ( ret_icp_date_flow( to_date(:p1_date,'yyyy-mm-dd') )) a
    and this sql is correct while running in sqlplus .

    Hi!
    Thanks for your reply!
    I have tried this solution but it doesn't work!
    When I do getInitParameter in the init function, the servlet take the default values...
    Maybe I have wrote something wrong?
    Excuse me for my english,
    Thanks

  • How to pass a variable into sqlplus script from file

    here is my problem :
    I have plenty of sql scripts to run. So every time I need to run sqlplus /nolog @scriptxx.name<enter> and then type login<enter>, password<enter>, second login<enter> , second password<enter> - and when it finishes again from the beggining with next one...
    I am fed up with passing these parameters every time. I would like to create a file (files?) with these logins and passwords (located f.ex. in directory where I run the script) then tells, in some way, to my scripts that answers for their questions is inside this file(s).
    Is there any way to do it in such a way ?
    something like: accept DataUser char %read from file user1.txt without my inerteraction%
    ps.
    I cannot add directly these parameters to script because I need to run them on different servers (DEVs and PRODs) and every server has different users and passwords
    KP>

    Actually the START command would resolve the issue, in conjunction with passing parameters and DEFINEs in a sensible manner.
    DEFINE dathasb = '&1'
    ACCEPT dathasb char prompt 'etc...'
    When dathasb already has a value, ACCEPT won't prompt.
    Too many people start hacking and don't use the power of Oracle because they don't the needful : Reading the documentation.
    Other than that obviously the series of scripts needs of course to be re-engineered.
    Asking interactively for a password .... even 20 years back we already didn't do this anymore.
    Of course that was the time when exporting anything beyond the VAX 11/750 to Eastern Europe was prohibited because of US export regulations ;)
    You could store the passwords in Oracle Wallet and be done with it.
    You could use OS authenticated accounts and be done with it.
    But then you still didn't post a version, even not when requested.
    Sybrand Bakker
    Senior Oracle DBA

  • How to pass the parameter of a stored procedure to iReport

    Hi... i don't know how to pass the parameter of the stored procedure to the iReport.
    In the Report Query, i tried
    1. sp_storedprocedure ' value'
    2. sp_storedprocedure +''''+$P{parameter}+''''+
    3. sp_storedprocedure +$V+$P{parameter}++$F($F is a variable having a value of ' (a single quote))may you enlighten us please? thank you

    For M$ SQL server I find that it only works when U use the fully qualified name...
    e.g. catalod.dbo.my_procedure_name 'variable'
    My full query in the Report Query window is something like this:
    EXEC arc.dbo.jasper_Invoice 1000
    Note that you may find that selecting from VIEWS / TABLES fails for no apparent reason and iReport will prompt you with the usual very unhelpful (we have what we "pay" for) prompt, stating that "The document is empty".
    To work around this issue, where a statement like "SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id=1000" does not work, simply create a PROC, something like:
    CREATE PROC jasper_MyProc (@my_rec_id integer) AS
    SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id= @my_rec_id integer
    ...to wrap your SELECT statement, then call the PROC
    Edited by: Sylinsr on Apr 22, 2008 4:23 PM

  • How to pass Cascading Parameter in SSRS using Java

    How to pass Cascading Parameter in SSRS using Java---
    We are having a problem with dependent parameters.There are three drop down--
    1.first dropdown is of Country.When we select a country--Accordingly next dropdown(State)will populate
    2.Second dropdown is of State. When we select a state--Accordingly next dropdown(City)will populate.
    I have three data sources are
    CountryList-
    SELECT CountryRegionCode, Name
    FROM Person.CountryRegion
    ORDER BY Name
    StateList
    SELECT StateProvinceID, StateProvinceCode, CountryRegionCode
    FROM Person.StateProvince
    WHERE CountryRegionCode = @CountryRegionCode
    ORDER BY StateProvinceCode
    CityList
    SELECT StateProvinceID, City
    FROM Person.Address
    GROUP BY StateProvinceID, City
    HAVING (StateProvinceID = @StateProvinceID)
    ORDER BY City
    Ihave to show report that has been deployed on server on the besis of these parameters
    I am using ReportViewer in JSP Page through url--
    http://192.168.90.149/ReportServer/Pages/ReportViewer.aspx?%2fReport+Project1%2fCascading_Parameters&rs:Command=Render&rs:parameter=true&Country="+Country+"&State="+State;
    But it is not accepting parameter if they are cascaded.It is working fine if Both parameters are independent.
    Edited by: kaushlee on May 11, 2010 9:22 PM

    Take a look at set_custom_property:
    public static final ID SETTEXT = ID.registerProperty("SETTEXT");
    public boolean setProperty(ID pid, Object value)
        if (pid == SETTEXT)
    String text = value.toString();
    and in forms
    set_custom_property('beans.bean_item', 1, 'SETTEXT', 'some text');
    cheers

  • How to pass a parameter from one action1 in block1 to action2 in block2.

    Dear Experts,
    How to pass a parameter from one action1 in block1 to action2 in block2.
    My Process Structure is as follows..
           Process
                Sequential Block
                     Action 1
                     Parallel Dynamic Block
                             Sequential Sub Block
                             Action 2.
    while i am  trying to execute the action1 the following error is shown below:
    Cannot complete action: The activity could not be read.
    Please suggest me how to do?
    Regards,
    Rajesh N

    Hello Rajesh!
    I think you are talk about the mapping parameters of your process.
    This case in design time of your workflow, you have the vision of your blocks and actions, you have on action 1 the output parameter and you have the action 2 an input parameter.
    So you have that make a group mapping on your process, map in this group the action1 outpu parameter with the action2 input parameter.
    Regards, Ronaldo Rampelotti

  • How to pass dynamic parameter to a database function in OBIEE

    Hi,
    I have a requirement like this. I have to create one report in OBIEE which was in Discoverer. Now in discoverer report there are some calculated item in the worksheet based on database pkg.functions. The parameter which user gives at run time that parameters are then passed to the discoverer calculated items dynamically. But I am not able to do this in OBIEE answers.
    Can anyone tell me step by step how I can able to pass the user selected parameter values in OBIEE answer level.
    The example:
    GET_COMM_VALUE_PTD("AFE Cost & Commitment".Afe Id,:"Period Name(AFE)","AFE Cost & Commitment".Data Sel,"AFE Cost & Commitment".Org Id)
    GET_COMM_VALUE_PTD --- Function database
    ("AFE Cost & Commitment".Afe Id,:"Period Name(AFE)","AFE Cost & Commitment".Data Sel,"AFE Cost & Commitment".Org Id --- Parameters... :"Period Name(AFE)" is the dynamic parameter selected run time by user.
    Please help.
    Thanks
    Titas

    Hi,
    I already did that. But the existing discoverer re value report is showing correct value but the OBIEE report with EVALUATE function shows incorrect value.
    The requirement is to create a OBIEE Dashboard from a Discoverer existing report. Now in discoverer report theere are several calculated items in worksheet level where database custom function is used and user selected parameter value is passed run time in that function. But when that is created in OBIEE with EVALUATE function in RPD, the report shows incorrect data. Could not understand how to pass the parameter value runtime.
    Below is the discoverer 'Show SQL' query and EVALUATE function syntax which has been used.
    SELECT APPS.XXBG_PL_PROJ_ANALYSIS_AFE_PKG.GET_COMM_VALUE_PTD(XXBG_PL_PROJ_AFE_V.AFE_ID,
    :"Period Name(AFE)",
    XXBG_PL_PROJ_AFE_V.DATA_SEL,
    XXBG_PL_PROJ_AFE_V.ORG_ID),
    XXBG_PL_PROJ_AFE_V.AFE_DESC,
    XXBG_PL_PROJ_AFE_V.AFE_NUMBER,
    XXBG_PL_PROJ_AFE_V.APPROVED_AFE_AMOUNT
    FROM APPS.PA_PERIODS_ALL PA_PERIODS_ALL,
    APPS.XXBG_PL_PROJ_AFE_V XXBG_PL_PROJ_AFE_V
    WHERE ((XXBG_PL_PROJ_AFE_V.ORG_ID = PA_PERIODS_ALL.ORG_ID))
    AND (XXBG_PL_PROJ_AFE_V.DATA_SEL = :"Data Selection(AFE)")
    AND (PA_PERIODS_ALL.PERIOD_NAME = :"Period Name(AFE)")
    AND (XXBG_PL_PROJ_AFE_V.AFE_NUMBER = :"AFE Number(AFE)")
    AND (XXBG_PL_PROJ_AFE_V.OPERATING_UNIT = :"Operating Unit(AFE)")
    The EVALUATE function syntax is as below:
    EVALUATE('XXBG_PL_PROJ_ANALYSIS_AFE_PKG.GET_COMM_VALUE_PTD(%1,%2,%3,%4)' AS FLOAT , "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Afe Id", "BG PL Project Analysis Report_1"."Periods 1"."Periods 1.Period Name", "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Data Sel", "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Org Id")
    The PERIOD needs to be passed at run time which user will select.
    Please help to solve the issue.

  • How to pass page parameter to report portlet ?

    Portal: 9.0.4
    RDBMS: 9.0.1.5.0
    OS: Windows
    REF: How to pass page parameter to report portlet ?
    Hi,
    I create a Oracle Report as a Portlet in Portal (create Report Definition File Access and check on the option "Publish As Portlet" in the on the last step). My report has an "Additional User Parameter" and I has let it "Visible to user".
    When I put this portlet in my Portal page, I can see this parameter in the property/parameters of this page. However I cannot transfer my page parameter to this portlet parameter. Other portlets in this page (non-Oracle-Report portlets) are working fine with my page parameter.
    Please advice.

    I want to make sure we are talking about the same thing:
    After you add the portlet to the page, you go to the page properties, then the parameters tab, then there is a section at the bottom called "Portlet Parameter Values" where you can click and expand your portlet to see your portlet parameters.
    Is it here where your parameters just don't show up?
    If it is, try the following:
    - Add the portlet to another page and see if it still behaves the same.
    - Mark the parameters in the portlet as being non-public, re-generate portlet (on manage tab), then mark them as being public, re-generate and then try the above again (add to another page).

  • How to pass IN parameter as BOOLEAN for concurrent program in Apps(Environ)

    hi all
    i am using a standard package procedure,where in which i need to pass some parameters to a procedure,
    some of the parameters there are BOOLEAN type ,can anybody help me to know , How to pass IN parameter as BOOLEAN for concurrent program in Apps(Environ)

    Already answered this on the SQL forum (How to give IN parameter as BOOLEAN in a concurrent program.

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

Maybe you are looking for

  • 5320 XM firmware 4.13 report

    Hello, I would like to report a feedback for the 4.13 version of the 5320 firmware. I noticed that the option "Nothing" for the screen saver was deleted (but if I set the screen saver to last for 30 second, it's quite useless to display the time for

  • Add Approver restricted to Approvers only

    We are using n step approval in ECS. I restricted approval task TS14508044 to no general forwarding allowed and asigned Approver Role. But nevertheless when user during shopping cart creation want to add or change an approver they can assign any user

  • Notes app not displaying iCloud account at all

    Anyone else experiencing this issue?  I only use iCloud account for Notes and confirmed that the Notes option is enabled in both Preferences/iCloud and Preferences/Internet Accounts/iCloud.  I've toggled Notes ON for my other Internet Accounts such a

  • Airport express g and feedback on speakers

    Hi forum, I've just acquired an airport express g which I have I have plugged into a set of audio engine a2s. The speakers sound great when streaming but when nothing is streaming I'm getting a feedback sound through the speakers like the 3.5mm audio

  • How to remove us.search.yahoo tab hijack?

    when I open a new tab in 33.0, us.search.yahoo is the default page. How do I change this?