How to use substitution variables in sqlplus activity of process flow

I have a process flow that does nothing more than create a couple of packages that I cannot successfully deploy from OWB. A workaround, not something that I want to do, but currently there is not much time to adjust the packages so they can be deployed from OWB.
I can successfully create the packages from files that are present in a directory on the server. But the location (directory) is not the same in all cases (OTAP). So I thought to use an input parameter to the process flow (named TELLINGEN) and use that in the sqlplus activity.
I have created the parameter START_PATH with a default value.
I have added an sqlplus activity and placed the following into the PARAMETER_LIST variable of the activity:
?${Target.ConnectString}?@${TELLINGEN.START_PATH}/npl_dbug.pkg?
When I run the process flow I see the following in the output:
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Mar 18 18:10:14 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SP2-0310: unable to open file "${TELLINGEN.START_PATH}/npl_dbug.pkg"
SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
It obviously connects to sqlplus but then cannot find the file. Presumably because the variable has not been substituted.
How can I persuade the activity to substitute the variable?
Kind regards,
Eric.

Have been reading around a bit and found the (a) solution:
I placed the following in PARAMETERLIST:
?${Target.ConnectString}?@${Working.RootPath}/base64.sql?
And it turns out ${Working.RootPath} is pointing to the location you can provide under the configure for the sqlplus activity in the process flow. Just as you have to provide the target destination as indicated here: Re: SQLPLUS Activity in Process Flow
From the documentation it was not immediately clear to me where Working.RootPath was pointing to.

Similar Messages

  • How to use substitution variables in Microsoft Word using Hyperion Smart view

    Can we use Substitution Variables in copy data points and refresh in Microsoft Word? I tried it and it does not work dynamically (copy data points only copies what was in excel cell at that point). It only copies the static value of that variable from that cell. I want to use it dynamically in Word so that if I change the value of that variable in Essbase, it is updated in Word upon refresh. Any idea??
    We need this feature for reporting in microsoft word and keep using the data points every year (instead of copying the cells from excel over again)
    Any help/suggestion is appreciated.
    Thanks

    you can't use substitution variables with copy data points. I had tried a while ago (post 111.1.2.1.102) and it wouldn't work.  I checked with Oracle development and they said it I not available

  • URGENT:  Cannot perform truncate in SQLPLUS* Activity in process flow

    I try to truncate (as a test for functionality) using an SQLPLUS* Activity inside of my process flow. It hangs and then returns errors when cancelled. Below are the script and error messages. Any help would be greatly appreciated.
    TRUNCATE TABLE UTICA_STAGE.TEST_SQLPLUS_ACT;
    EXIT;
    SP2-0306: Invalid option.
    Usage: CONN(ECT) (logon) (AS SYSDBA)
    where <logon> ::= <username>(/<password>)(@<connect_identifier>) | /
    Enter password:

    user10408896 wrote:
    Fixed the problem myself, I specified a custom connection string. If anyone knows how to use a variable connection string to solve this problem I'll give you pointsbig deal, people dont respond for points as points cant be redeemed..and moreover stop using terms like "URGENT" as we dont care if something is urgent ,if you havent read then please read forum etiqutte.

  • How to set FROM ADDRESS for EMAIL activity in Process Flow

    Hi all,
    Can any one tell how to set(which address) FROM ADDRESS for EMAIL activity in Process Flow?
    Thanks,
    Suvvi

    Did you set what OWB guide says:
    To execute a process flow with an email activity, you may need to access different host machines and ports. New security measures implemented in Oracle Database 11g Release 1 restrict access to hosts and ports. You must explicitly grant access to hosts and ports that the email activity accesses using the DBMS_NETWORK_ACL_ADMIN package.
    For example, the user OWBSYS needs to send an email through the mail server mail.example.com using port 25. The DBA must perform the following steps:
    1. Create an Access Control List (ACL) for the user OWBSYS using the following command:
    EXECUTE DBMS_NETWORK_ACL_ADMIN.CREATE_ACL
    (’acl_for_owb_cc.xml’,’ACL for Control Center’,’OWBSYS’,’CONNECT’);
    The ACL has no access control effect unless it is assigned to network target.
    2. Assign the Access Control List (ACL) to a network host, and optionally specify a TCP port range. Use the following command:
    EXECUTE DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (’acl_for_owb_cc.xml’,’mail.example.com’,25)
    3. Commit the changes made using the COMMIT command.

  • How to use substitution variable in case of dim build

    Hi all,
    Lets say I have 3 sub vars - Prevmonth, prevmonth-1, prevmonth-2. These will change every quarter.
    I want to build a cube which will have which will have only the above 3 months in the Fiscal dimension. This will be used once at the end of quarter.
    How do I refer substitution variables in case of dim build rule files? I want automate the process. We have SQL dim build for other dims, only this dim can be built from flat file also.
    Or is there any other way to achieve this apart from using sub vars? I can try store the 3 variables in a table and then use them to build the cube, but want to see if we can avoid creating one more interface.
    Thanks.

    Actually using the values of subvars to build a dimension (which I believe is what you want) is a fun problem.  Here's an (Oracle) example that would do that, without requiring any additional table or flat file:
        SELECT 'FiscalPeriod' AS Parent,
               CASE Level
                  WHEN 1 THEN '&CurrMonth'
                  WHEN 2 THEN '&PrevMonth'
                  WHEN 3 THEN '&PrevMonthMinusOne'
               END AS Child
          FROM Dual
    CONNECT BY Level <= 3
    Here's how it looks in the load rule SQL dialog, and the data prep editor:
    It's fun because I've never thought about it before, but I don't actually recommend this - if you have other ETL going on in SQL I'd generate the values in a table / view there, and have a script that both updates the subvars and builds the dimension direct from that.

  • How to use substitution variable in sql

    Hai All
    I have two tables Rgpmain and Rgpitem the fields are
    Rgpmain
    unitid,periodid, docno, vendcode ,vendname, part_taken_by and .....
    Rgpitem
    unitid, periodid, docno, partno, partname .... And i need to give some values in runtime using sub variable
    i need to to four values in sub function and i will give one value and i need the result of one variable
    The qurey will like this
    Select * from rgpmain m, rgpitem i where unitid=1 and periodid=14 and m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and vendcode ='&p_vendcode'
    Or
    m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and vendname like '&p_vendname%'
    Or
    m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and partname like '&p_partname%'
    or
    m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and partno ='&p_partno'
    This is my query
    And while i am executing there are four options showing to enter..
    My need is i need enter only one field Ie vendcode and execute the vendcode like ABC01 then i need the only
    the result that belong to vendcode ABC01 but my query giving all the rows
    Pls tell me what is wrong with my query
    Thanks In Advance
    Srikkanth.M

    Hai
    Thanks Man i under stood that nv2 if 1 col is null then it will return 2 col or els 1 col but i working with large
    database and i need four or five column using sub. Pls tell whats went wrong with my query when i am executing
    one by one at the first time its works fine but next time it returns 1000 rows. pls tell me how to use four or five columns
    Regards
    srikkanth.M

  • EMail and SQLPLUS activity in process flow

    Hi Guys,
    I am struggling to get the email activity working. I entered all the details but no email is sent?
    Secondly, I had an easy sql plus script that I pasted into the script property box
    But the sqlplus just does not execute?
    truncate table xxx;
    quit
    Any ideas?

    Make sure there are no spaces after you have replaced DISABLED with NATIVE_JAVA.
    Any space after the NATIVE_JAVA will not work.
    Can you give details like what are you using Script or Parameter list etc ?
    Did you configure the deployed location for the SQLPLus parameter ??
    Regarding Your EMAIL -
    Is your process flow showing any error regarding email ??
    Create a simple process flow with email activity only.
    Set FROM_EMAIL , TO_EMAIL , SUBJECT ,MESSAGE_BODY, SMTP_SERVER , PORT
    SMTP_SERVER and PORT values are very important.
    Check connection to SMTP_SERVER by running the following command on dos prompt
    telnet smtp_server_name port
    If this works this means your smtp server is working. Now just deploy and run your processs flow.
    If it still doen't send you email, check whats in the log.
    The log should give you any errors regarding email like ORA-06512: at "SYS.UTL_TCP", line 17 ,etc (if any).
    Thanks,
    Sam.

  • SQLPLUS Activity in Process Flow

    Hi
    Im Trying to include a sql script thru Process flow using a SQLPLUS Activity
    In the Script, im giving the value as copy command(which im supposed to give)
    before that im giving the specifications as
    /oracle10/bin/sqlplus schema_name/password@DB followed by the copy command...
    While executing am getting the error as
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Can anyone help on this?
    Regards
    Ela

    Hi all,
    Im trying to include a copy command in my sqlplus activity.
    While execution it throwing the error
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    When I try to run the same copy command from the SQLPLUS, its working fine without any problem....
    Im not able to figure out the reason behind that.
    Suggestions Please
    Thanks in Advance,
    Ela

  • How to use a variable multiple times in the data flow

    DECLARE
    @StartTime datetime,
    @EndTime datetime
    SET @StartTime = (SELECT MAX(AvailDateTime) FROM dbo.Fact)
    SET @EndTime = (SELECT MAX(AvailDateTime) FROM dbo.Product);
    --DATEADD(day, 1, @StartTime);
    --PRINT @StartTime
    --PRINT @EndTime;
    WITH
    dates AS (
    SELECT DATEADD(Minute,5,@StartTime) AS [date]
    WHERE DATEADD(Minute,5,@StartTime) <= @EndTime
    UNION ALL
    SELECT DATEADD(minute, 5 ,t.date) AS [date]
    FROM dates t
    WHERE DATEADD(minute, 5, t.date) <= @EndTime
    I have the above sql, in this I'm using the 2 variables and calling @Starttime Variable couple of time. How should I build the SSIS package based on this query? how can I call the same variable in different place? how will SSIS take it?
    Thanks

    Since you have the variables set in code you just can place this code into the SQL code section of say an OLEDB source
    like there
    or

  • How can i use substitution variable

    Hai All
    This is my sql statement
    SELECT (TO_DATE(TO_CHAR(Intime,'DD-MON-YYYY')||' '||
    TO_CHAR(0815,'0000'),'DD-MON-YYYY HH24:MI')-intime) * 24*60
    from dail_att where to_char(intime,'hh24mi') between 0700 and 0815 ;
    Here my table name called Dailyattendance
    Intime field is declared as Date Type
    So now i have hardcoded 0815 and now my intime is subtracted from this time so i can calculate the employee
    coming late so how can i use substitution variable here to give the value at run time
    Ie i need to give 0815 instead or any other time at runtime
    Thanks In advance
    Srikkanth.M

    Where exactly are you planing to use it? Is sqlplus or at any other front end?
    One way is to use below given SQL
    SELECT   (  TO_DATE (   TO_CHAR (intime, 'DD-MON-YYYY')
                         || ' '
                         || TO_CHAR (:TIME_VAR, '0000'),
                         'DD-MON-YYYY HH24:MI'
              - intime
           * 24
           * 60
      FROM dail_att
    WHERE TO_CHAR (intime, 'hh24mi') BETWEEN 0700 AND 0815;*009*
    Edited by: 009 on Apr 6, 2010 2:15 AM

  • Conditional suppression using substitution variable in Hyperion financial r

    Hi all,
    Is there a way that I can suppress a column using substitution variable in hyperion financial reporting?
    For eg, i want to suppress the column if the value of the substitution variable curr_mnth = jun.
    Is there a way to do this? In conditional suprression dialog box, I dont find this option.
    Please suggest.
    Your response is appreciated.
    Thanks,
    Sirisha.

    Hi Sirisha
    In my earlier reply I think I may have mislead you as I thought that you could set the member name equal to that in a row/column and I've managed to get into a HFR studio session this morning and realised that the conditional suppression only allows you to suppress where member name = 'XXX' (specific text) so that doesn;t meet your requirement.
    Different people will have different ways of achieving what you want and everyones requirements are different. If it helps my preferred way of conditionally suppressing periodic data (for Planning/Essbase) is to add a dynamic calc account member called 'TP-Index' into the database, set up a formula so that each period returns a numeric value from 1 to 12 to match the fiscal/calendar year as required.
    Then in reporting bring the account and period dimensions into rows/columns so that you are able to retrieve data for the TP-Index account and the period as defined in your substitution variable. You can then choose how the suppression works based on a numeric value, commonly you may want to suppress if greater than, e.g. you have a multi-period report where your actual data is to June so you want to suppress everything from July onwards.
    I'm sure that a similar thing could be achieved in HFM as well if that is your underlying system instead of Essbase.
    Does that help?
    Stuart

  • Can we use Substitution variables in MAXL?

    Hi,
    Can we use substitution variables in MAXL script?
    I have to run this MAXL command for clearing a slice of ASO cube on V11.1.1.3.
    alter database Apname.DBname clear data in region 'CrossJoin({[2009]},{[Dec]})';
    I am planning to use Current_year & Current_month variables instead of hardcoding 2009 & Dec as I have to use this everymonth to clear the current months data.
    If it is allowed, what is the syntax?
    Is there any alternative apart from substitution variables?
    Appreciate your thoughts.
    Thanks,
    -Ethan.

    You would just use ampersand and the variable name instead of the hard coding e.g. &yearVar &periodVar.
    Not tried it on aso clears but in theory it should work as ...'CrossJoin({&yearVar},{&periodVar})';
    just change yearVar and periodVar for your substitution variable names.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • How  can use a variable in the folowing code?

    How  can use a variable 'W_ROWNUM2' in the folowing code?
    MOVE '1' TO CNT.
    LOOP AT L_T_PM2.
                  CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
                   CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
        perform  DYNPRO_FIELD       using FLD2
                                     L_T_PM2-vari12_con.
                   CNT = CNT + 1.
                   CONDENSE CNT.                                                              
    ENDLOOP.
    I need to increment the value of W_ROWNUM2.
    Please ,it is urgent!!

    Hello
    CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
    Try using spaces between parts of the resulting string.
    CONCATENATE 'F110V-VARI'  W_ROWNUM2  '(01)'   INTO FLD2
    Regards
    Greg Kern.

  • How to use bind variables in the following query

    CREATE OR REPLACE PROCEDURE MMDB.test IS
    sel_qtn VARCHAR2 (10);
    CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
    AND run_id = 100
    a PT_QUANTITY%ROWTYPE;
    BEGIN
    FOR i IN PT_QUANTITY
    loop
    sel_qtn := i.quanttity-1;
    While sel_qtn>=1
    loop
    insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
    sel_qtn :=sel_qtn -1;
    End loop;
    commit;
    end;

    Don't duplicate threads: How to use bind variables in the following query

Maybe you are looking for

  • View colleagues' exchange calendar in iCal?

    Hi! I can see my own Exchange calendar just fine with iCal 4 from the corporate Exchange server.  However, colleagues have also shared their Exchange calendars with me - which I can see just fine on Webmail / Exchange 2007, but I would also like to v

  • Designing Widgets

    Would you recommend iWeb 08 to design Apple desktop Widgets? Are there any features in iWeb that makes it easy to create and publish a Widget?

  • App-V 5 and scripts in user context

    Hello, I'm trying to figure out how scripting works in App-V 5, and I'm having an issue with it. I've read Scripting and Embedded Scripting for AppV 5.0 (Dynamic Deployment and User Configuration Scripting) and About Scripts in App-V 5.0, but still h

  • Stretching space around photo

    I took a photo and got all the objects I wanted in it, but I would like to have a little more space around the photo, not a white border, just a little more space around the objects. Is there any way I can add more space around the photo just in case

  • Apple Hardware Test doesn't happen???

    Hello, My Mac is quite unwell and I believe the hard drive is failing. I have just performed my third erase and reinstall since Friday. Only this morning I discovered the Apple Hardware Test. I've erased the hard drive so the Apple Hardware Test had