Using Unix Env variables in your Bursting XML

Hello all,
We are going into production bursting invoices using EBS 5.6.2/5.6.3 (we will be upgrading soon) and have come into a issue to do with pathing the files so that we can migrate from dev to prod without altering the XML bursting control files.
Firstly we are using the Bursting Listener APIs with a bursting control file. The problem is that the paths to the control file differ depending on the environment.
ie. prod = /u01/prod/prodappl/11.5.0/ = $WEL_TOP
dev = /u82/dev/devappl/11.5.0 = $WEL_TOP
As you can see, if I could put "$WEL_TOP" into the XML it would solve the issue. I tried $WEL_TOP and ${WEL_TOP} and the listener literally put that variable name into the path on both versions 5.6.2 and 5.6.3!!
Obviously a symbolic link would solve the problem, but our DBAs will have none of it, as it becomes an issue on a 2 node tier ie. which one would it point to?
Is environmental variable substitutions supported within the API? can't find any doco on it if it is.
Rob
http://www.scnet.com.au

Hi,
Why You are allocating the RMAN Channel..
You can restore the database from restore point from Sql prompt
startup mount
flashback database to restore point <res_name>;
alter database open resetlogs;what is the use of Previous restore point.. so you can drop the restore point after the restore and create new one.
Pass the $tag in the restore point.. and assign $tag=date
HTH
Edited by: DK2010 on Apr 18, 2013 3:26 AM

Similar Messages

  • Using the env variable of unix in a procedure call

    hi,
    how can i use the environment varible of unix in a oracle procedure call ?
    I am working woth shell scripts and it hold some value into a variable and that varible value I want to pass into a oracle procedure.
    i'm sending the sample code and please let me know the solution for this as early as possible.
    actual_file_name=`head -1 temp | tail -1`
    $ORA_BIN_HOME/sqlplus $USER $PASSWD@$TNS
    exec procedure($actual_file_name);
    if i write like above it is not supporting and I tried in so many ways. but no use.
    pls help me.
    suresh.K

    See one possible solution using SQL*Plus command line:
    Re: accessing unix environment variable in oracle procedures

  • Use of Session Variable in Dashboard Page XML

    Hi All,
    Can we use a Session variable in the Dashboard Page XML?
    My Requirement is,
    There are 1000+ users, each user will have access to same dashboard. But a different report in the same dashboard.
    So we want to Save individual user reports in the location /users/LOGIN_NAME/Financials/ABC
    and dynamically change the Dashboard Page XML, to accept Session Variable VALUEOF(NQ_SESSION.USER) in place of LOGIN_NAME.
    So that for each user, they will see only their report.

    On the face of it, Session is ideal for this, however this is SharePoint and the obvious isn't always the best. 
    You'd need to do the calculation about memory usage and number of concurrent users to ensure it really is a viable option in Production. 
    If it isn't viable, or wouldn't scale to possible future usage what would you do? Then you need to ask if it's really necessary to move between pages? If the user needs to move through a dialog for example, that could be hosted on a single page which might
    have different controls or sections made visible as the user progressed through the use case.
    Passing data between pages in SharePoint is a lot more difficult than it should be. Sometimes it's best to stay put, and certainly safer than using Session if you're really not sure if Session will stop your solution from scaling.
    Always remember, SharePoint might be hosted on ASP.NET but the design considerations are significantly different than if this were a pure ASP.NET application.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • How do I use a UNIX environment variable for the path of a file name

    We are running Forms 6i over the web. The forms server runs on a UNIX (HP-UX) machine.
    I want to read the contents of a file, which is simple enough, using the TEXT_IO package. However, I want to reference a UNIX environment variable that specifies the file path i.e
    PROCEDURE get_file IS
    in_file Text_IO.File_Type;
    linebuf VARCHAR2(1800);
    filename VARCHAR2(200);
    BEGIN
    filename:= '$LOG_DIR/RCAS181.log';
    in_file := Text_IO.Fopen(filename, 'r');
    .....other stuff
    Notice the filename string references my unix env variable '$LOG_DIR'. However, this doesnt work. If I put the full pathname it works fine.
    Any suggestions ?

    Have a look at TOOL_ENV.GETVAR()

  • Bursting XML Control File - only one variable substitution works

    Hello, I have the following from my bursting xml. In my subject I would like to have more than one substitution as in my example. Problem is that when I have more than one, the second one alway is "null". On there own they work fine. Is this a bug/limitation?
    <xapi:message id="111" to="${ADMIN_EMAIL}" attachment="true" subject="Unigas Inv
    oice No: ${TRX_NUMBER} for ${PARTY_NAME}">

    Use this syntax in your burst file (note you will need the above patch applied).
    <xapi:document output="${VAR - or hard code name here}" output-type="pdf" delivery="xxx" >
    Alternate way (if you don't have the patch) is to use the bursting listener by implementing it and doing the following in the afterProcessDocument interface.
    public void afterProcessDocument(int requestIndex, int documentIndex, Vector documentOutputs) {
    String outFileName = (String)documentOutputs.get(0);
    File newFile;
    File oldFile = new File(outFileName);
    newFile = new File(oldFile.getParent() + File.separator + "file" + oldFile.getName());
    oldFile.renameTo(newFile);
    documentOutputs.remove(0);
    documentOutputs.add(0, newFile.getPath());
    }

  • Get CGI env variables in a database procedure using new APEX Listener

    I already posted this question in the Apex Listener forum and still no replies after one week. The original post is here:
    Get CGI environment from APEX Listener within database procedure
    So please forgive me for posting in this forum as well, but there is a lot more activity here.
    I'd like to know how I can get the CGI environment from the APEX Listener. For example, if I want to write a procedure that inserts into a table the originating IP Address of the client making the web request, how do I get it?
    I am familiar with the Oracle Http Server and mod_plsql, and I know how to call OWA_UTIL.GET_CGI_ENV to get this sort of information. How do I do it using the APEX Listener?
    In particular, how do I do this when calling a custom procedure (not in an Apex workspace)? When I try it now, I get an error from owa_util. The cgi env seems to be empty or not initiated (owa.num_cgi_vars is null or zero).
    Specific set-up:
    I have a web server running the latest JDK, Glassfish, and 1.1.4 Apex Listener. It connects to another server running the latest 11.2 database. Apex is installed and running, but I am not really developing a traditional Apex application in a workspace. I mainly use it like you would use mod_plsql. In other words, I have custom pl/sql packages that are called directly via URL. The requests are forwarded by the listener to the database, and the DB executes the procedure and returns output using htp.p to send text back to the browser. And it works just fine for this purpose. But if I want to call GET_CGI_ENV to get information like the IP Address, web browser making the request, etc. I can't seem to get it with the OWA packages.
    Can anyone shed some light on this? If Apex Listener is not designed to do this, is there some kind of workaround I can use to forward this sort of information to the database for each request?

    I have not tried owa_util.print_cgi_env from SQL Workshop yet, as I have not created an APEX workspace. I have had no need for a workspace because of the way I am using APEX as a method for calling custom packages and stored procedures. In other words, I am using APEX strictly for the mod_plsql functionality. I just use it to forward requests to the database to execute pl/sql code, but I don't develop anything in APEX. My application is a web service with no screens and no direct user interface, which is why I did not need to create APEX forms. The front end is a mobile app that makes calls to the web service.
    But I have tried calling owa_util.print_cgi_env in one of my stored procedures and it returns no data, even when calling it from the web front-end.
    So I am beginning to believe that if the OWA toolkit works with APEX, then it must only be enabled when invoked within a workspace. Stand-alone procedures can be called via APEX, but apparently doing so does not initiate the CGI env variables. This set-up used to work under the OHS with mod_plsql. The embedded pl/sql gateway also works this way.
    Is there a procedure call that APEX is making to set the environment before each SQL Workshop request?
    My security model currently blocks access to all packages and procedures except for my custom packages. I am using the APEX Listener configuration to allow only the packages listed by name in a white list. But I thought I allowed all access when I first tried calling the OWA packages. I'll have to try that again.

  • How to use an UNIX shell variable in sql where clause

    Hi ,
    In my shell script first I get the Date and time from the system into the shell variable.At the end of the shell script I need to run a sql script in which I want to use the variable value in the where clause . Is there any way we can use a shell variable value in SQl script ?. Any help is greatly appriciated .
    Thanks in advance,
    Sampath

    Try the following
    In Unix
    SQLPLUS <username>/<password> @MyScript.sql <UNIX_Variable>
    In SQL*Plus
    Reference the variable as &1
    select *
    from MyTable
    where MyDate = to_date('&1','<date_format>');

  • PATH Setting using Runtime.exec() on a UNIX env?

    Hi,
    How do we set the PATH using Runtime.exec() on a UNIX Env?
    I've tried the 'export' command and 'setenv' command but it throws an exception saying 'export' and 'setenv' not found.
    objProcess = Runtime.getRuntime().exec("setenv PATH /opt/ibm/java2-x86_64-50/bin");+
    Please suggest.
    Thanks,
    Tanu

    Your experimenting with the stuff could shed light on the question, whether the outcome is influenced by the relying of the started process on elements of the starting environment other than PATH.
    String[] envp=new String[1];
    envp[0]="PATH=/jdk1.5/bin";
    Runtime rt=Runtime.getRuntime();
    Process proc=rt.exec("java Test",envp);

  • Issue with [env-entry] element in web.xml

    I know it's possible to define [env-entry] elements in web.xml for environment
    properties of a web application. But how do you access [env-entry] elements from
    classes that do not exist within a web application? In other words, this is my
    problem:
    I have an EAR file, enterprise.ear, which contains the following...
    employee.jar
    employeeSearchEJB.jar
    webApp1.war
    META-INF/
    application.xml
    The employee.jar file is a utility archive that contains common classes, one of
    which is a class called LogManager. LogManager needs to read environment properties
    in order to initialize itself. Currently, LogManager reads these properties from
    a property file, and therefore it needs to know the name of the property file
    in order to access it. I dont like this approach because I'm forced to hard-code
    the name of the property file in LogManager. I would rather leverage the power
    of J2EE deployment descriptors and use the [env-entry] element to define the environment
    properties for the LogManager class. Then, I would simply use JNDI to get the
    values of the [env-entry] elements without ever having to specify their location
    aside from the default JNDI context; java:comp/env, which is standard anyway.
    The problem I'm having is that you can define the [env-entry] element in only
    2 types of deployment descriptors; namely, web.xml and ejb-jar.xml, neither of
    which are available to LogManager because LogManager exists at the EAR root level.
    I was hoping application.xml supported the [env-entry] element, but it doesn't.
    Any suggestions?
    SAF

    SAF,
    I am not sure if this applies to you situation but if you create an initial context
    instance and then grab the value using the jndi name within that context then
    you should be able to grab that environment variable.
    I have a helper class that is used as part of a deployed application. The helper
    class doesn't have access to the Servlet context but it is created as part of
    the application workflow. When it gets initiated it grabs an env-entry created
    in the web.xml deployment descriptor to find the default url for a content path.
    After I create an initialContext, I perform a initContext.lookup("jndi.env.entry.here")
    where "jndi.env.entry.here" is the name specified in the env-entry tag.
    This returns the value of the entry.
    This works under both Jrun and Weblogic so my guess is it should work for you.
    Again, I am assuming that your class will at least be able to grab a context
    object to communicate back to the server.
    Hope this helps,
    Troy
    "SAF" <[email protected]> wrote:
    >
    I know it's possible to define [env-entry] elements in web.xml for environment
    properties of a web application. But how do you access [env-entry] elements
    from
    classes that do not exist within a web application? In other words, this
    is my
    problem:
    I have an EAR file, enterprise.ear, which contains the following...
    employee.jar
    employeeSearchEJB.jar
    webApp1.war
    META-INF/
    application.xml
    The employee.jar file is a utility archive that contains common classes,
    one of
    which is a class called LogManager. LogManager needs to read environment
    properties
    in order to initialize itself. Currently, LogManager reads these properties
    from
    a property file, and therefore it needs to know the name of the property
    file
    in order to access it. I dont like this approach because I'm forced to
    hard-code
    the name of the property file in LogManager. I would rather leverage
    the power
    of J2EE deployment descriptors and use the [env-entry] element to define
    the environment
    properties for the LogManager class. Then, I would simply use JNDI to
    get the
    values of the [env-entry] elements without ever having to specify their
    location
    aside from the default JNDI context; java:comp/env, which is standard
    anyway.
    The problem I'm having is that you can define the [env-entry] element
    in only
    2 types of deployment descriptors; namely, web.xml and ejb-jar.xml, neither
    of
    which are available to LogManager because LogManager exists at the EAR
    root level.
    I was hoping application.xml supported the [env-entry] element, but it
    doesn't.
    Any suggestions?
    SAF

  • Read a Unix Shell Variable

    I need to write some code (i was told its only like 5 lines) that reads the value of a Unix Shell Variable. I searched the forums and found only 1 post on this subject:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=397213
    I'm not sure if this is what i want to do however. my bosses co-worker, told me that i will need to use "System.properties" (i know there is no method System.properites but that is what he said) I looked into System.getProperites, and it just didn't make sence to me why i would be needing anything related to "System.properties". any suggestions on how to do this? (is it really only like 5 lines of code or is it much more complicated than that)
    Nick

    I did a google and found this immediately:
    http://www.javaworld.com/javaworld/javaqa/2001-07/01-qa-0706-env.html
    Google is your friend.
    It also returned a page expanding on the suggestion at the end of that article (using env), but rather than writing it to a file, using Runtime.exec to get an input stream and then sending that to java.util.Properties,
    which isn't a portable solution but doesn't require changing the invocation of the JVM.

  • OMB PLUS - Problem passing Unix environment variables to OMBPlus

    Due to a requirement to encapsulate deployment of OWB applications, we currently start OMBPlus.sh from our own wrapper ksh script (deploy.ksh) in order to get the new / changed application into the target control center etc.
    We now have a new requirement that means we need to pass the content of the Unix environment across to OMBPlus.sh (and from thence into our deployment tcl scripts).
    No problem, if you believe the tcl documentation. The entire Unix environement gets dumped into a hash array called 'env', so you can get the variable's value out just by saying $env(unix_valraible).
    Sounds great, it should work a treat.
    Except OMBPlus only silghtly resembles tclsh.
    The 'env' that gets into OMBPlus bears practically no resemblance to the 'env' that existed before OMBPlus.sh got invoked.
    Does anyone have:
    a decent explanation for why the env gets scrambled (and how to avoid it) ?
    or an alternative method of getting the Unix environment varaible values into OMBPlus ?
    Please do not propose passing them all on the command line because (would you beleive it) the values are database passwords !
    Edited by: user10466244 on 23.10.2008 09:28

    Unfortunately, the java implementation of TCL that Oracle used as the basis for OMB+ is NOT a fully-featured implementation. Just try using packages...
    However, and understanding why you don't want to hard-code passwords into a file, you can always edit the setowbenv.sh file in your owb/bin/unix directory to grab your specific shell environment variables and propogate them to the java session.
    towards the bottom of this env file you will see a section that looks something like:
    JDK_HOME=../../../jdk
    OWB_HOME=/owb
    ORA_HOME=/owb
    OEM_HOME=/owb
    IAS_HOME=/owb
    ORACLE_HOME=/owb
    CLASSPATH=Personalties.jar:../admin:$MIMB_JAR:
    CLASSPATH_LAUNCHER="-classpath ../admin:../admin/launcher.jar:$CLASSPATH: -DOWB_HOME=$OWB_HOME -DJDK_HOME=$JDK_HOME -DORA_HOME=$ORA_HOME -DOEM_HOME=$OEM_HOME -DIAS_HOME=$IAS_HOME -Doracle.net.tns_admin=$ORA_HOME/network/admin Launcher ../admin/owb.classpath"
    export ORA_HOME
    export OWB_HOME
    export JDK_HOME
    export OEM_HOME
    export IAS_HOME
    export ORACLE_HOME
    You could add in the environment variables that you want propogated, include them into the CLASSPATH_LAUNCHER, and then they will turn up in your OMB+ session env array.
    e.g., to propgate an environment variable called MY_DATABASE_PASSWORD you would:
    JDK_HOME=../../../jdk
    OWB_HOME=/owb
    ORA_HOME=/owb
    OEM_HOME=/owb
    IAS_HOME=/owb
    ORACLE_HOME=/owb
    CLASSPATH=Personalties.jar:../admin:$MIMB_JAR:
    CLASSPATH_LAUNCHER="-classpath ../admin:../admin/launcher.jar:$CLASSPATH: -DOWB_HOME=$OWB_HOME -DMY_DATABASE_PASSWORD=${MY_DATABASE_PASSWORD} -DJDK_HOME=$JDK_HOME -DORA_HOME=$ORA_HOME -DOEM_HOME=$OEM_HOME -DIAS_HOME=$IAS_HOME -Doracle.net.tns_admin=$ORA_HOME/network/admin Launcher ../admin/owb.classpath"
    export ORA_HOME
    export OWB_HOME
    export JDK_HOME
    export OEM_HOME
    export IAS_HOME
    export ORACLE_HOME
    So now you have no protected data hardcoded, it will pick up your specific environment variables at runtime, and when you start OMB+ you will be able to:
    array get env MY_DATABASE_PASSWORD.
    cheers,
    Mike

  • Subject: Env Variable to distinguish environments u2013 Dev, QA, Prod

    I have a HP UNIX Script. This script is called from an ABAP Program which will be called from a process chain.
    UNIX Script will run in different environments u2013 Dev, QA, and Prod. While most of the script is same for all env, some code is different. I want to just have one script and put conditional code for environment dependent code.
    But how do I know which environment I am in when script is run. Is there some env variable which SAP BI sets when it runs the script? If yes, what is that variable?

    When you create your OS command - create three - one for each landscape and in your ABAp program - as mentioned by Dennis - use the SY-SYSID to distinguish the systems and execute the appropeirate UNIX Script using your program.
    Usually this issue is faced when dealing with the file system in your UNIX Script where the locations across different systems cannot be syncronised.
    Else execute the script locally and check if it works and then use that in your program without having to duplicate the System commands in SM69.
    Edited by: Arun Varadarajan on Oct 3, 2009 12:04 AM

  • Variable values in composite.xml property

    Hi, i've got the similar proble to: variable values in composite.xml property
    Static value for property
    <property name="oracle.webservices.auth.password" type="xs:string"
    many="false" override="may">admin</property>
    <property name="oracle.webservices.auth.username" type="xs:string"
    many="false" override="may">admin</property>
    Expect result:
    <property name="oracle.webservices.auth.password" type="xs:string"
    many="false" override="may">$variable</property>
    <property name="oracle.webservices.auth.username" type="xs:string"
    many="false" override="may">$variable</property>
    i've probe the suggestion but cant get the specific solution.... may soneon can't help me!!

    Hi
    Thank you for the reply, I also would like to use the DVM solution to get the dynamic values, but the problem is how should I use this variable after this variable get the value from DVM?
    Does it have a property to override "oracle.webservices.auth.username" property or how could I use "oracle.webservices.auth.username" to get the variable value?
    I'm not sure if you understand my question, feel free to let me know.
    Thanks again for your reply.

  • Is there a way to use a OSB variable into an XQuery Transformation?

    Hi,
    I´m trying to access to a variable that I declared in the OSB with an Assign, but I´m gettin and Error that the variabe is used but not declared, I also tried to use a OSB variable like $messageID and still have the same Error, has somebody used a previous declared variable into an XQuery Transformation?
    Thanx in Advanced!
    Kind Regards!

    Hi,
    In order to use a varible into a XQuery transformation you need to declare it as an input.
    When you are defining the source types (in the 'new XQuery Transformation' wizard) you should add the variable that you want to use.
    So if you assigned a variable called messageId and you want to use it in your message transformation using a XQuery resource you should add the following in the source types screen:
    - On the Available source targets click 'XML' and then select the xml message that you want to transform and click 'Add'
    - On the Available source targets click 'Simple' and then select 'string' and click 'Add'
    This should declare the xml that you want to transform and the variable that you want to use during the transformation.
    Hope it helps.
    Regards,
    Rodrigo

  • Assign task with use a document variable

    Hi,
      if i'm assigning a pdf document in assign task operation with use a document variable instead of application asset, I see the same old blank form after user submits the form.
    what ever typed in the form is not seen in the output variable assigned in Assign user task.
    If I use application asset and provide input xml, then I could see the filled form as output when user submits.
    What should I do to get the filled data in the form?
    Note: Reason for using document variable is I want to dynamically assign the form created in the process to assign task instead of getting from repository.
    Highly appreciate your assistance.
    Thanks,
    kc

    Ok. So are you populating document with the values entered by user in process before assigning.
    Best approach is to xml and application asset.
    And do you have your pdf document binded with xml schema. If not then you wont have fields populated in any way.
    Thanks,
    Prashast

Maybe you are looking for