Essbase server - automatic change of substitution variable from SQL

Hi,I would like to automaticaly change the substitution variable in Essbase Server. Is it posible to change the substitition variable from external source e.g. SQL statement?Simple sample:I would like to assign value "2003" to "CurYear" substitution variable. But value "2003" I would like to get from SQL:"select year(current date) from table".There are commands in Esscmd and MaxL Shell, see bellow.Esscmd command:CREATEVARIABLE "CurYear" "localhost" "" "" "2003";MaxL Shell:alter system set variable CurYear '2003';Is it possible to get the value '2003' from SQL and pass this value to Esscmd command or MaxL Shell?My system:Windows 2000 Professional Service pack 4Essbase at 6.5.3 levelThanks,Grofaty

You can create a text file from the SQL server that writes the command like"CREATEVARIABLE "CurrYear" "Servername" "AppName" "DBName" "2005";then you can create a schedule job that would run this script which can update the variable. CREATEVARIABLE creates/replaces the current variable.

Similar Messages

  • Set substitution variable from Sql table

    Hi guys,
    I am new to sql/unix so I hope you can guide me in the right direction.
    whats the easiest way to update an essbase subvar from a sql table?
    would I have to write a sqlplus statement to output the variable to file,
    read the file in a maxl command and set the variable and call these commands using .sh script and esscmd?
    is there a more efficient way to set the variable? e.g only use sqlplus and esscmd?
    thanks in advance,

    Try something like this
    echo off
    sqlplus -s username/passwordusername/password@server/SID:@server/SID:port @test.sql > variable.txt
    for /f "usebackq delims=" %%a in (variable.txt) do set CurrentMonth=%%a
    echo %CurrentMonth%
    See whether you are getting the correct month.
    Regards
    Celvin
    http://www.orahyplabs.com

  • Is it possible to read Essbase Substitution variables from ODI?

    Is it possible to read Essbase Substitution variables from ODI?

    Hi,
    You can do it with custom code, if you have a read of a blog I wrote :- http://john-goodwin.blogspot.com/2009/11/odi-series-planning-11113-enhancements.html
    About half way through I go into reading essbase sub vars using the essbase java API.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • What to do for automatically change over of PHASE from 1 to 2  in case of multilevel method of depreciation.

    Hi all
    As per the statutory requirement we want to maintain Multilevel method of depreciation in which we have maintained two phases given as below-
    Dep/int.
    phase
    base method
    decl. bal method
    prd cont
    mutilev. Method
    change. Me
    change over % rate
    ordinary dep
    1
    ZMR1
    0
    001
    Z02
    2
    0.3
    ordinary dep
    2
    0011
    0
    001
    001
    0
    0
    Because asset need to depreciate upto 70% of its net book value on the basis of SLM percentage base as per phase 1.
    After that it must shift to phase 2 ,where depend upon remaining useful of that asset , balance value of asset need to be spread over.
    But while testing in, it is not automatically shifted to phase 2 directly once asset reaches its 70% (ie.once condition given phase one get exhausted)
    Then pls guide me what to do for automatically change over of PHASE from 1 to 2 ??
    Thanks and regards
    Manjusha  G.

    Hi Manjusha,
    To meet your requirement, you have to mention changeover in T code AFAMA-changeover method "2" and the changeover % 70 and in second line you can give phase 2 changeover within planned life and give your depreciation methods after changeover.
    Refer the sample screenshot.
    Hope it solves..
    Regards,
    G.Sethuraman

  • Steps to change universe database connection from SQL server to Oracle 10

    Hi,
    we are moving from sql server to Oracle 10.Please let me know the steps and various parameters I should consider while changing universe database connection from SQL server to Oracle 10.
    Following are the steps which I assumed :
    1.     create a new Oracle database connection or edit the existing connection to point to Oracle server
    2.     Need to check sql for each object, having integrity check for universe will solve the purpose of parsing each object
    3.     Exporting the universe after integrity check
    4.     Report data testing
    Let me know if I miss on any steps.Also what all factors I need to consider while moving to Oracle for eg: what @ custom sql,what @ table names,what @ LOV etc.
    Kindly reply

    Thanks Abhijeet and Shreyash,
    I will follow the steps you have suggested.
    Actually I was searching for this on net and got to know that with Oracle database connection,theres lot of stuff needs to take care of in terms of custom sql and LOV and in our case,we have lot of custom sql for each object in the universe so just wanted to confirm.
    I will do the changes and let you guys know in case theres any isuue specifically to Oracle.

  • SQL database login for 'SharePoint_Config_2010' on instance 'DB server' failed. Additional error information from SQL Server is included below.

    we formatted Database server and restored all the databases from the backup. but the sharepoint site is giving below error when i access the home page. 
    we have 3 application servers in that two are working fine,  but only one server getting the below error. 
    SQL database login for 'SharePoint_Config_2010' on instance 'db server' failed. Additional error information from SQL Server is included below.
    Login failed for user 'domain\user'.
    could you help what is the issue?

    Hi,
    According to your post, my understanding is that you failed to access sharepoint site with one application server.
    It was due to the MOM/SCOM Agent that has a SharePoint management pack installed, the agents Windows Service runs as ‘Local System’ and thus causes this.
    The workaround is to either kill the SCOM agent service, or set it to run as a dedicated service account.
    In addtion, I recommend to add the logon account of the SharePoint Timer service as a user of the SharePoint_Config database. Give role membership to the account db_owner.
    You also need to add the SharePoint accounts back into sql server.
    There are some similar articles for you to take a look at:
    http://blog.blksthl.com/2012/04/26/login-for-sharepoint_config-login-failed-for-user-domaincomputername-scom-agent/
    http://msdn.microsoft.com/en-us/library/jj551781(v=nav.70).aspx
    http://sharepoint.stackexchange.com/questions/51623/moved-sql-databases-for-sharepoint-2010-and-now-have-a-3351-error
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Can I preserve carriage returns in a string variable from SQL Server?

    I have an OLE data source that pulls data from sql server via a SELECT query.  One of the fields is an NVARCHAR(max) which goes into a string variable which is later used in an expression.  I am noticing that in the expression, carriage returns
    / line breaks in this field are being lost.  Does anyone know how I can preserve these in the expression?

    Thanks everyone for the suggestions.  I am certain there are both \r and \n in the database as when I print the field and then copy/paste to textedit to show the hidden characters, I can see both the CR and LF's.  
    I have implemented a workaround that is by no means elegant, but it gets the job done.
    I found that \r and \n will evaluate in an expression but if they are part of another string variable, SSIS escapes them. My workaround was to change my OLE_DB select statement (which fetches the custom SQL query) to explicitly change the hidden characters
    to '\r' and '\n' respectively:
    SELECT REPLACE(REPLACE([CUSTOM_SQL],char(13),'\r'),char(10),'\n')
    Then, in my SSIS expression, I de-escaped these characters:
    REPLACE(REPLACE(@[User::vAlertCustomSQL],"\\r","\r"),"\\n","\n")
    Now when the expression is executed, the SQL is formatted correctly and oddly placed comments in the query no longer break the query.  

  • Automatic change in MIRO Screen from Invoice/ Credit Memo/Sub-Credit/Sub-D

    Hi All,
    While we post the invoice through MIRO T-code, if we change the Transaction type from Invoice to Credit memo/Sub-Creditmemo/Sub-Debitmemo after completion of particular document SAP is not automatically changing the Transaction type as Invoice, its still remains same Transaction type which we changed last. 
    Can anyone advice is there a fix for this to get back to Invoice after doing anydiffernet transaction type..
    Regards
    Balaji

    1) You have to enter the subsequent credit
    2) The account postings for a subsequent debit/credit depend on the quantity that the subsequent debit/credit applies to:
    If the quantity of the subsequent debit/credit is smaller than or the same as the quantity delivered, the system tries to post the subsequent debit/credit to the stock account. If the material is valuated with a standard price or if there is insufficient stock coverage for the quantity to be debited or credited, the amount is posted to a price difference account.
    If the quantity of the subsequent debit/credit is larger than the quantity delivered, the system distributes the relevant amount proportionally. The part of the subsequent debit/credit that does not have a goods receipt is posted to the GR/IR clearing account. The remaining amount is posted to the stock account u2013 or in the case of standard price control or insufficient stock coverage u2013 to a price difference account.

  • Changes required to switch from SQL Server 2000 to SQL Server 2005?

    I'm converting a legacy app from SQL Server 2000 to SQL Server 2005.  The app is written in VB6 and utilizes CR 8 OCX.  When I invoke a report from VB I'm getting Error# 20599 Cannot open SQL server.  I redefined the ODBC DSN specifying Windows Authentication, and the SQL Server instance supports mixed mode.
    Searching for the error, I found an article that suggests I need p2sodbc8.zip, but I can't find a link to it in the Downloads area.
    Would greatly appreciate any help at all - including a link to p2sodbc8.zip if that's the likely resolution.
    Thanks in advance,
    Pete

    Hi Peter,
    As you are having issue with SDK's.
    I would suggest you to post your question in
    Business Objects SDK Application Development » [Legacy Application Development SDKs|;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all  SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Shweta

  • Substitution variable in sql load rules file

    Okay gurus,
    I need a little guidance, I have to replace the value of 201020 and 2008 from substitution variables. I have created the variables and set them up globally on the essbase server.
    201020 = FW00
    2008 = FY00
    WHERE ACT.FISCAL_WEEK_ID <= 201020
    AND ACT.FISCAL_YEAR_ID > 2008
    AND RTDIV.DIV IN (1,2,3,4,5,6,7,8,9,99) (This is the query with hard coded values of week and year)
    When i m trying to put sub variables there , its throwing the error. please find below the way i was trying to do it.
    WHERE ACT.FISCAL_WEEK_ID = '&FW00'
    AND ACT.FISCAL_YEAR_ID = '&FY00'
    But unfortunately, its throwing error Error: 1021001 Failed to Establish Connection With SQL Database Server. See log for more information
    I know that this is the generic error because if i put the hard coded value in sql load rules it works fine.
    Is it the right way to out sub var in sql load rules???
    Please advice and thanks in advance.

    Hi Genn,
    I tried to see the app log for sql but i m afraid that there is nothing in there, the only error message which I am getting in app log is this:
    Failed to Establish Connection With SQL Database Server. See log for more information
    Its an ASO cube and initially i was using the variable as FY00 AS "2008" it did not work and than i tried without quotes in variable but is still not working.
    Any idea..thanks in advance.

  • Using substitution variable in sql -- Issue

    Hello All
    I am trying to do a sql operation from command prompt of my system and that sql requires substitution variable which i am passing it but when i pass the variable ( there are two) the first one assign as " \c" and second gets both what i am passing.
    I am not sure what exactly happening here, i have done this on AIX but here its not working any ideas?
    System : uname -a
    Linux ## 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

    AIX and Linux are not the same. An output of "\c" may indicate a compatibility issue of your shell script with your current command line interpreter (shell). A \c can be used to suppress a newline with the echo command. Bash understands both formats echo -n and echo \c, but other shells like Ksh don't. Try to run your script under a Bash, which is the default under Linux. If the problem persists you will need to post your script for any further analysis.

  • Error with define substitution variable in SQL

    Hi there,
    I am using PL/SQL developer and trying to define a substitution variable as follows:
    define freq = 'Weekly'
    Then later on, in my SQL statement, I used this variable in WHERE statement as follows:
    WHERE ... (&freq = 'Weekly') and ...
    But I got the "ORA-00904: "WEEKLY": invalid identifier" error.
    Where is the problem?
    Thanks in advance!

    I don't know about PL/SQL developer but in sqlplus you need single quotes around the variable.
    SQL> define freq = 'Weekly'
    SQL> select null from dual
      2  where &freq = 'Weekly';
    old   2: where &freq = 'Weekly'
    new   2: where Weekly = 'Weekly'
    where Weekly = 'Weekly'
    ERROR at line 2:
    ORA-00904: "WEEKLY": invalid identifier
    SQL> edi
    Wrote file afiedt.sql
      1  select null from dual
      2* where '&freq' = 'Weekly'
    SQL> /
    old   2: where '&freq' = 'Weekly'
    new   2: where 'Weekly' = 'Weekly'
    N
    SQL>

  • Substitution variables in Sql*Plus

    Hi all,
    How to make Sql*Plus ask for the substitution variable value one time only for a substitution variable even if it appears multiple times inside a query ? Because so far each time I launched the query below then I have been asked two times by Sql*Plus for the variable value. For example : select ref_site from t_comsis where longitude_lamb + latitude_lamb < &distance + power(&distance,2).
    Thanks

    of course accept is more friendly, you can check for valid number, you can have a prompt or a hidden input.
    you can also undef your variable if you prefer the && solution
    SQL> select &&x+&&x from dual;
    Enter value for x: 1
    old   1: select &&x+&&x from dual
    new   1: select 1+1 from dual
           1+1
             2
    SQL> undef x
    SQL> r
      1* select &&x+&&x from dual
    Enter value for x: 2
    old   1: select &&x+&&x from dual
    new   1: select 2+2 from dual
           2+2
             4

  • How can I change my Shared Variable from "I/O Variable" to "Network Published"

    Hello,
    I have an application that is using a series of NI wireless sensor nodes.  I am trying to programmatically access shared variables.  Right now the only method I have found to access the data from the shared variables is datasocket read.  I am on labview 8.6.1 so I don't have as many shared variable options as newer versions of labview.  I do think there is a way to access properties for the shared variables, but I'm not sure about how to change the nodes channel properties to "Network-Published".  Do i need to remove the node from the project and bring it back in with the new settings?  When i have done this in the past i have run into naming conflicts.  I would appreciate any ligtht that can be shed on this issue that will help me create a vi that operates quicker.

    Any Shared Variable that has “I/O Variable” for its Variable Type (see screenshot of the Shared Variable Properties below) refers to any channel of data (such as Analog Input or Output or Digital Input or Output) directly from a module channel.  In other words, this is how you directly get the raw reading straight from (or to!) a specific module channel.
    You cannot edit the Variable Type to Network Published.  You can check “Enable Network Publishing” as above, which allows this Variable to be accessed from a VI on a Host VI.  You could also create a separate Network-Published Shared Variable which you can wire directly to the I/O Variable on the Target VI if you wish.
    Best,
    Ryan C.
    Applications Engineer
    National Instruments

  • How can I automatically change my edited timeline from 24fps into 25fps?

    Hello everyone,
    I have a timeline in 24fps with 24fps footage. I have to convert it (the timeline and the footage) into 25fps, so I can put a 25fps Timecode in it (it was a 24fps 16mm film material and it has to be rescan in 25fps...). Is there a way to do that? I mean beside of reedit everything in a 25fps timeline. The footage was quicktime prores 4444, I made merged clips of it and edited it then, so I have only merged clips on the timeline.
    I would be very thankful for any suggestions!

    Hi Richard, unfortunately I need to burn in Timecode from the source clips, so this won`t help me:/ but thanks for your answer! I think the only possibility for me is to create a new timeline in 25fps, modify the source footage from 24 into 25fps and reedit it. Is there any way to use command match frame (and reversed match frame) from merged clips in a timeline to source material from which I created the merged clips? so the source footage and not the used merged clip will be loaded into the source monitor? it would make a reedit much much faster...

Maybe you are looking for