Exporting Hyperion Business Rules as Text files

Hyperion 9.3.1 installtion...
Does anyone have any nifty scripts or techniques for getting the HBR code out into flat files (ideally named as the Rule)...
I Know you can export via AAS, but all I want is the raw code so I can use some differencing tools on them.
Basically I've rules being changed in Prod, and Dev, and need to manage the situation.
Using the individual export option is painfully slow with 100+ rules.
Surely there is a way to query the [dbo].*AAS.HBRRules* table feild '*Body*' which is of type 'Image' and convert it into ASCII ?
Anyone done such a thing? or automated the export facility?
Cheers,
BossHogg.

Here is my variant on it.
It differs in that it accepts command line parameters for SQLServer, Output Dir (defaults to {Desktop}\Rules) & DBName (defaults to AAS). It also has header size changed to 201 which works here. Finaly some of the EOF checks have been fixed as the original posting seems to have lost the 'not equals' characters...
I Save this as HBRulesExport.vbs the execute it via a batch script twice using 'start /w ....' to export Dev & Prod to two seperate dirs for comparison.
'Force "cscript"
Dim numRules
Dim ID
Dim length
Dim index
Dim headerSize
Dim fileName
Dim rule
Dim DirPath
Dim SQLSERVER
Dim DBCAT
'ORIGINAL :- headerSize = 233
headerSize = 201
Set fs = CreateObject("Scripting.FileSystemObject")
Set rs = CreateObject("ADODB.Recordset")
Set cnSS = CreateObject("ADODB.Connection")
Set shellObj = CreateObject( "WScript.Shell" )
If Wscript.Arguments.Count < 1 Then
     MsgBox "This script requires at least a SQLServer DB name to get to HBRules. Parms are as follows..." & vbCrLf & vbCrLf & Wscript.ScriptFullName & " {SQL Server Name} [{OutputPath}] [{Db Name}]"
     Wscript.Quit 1
Else
     SQLSERVER = Wscript.Arguments(0)
     If Wscript.Arguments.Count = 3 Then
          DBCAT = Wscript.Arguments(2)
          DirPath = Wscript.Arguments(1)
     Else
          DBCAT = "AAS"
          If Wscript.Arguments.Count = 2 Then
               DirPath = Wscript.Arguments(1)
          Else
               DirPath = shellObj.ExpandEnvironmentStrings("%USERPROFILE%") & "\Desktop\rules"
          End if
     End if
End If
if (fs.FolderExists(DirPath) = False) Then
     fs.CreateFolder (DirPath)
End If
cnSS.Open "Provider=sqloledb;" & "Data Source=" & SQLSERVER & ";" & "Initial Catalog=" & DBCAT & ";" & "Integrated Security=SSPI"
strQuery = "Select max(id) from hbrrules"
rs.Open strQuery, cnSS
If (Not rs.EOF) Then
     numRules = rs.fields(0)
     For ID = 1 To numRules
          rule = ""
          strQuery = "Select name from hbrrules where id=" & ID
          rs.Close
          rs.Open strQuery, cnSS
          If (Not rs.EOF) Then
               fileName = rs.fields(0)
               rs.Close
               strQuery = "Select body from hbrrules where id=" & ID
               Set rulefile = fs.CreateTextFile(DirPath & "\" & fileName & ".hbr", True, True)
               rs.Open strQuery, cnSS
               If (Not rs.EOF) Then
                    length = rs.fields(0).ActualSize
                    For count = 1 To length - headerSize - 5
                         index = count + headerSize
                         character=AscB(MidB(rs.fields(0).Value, index, 1))
                         If Character = 10 Then
                              rule = rule & VBNEWLINE
                         Else
                              ' Filter for normal ASCII character range
                              If (Character > 31) And (character < 127) then
                                   rule = rule & Chr(Character)
                              Else
                                   rule = rule & " "
                              End if
                         End If
                    Next
                    rulefile.WriteLine(rule)
                    rulefile.Close
               End If
          End If
     Next
     MsgBox "Finished extracting HBRules from " & DBCAT & " on server " & SQLSERVER & vbCrLf & "Extracted " & numRules & " to Dir - " & DirPath
Else
     MsgBox "Query of DB " & DBCAT & " on server " & SQLSERVER & " - Returned no rows"
End If
rs.Close
'CODE ENDS
Edited by: djhogg on 09-Dec-2008 06:30

Similar Messages

  • Hyperion Business Rules cannot connect to Hyperion Planning

    I've deployed these applications into one machine server:
    - Hyperion Essbase 7.1.3
    - Hyperion Planning 4.0.1 (including Hyperion Business Rules)
    - Essbase Administration Services 7.1.3
    Everything runs well except that Hyperion Business Rules cannot connect to the Hyperion Planning as described in some error lines below:
    Can not login to Planning Application because no token.
    2009-10-07 15:12:15,125 WARN HttpProcessor[10090][1] com.hyperion.hbr.plugin.planning.PlanningMetadataAppElement - Error retrieving Essbase dbs from server: win
    2003server1/myPlan app: {1}.
    java.lang.Exception: Could not log in to Planning Server
    at com.hyperion.hbr.plugin.planning.PlanningMetadataAppElement.getChildren(Unknown Source)
    at com.hyperion.hbr.plugin.planning.PlanningMetadata.getChildren(Unknown Source)
    at com.hyperion.hbr.core.MetadataCmdListener.getChildren(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    Anyone knows how to handle this error?
    Mr. Goodwin?
    Thanks in advance!
    Adrian

    Hi,
    Have they ever worked ?
    Have you followed the golden rule, start RMI, EAS, Planning, Log into planning application through the web, Open EAS, create bus rule, select outline of the planning application you logged in.
    Also it is definitely checking out document ID 763345.1 in metalink3 (My Oracle Support)
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Smart view -Offline Dataforms can have Business rules,Cell Text ,Supporting

    Hi Gurus,
    Does the Offline Data form is having the Business Rules, Cell Text,Supporting Details if the original Dataform having all those.If yes how they can be retrived in Offline Dataform.
    Thanq

    Hi,
    I recommend reading some of the sections in the Smart View user guide > http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_sv_user/frameset.htm?ch14s01.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Sharing information between Hyperion Business Rules

    I am trying to share information between two Hyperion Business rules in EAS console.
    Suppose for example , I calculated a value and stored in local variable in one Business Rule.
    I would like to have this information in another business rule.
    Any idea about the possiblities.?
    I tried to use Global Variables in EAS but the Global variables are fixed and cannot be changed.
    Thanks ,
    Rajan

    Can you make a HBR local variable the target of a value? Doesn't that local variable have to resolve to a member in an Essbase database sooner or later if it's going to receive a data value from a formula?
    Or did you create a local variable as Real and then used that as the target? Maybe that would do it? (Obviously I've never done this.)
    Could you create a temporary place in the database to stick it and then delete it?
    Something like:
    1) Local variable = some kind of formula/calc
    2) No Account->No Product->No Scenario->whatever = Local Variable value. The point is an unused member that will let you set a value without overwriting permanent numbers. That shouldn't be too hard to find in a Planning app.
    3) In HBR #2, go after that member combination and number from #2, stick it into a local variable, and set that location in #2 to #Missing.
    Kind of painful, but it shouldn't really be that tough. You will need to make sure you create the block in #2.
    Regards,
    Cameron Lackpour

  • Hyperion Business Rules Administrator's Guide

    Hi,
    Does anyone has a download link for this document -> Hyperion Business Rules Administrator's Guide?
    Thank you so much for sharing.

    Hi,
    The best place to start for documentation is :- http://www.oracle.com/technology/documentation/epm.html
    You should be able to find the documents you want there for different versions
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Can not run business rule with bat file

    Hi all,
    I've problem with using *.bat file to run business rule. My Essbase version is 11.1.1.3 and the syntax within
    *.bat is simple, but I always got the Usage message and can not execute the rule.
    The error result as blow(I already execute the syntax in command panel directly):
    C:\Hyperion\products\Essbase\eas\console\bin>CmdLnLauncher -SWILSON -Usynadmin -P111111 -r0004_COPYDATA
    Usage: CmdLineLauncher [-p:<passwordFile>] -Sservername -Uusername [-rBusiness R
    ule Name | -sSequence Name] [-fRun Time Prompts file] [-validate]
    My *.bat file content as below:
    cd c:\Hyperion\products\Essbase\eas\console\bin
    call CmdLnLauncher -SWILSON -Usynadmin -P1111111 -r0004_COPYDATA
    Is there something wrong? If anyone know about this problem, please help,thanks!!

    Hi,
    Here is a brief overview on how to use the command line launcher.
    You can create a file and put the following information into it filling in the servername,app name and db name
    ExecDB::"Planning/servername/appname/dbname"
    Save it as .xml file (don’t think it has to be an xml, could be .txt), so something like connect.xml
    Then when you run your command line do exactly like before Cmdlnlauncher -Sservername -Uusername -p:password.txt -rrule -fconnect.xml
    If you have variables in your rule you can
    In EAS right click over the rule and select "Automate Launch Variables", fill in the details and then save it is as an xml.
    You just need to reference the xml in the batch script as described above using the -f parameter, for sequences remove -rrule and use –sSequence
    update password.txt to the name of your password file.
    Cheers
    John
    http://john-goodwin.blogspot.com/
    Edited by: JohnGoodwin on Apr 30, 2010 8:17 AM

  • Hyperion Business Rule Error: Cannot retrieve connected root element for

    Hi,
    I am trying to open a business rule in EAS and I am recieving the following error: Cannot retrieve connected root element for Planning/Servername/Application/Database.
    I am able to connect to the application via Planning Web, but I am recieving this message when I am trying to open the business rule in eas.
    hoping if someone has come across this issue before and has been able to successfully fix it.

    Hi,
    I have 2 BRs, one is with RTP and another without RTP (basically a clacscript as BR).
    I don't have any issue with the BR without RTP.
    When I try to validate BR withRTP, validation is failing with
    Unable to run or validate this rule (ConsolidateTestRTP) against the following location: Planning/servername/appname/dbname for user abcd.
    Detail:Exception occurred. Please check your log file for details.
    2009-04-09 12:35:58,803 WARN AWT-EventQueue-0 com.hyperion.hbr.core.MetadataManagerServerRemote - Cannot retrieve connected root element for Planning/servername/appname/dbname
    Restarted RMI,Planning,EAS services. Logged into planning first and then to EAS. Still getting error
    2009-04-09 12:41:39,881 FATAL AWT-EventQueue-0 com.hyperion.hbr.client.LauncherWindow - Exception:
    With thought of may be the syntax of RTPs in BR changed, deleted RTP in the code but still BR has RTP (I mean BR has RTP and is not used in calculations), still getting error during validation. I can create new BRs and associate to outline.
    Thanks

  • Exporting list of tables to text files?

    Anyone have solution for exporting list of SQL tables to text files?
    My goal is to have a flexible/dynamic way to export sql tables to text files that is executed via a sql job. I plan on having a configuration table that has sqltablename, fieldstoexclude (maybe fieldstoinclude - not decided), path, filename, includeheader,
    delimiter. So the SSIS package will query the configuration table and that will be the loop. One text file for each configuraton.tablename row.
    Does anyone have an already built solution that they can share? I have seen some with vb script and am not opposed, but would like to have a strictly SSIS package that uses SQL queries for the solution.

    Try using this as your query (Remember to set the database you want to use first:
    DECLARE @tableBuilder TABLE (dSQL VARCHAR(MAX))
    DECLARE @tableString VARCHAR(100), @newTableString VARCHAR(100), @columnString VARCHAR(MAX), @dSQL VARCHAR(MAX) = ''
    DECLARE tableBuilder CURSOR FOR
    SELECT
    'CREATE TABLE '+d.name+'.'+t.name ,
    c.name + ' ' +
    CASE
    WHEN st.NAME IN ('float','image','text','uniqueidentifier','date','time','datetime2','datetimeoffset','tinyint','smallint','int','smalldatetime','real','money','datetime','smallmoney','bigint','bit','hierarchyid','timestamp','xml','geometry','geography','sql_variant','sysname') THEN st.name
    WHEN st.name IN ('decimal','numeric') THEN st.name + '(' + CONVERT(VARCHAR,c.precision) + ',' + CONVERT(VARCHAR,c.scale) + ')'
    WHEN st.name IN ('nvarchar','nchar','char','varbinary','varchar','binary','ntext') THEN st.name + '(' + CONVERT(VARCHAR,c.max_length) +')'
    END + ','+ char(13)+CHAR(10)
    FROM sys.tables t
    LEFT OUTER JOIN sys.extended_properties ep
    ON t.object_id = ep.major_ID
    AND ep.name = 'microsoft_database_tools_support'
    INNER JOIN sys.columns c
    ON t.object_id = c.object_id
    INNER JOIN sys.systypes st
    ON c.system_type_id = st.xtype
    INNER JOIN sys.databases d
    ON DB_ID() = d.database_id
    WHERE ep.name IS NULL AND is_ms_shipped = 0
    ORDER BY t.name, c.column_id
    OPEN tableBuilder
    FETCH tableBuilder INTO @tableString, @columnString
    WHILE @@FETCH_STATUS <> -1
    BEGIN
    IF @tableString <> @newTableString
    BEGIN
    SET @dSQL = @newTableString + char(13)+CHAR(10) + ' (' + char(13)+CHAR(10) +LEFT(@dSQL,LEN(@dSQL)-3) + char(13)+CHAR(10) + ' )'
    INSERT INTO @tableBuilder ( dSQL ) VALUES (@dSQL)
    SET @dSQL = ''
    END
    SET @dSQL = @dSQL + ' ' + @columnString
    SET @newTableString = @tableString
    FETCH tableBuilder INTO @tableString, @columnString
    END
    CLOSE tableBuilder
    DEALLOCATE tableBuilder
    SELECT * FROM @tableBuilder
    Export the results of that as you like.

  • Can not run the Business rules with Hyperion Business Rules Desinger

    <p>I created  a business rules with Business Rules Designer,and validate is ok, but when I run it, pop a blank window withtitle "Run Error", how to solve it ?</p><p> </p><p>Thanks</p>

    I would export the rule to essbase and test it there. I should run and the log will tell you something. I would also look at the business rules log to see what it says. <BR><BR>

  • Hyperion Business Rules Error

    Good day!
    I have an error every time I validate the business rules in essbase.
    This is the error when I validate the Business rules :
    Unable to run or validate this rule (VSHI1_CopyData) against the following location: Essbase/vincentp.misnet.com.ph/VSHI1/IncStmt for user admin.
    I have checked the hbrserver log and this is what I found:
    2008-10-24 14:01:58,067 WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:01:58,130 WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.UserManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:04:20,674 WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:04:20,674 WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.UserManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:05:08,938 WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:05:08,938 WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.UserManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:07:04,358 WARN [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Error authenticating user in UserServerManager.
    2008-10-24 14:07:04,358 WARN [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.UserManagerServer - Error authenticating user in UserServerManager.
    2008-12-05 17:17:08,672 WARN Thread-16 com.hyperion.hbr.db.DBConnectionManager - Removed bad connection from Connection Pool: vincentp.misnet.com.ph14331cp_tools
    2008-12-05 17:17:09,047 WARN Thread-16 com.hyperion.hbr.db.DBConnectionManager - Removed bad connection from Connection Pool: vincentp.misnet.com.ph14331cp_tools
    2008-12-15 10:45:42,502 WARN [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Exception occured: 25:1065:Identity: admingroup, is invalid.
    2008-12-15 10:45:42,502 WARN [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Error retrieving group by identity
    2008-12-15 10:45:42,518 WARN [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Unable to run or validate this rule (VSHI1_CopyData) against the following location: Essbase/vincentp.misnet.com.ph/VSHI1_1/IncStmt for user admin.
    2008-12-15 10:46:41,152 WARN [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Exception occured: 25:1065:Identity: admingroup, is invalid.
    2008-12-15 10:46:41,152 WARN [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Error retrieving group by identity
    2008-12-15 10:46:41,152 WARN [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Unable to run or validate this rule (VSHI1_CopyData) against the following location: Essbase/vincentp.misnet.com.ph/VSHI1/IncStmt for user admin.
    2008-12-15 10:47:34,815 WARN [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Exception occured: 25:1065:Identity: admingroup, is invalid.
    2008-12-15 10:47:34,830 WARN [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Error retrieving group by identity
    2008-12-15 10:47:41,599 WARN [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Unable to run or validate this rule (VSHI1_CopyData) against the following location: Essbase/vincentp.misnet.com.ph/VSHI1/IncStmt for user admin.
    2008-12-15 11:01:05,637 WARN [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Unable to run or validate this rule (VSHI1_CopyData) against the following location: Essbase/vincentp.misnet.com.ph/VSHI1/IncStmt for user admin.
    Sorry for the long log message.
    I am using the admin user. Is there a possibility that the admin has no privilege for the business rule? (Which is unusual because it should have all the privileges).
    Can anyone tell me how to fix this issue?
    Thanks in advance.

    I think you have to give access even to the admin user to validate/run a business rule
    try giving access to that rule and then validate

  • Business rule Log/error files in 11.1.1.3?

    Hi,
    How can I trace out the status of business rules in EAS for running a calculation on essbase cube.where can I find these log/error files?
    In log files can we trace out the error like where it went wrong...?
    Thanks

    If you have a look at hbrlaunch.log it will provide details of the business rules that have been run.
    If on 11.1.1.3 and windows the file can be by default in C:\windows\system32
    If you do get any errors running the rule then the essbase app log is probably the best to find more information on the error.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Cannot Export Music Library to a Text file

    Hi,
    I just updated to Version 12. In the previous version you were able to export your itunes music listing to a text file. The feature has disappeared is there a workaround?

    Enable menu bar with Ctrl+B if needed.
    Select the Music view.
    File > Library > Export Playlist.
    tt2

  • Documentation for Hyperion Business Rules

    Is there anywhere I could some more documentation on developing business rules? Specifically, I am trying to find out how to launch business rules with multiple run-time prompts from a shortcut or batch file using a run time prompts file (.rtp). I found the HBR admin guide but it does not give enough detail. Thanks in advance.

    I haven't had the opportunity to use HBR yet. I'm interested since we may want to use it soon. <BR>The admin guide mentions (pg74) creating an automatic launch variable file (must be XML). It looks like you need to use the admin console to create the XML file, then reference that XML file when launching the command launcher. Does that make sense? HTH. <BR><BR>JS

  • Hyperion Business rules

    HI All,
    The scenario is such that I have two set of data forms.
    One is for monthly level budgeting and the other set of forms is for Yearly budgeting data.
    Now, when I punch the data into the Yearly values, it has to evenly distributed into the monthly forms.
    Ex: When I punch 120 in FY11, then it has to be divided by 12 and set 10 for Jan, 10 for Feb and so on and so forth.
    Thanks All

    This is the default behaviour of Hyperion Planning distribution. You should enable distribution in the form design and place the period dimension as Ilevel0descendants(YearTotal) to column. If you have already set even distribution (not 4-4-5 or 4-5-4) then the data you input on YearTotal gets distributed to months evenly. Therefore you wouldn't need to write a business rule for this.
    Cheers,
    Alp

  • Fastest way to export to a pipe-delimited text file

    I'm using Oracle 9i and need to export a table that has 150 million rows into a text file (or multiple text files based on a query that divides the table). I'd like it to be pipe-delimited and without quotes around strings.
    How can this be done so that it runs fast? Keep in mind, I'm kind of a newbie.

    I don't know what the fastest method would be but I would put quite a bit of money on it not being the Oracle SQL Developer tool, which is the subject of this forum.

Maybe you are looking for

  • How to get Chinese and Japanese input in X11?

    I have tried a few things like building UIM, Canna, and Anthy, but nothing seems to work. For one thing, I seem able to compile and install the Canna library, but when I run ./configure for UIM, it can't find Canna. Can somebody walk me through getti

  • When I travel abroad my phone shows "no sim" and doesn't work. Help?

    Hello. I have travelled abroad the last couple of years and when I land my phone works for about 5-10 minutes then comes up with "no sim installed" then doesn't work at all. Roaming is switched on from what my account says so I'm unsure of why this i

  • Conversion of classic scenario into extended classic

    hai, i have configured classic scenario.now i wanted to convert classic into extended classic.what are all the things i need to do?do i need to close all of my shopping carts?do i need to implement any badi?what are all the modifications i have to do

  • Inconsistent datastore performance

    Hi all Hope someone can help, ran into a bit of a wall here. We're running ESXi 5.1 on an HP Proliant DL120 G7 and Intel Cougar Point 6 SATA controller, with 4 identical WD 2TB drives. We've got 4 datastores configured, each on the 4 WD drives. The p

  • [SOLVED] openbox - force quit in menu

    I just posted about something else in openbox, so sorry about this. I did a little searching, and again, I wasn't able to find anything.. I know in gnome there is the Force Quit applet, but is there any command that I can add to the openbox menu to g