A collection of OBIEE / OBISE stuff from 101 till 404. I just put the things here I run into.
Thursday, August 28, 2008
OBIEE Forcing OC4J_BI shutdown
"{JDK HOME here}\bin\java.exe" -jar {ORACLE_BI home here}\oc4j_bi\j2ee\home\admin.jar ormi://localhost:23791 {OC4JADMIN password here} -shutdown force
Till Next Time
Wednesday, August 27, 2008
OBIEE Conditional X-axis graph
First create the conditonal x-axis: (Sales sample)
CASE WHEN (TIMESTAMPDIFF(SQL_TSI_DAY, MIN("D0 Time"."T00 Calendar Date"), MAX("D0 Time"."T00 Calendar Date")) > 20 ) THEN "D1 Customer"."C2 Cust Status" ELSE "D2 Market"."M02 Area" ENDNext alter the Y value so that it will follow the X - axis:
sum("F1 Revenue"."1-01 Revenue (Sum All)" by CASE WHEN
(TIMESTAMPDIFF(SQL_TSI_DAY, MIN("D0 Time"."T00 Calendar Date"), MAX("D0 Time"."T00 Calendar Date")) > 20 ) THEN "D1 Customer"."C2 Cust Status"
ELSE "D2 Market"."M02 Area" END )
Add everthing to a dashboard:
15 days:
25 days:
Till Next Time
Friday, August 22, 2008
OBIEE scripting user into the repository
DECLARE USER "NewUser" AS "NewUser" UPGRADE ID 1 FULL NAME {New User} PASSWORDThe password can only be entered encrypted, this string is for "welcome1".
'D7EDED84BC624A917F5B462A4DCA05CDCE256EEEEEDC97D54A286E822D97C35C7AD5C43AD4F2A09EAC4D07C3A079829F'
PERIODICITY 90 HAS ROLES ( "Administrators", "XMLP_ADMIN" ) DESCRIPTION
{password = welcome1} PRIVILEGES ( READ);
Next you have to "merge" the txt file into the reopsitory:
E:\OracleBI\server\Bin>nQUDMLExec.exe -U Administrator -P Administrator -I E:\temp\NewUser.txt -B E:\temp\paint.rpd -O e:\temp\newrep.rpd
Thursday, August 21, 2008
OBIEE Change the password
Restart the Oracle BI Server, Web server, and WWW services in that order.
Till Next Time
OBIEE Conditional Hyperlink
Here is how we did it:
CASE WHEN ("F1 Revenue"."1-01 Revenue (Sum All)"> 100000 )THEN '{a href=http://www.google.com }'CAST("F1 Revenue"."1-01 Revenue (Sum All)" as VARCHAR(10)) '{/a}' else CAST( "F1 Revenue"."1-01 Revenue (Sum All)" as VARCHAR(10) )END
Don't forget to set the column data type settings:
Till Next Time
Wednesday, August 20, 2008
OBIEE Back One Page
Monday, August 18, 2008
OBIEE Identifying the server.
Solution 1 would be to hardcode the “source name” on the report or in a repository variable. But… report and repositories are transported back and forth between the different “Development Street” parts, so there is no SOx compliant guarantee that the report is correctly identified.
Solution 2 is to dynamically put the server name and IP-address on the report. Problem is that OBIEE doesn’t have build in variables holding these values.
As long as your repository connects to at least one Oracle database, then you can use this method, using the Oracle sys_context function
In your repository make two new initiation blocks called:
INIT_ENV_TERMINAL
INIT_ENV_IP_ADDRESS
For the data source use:
SELECT sys_context('USERENV', 'TERMINAL') FROM dual
And
SELECT sys_context('USERENV', 'IP_ADDRESS') FROM dual
Put the data in repository variables named TERMINAL and IP_ADRESS.
In your reports you can call these variables using:
VALUEOF(TERMINAL) and VALUEOF(IP_ADDRESS)
Till Next Time
This article was original written for the Ciber Knowledge Blog:
http://knowledge.ciber.nl/weblog/?p=127
Sunday, August 17, 2008
OBIEE Hidding dashboard sections
POSITION('Administrators' in valueof (NQ_SESSION.GROUP) )
The section is now only visible if a user is a member of the Administrators group.
Saturday, August 16, 2008
OBIEE Stragg function on 10G..
Up to 9i you had to use Tom Kyte's Stragg function to get the children of the level to a single string. From 10GR1 you can use the collect function.
I wrote an entry on my ORACLE101 blog (http://oracle101.blogspot.com/2008/08/oracle-collect-function.html) which can be used in the same way you use the STRAGG function in OBIEE (see: http://obiee101.blogspot.com/2008/08/obiee-children-of-level-converting-rows.html)
Till next timeThursday, August 14, 2008
OBIEE Where is the ODBC Data Source Administrator?
OBIEE Configuration Tags
I did an extraction of the "sercret" file with all the OBIEE configration tags:
OBIEE10340CONFIGURATIONTAGS.pdf
You can find the file at ..\OracleBI\systemsmanagement\resources\
DON'T EDIT THIS FILE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Till Next Time
Wednesday, August 13, 2008
OBIEE error saving security account
Till Next Time
OBIEE Children of the level / Converting rows to strings
Consider the following table:
But what you really want is this:
Or even better sorted alphabetically
This document describes how you can achieve this in OBIEE against an Oracle DB
2 Stragg function
This solution is based on Tom Kite’s original String Aggregation function found here:
http://www.sqlsnippets.com/en/topic-11591.html
To implement this function in OBIEE your first have to bring the function to the database. Either in the data-schema or in your custom OBIEE function schema. If you do the later be sure that the OBIEE function schema has direct select rights granted on the data-schema tables and views. Grant an execute on the STRAGG function to public. It’s also very handy to create a public SYNONYM for the STRAGG function. (CREATE PUBLIC SYNONYM STRAGG FOR SCHEMA_NAME.STRAGG;)
2.1 The STRAGG scripts
2.1.1 The STRAGG object
create or replace type stragg_type as object
(
string varchar2(4000),
static function ODCIAggregateInitialize
( sctx in out stragg_type )
return number ,
member function ODCIAggregateIterate
( self in
out stragg_type ,
value in varchar2
) return number ,
member
function ODCIAggregateTerminate
( self in stragg_type,
returnvalue out
varchar2,
flags in number
) return number ,
member function
ODCIAggregateMerge
( self in out stragg_type,
ctx2 in stragg_type
)
return number
);
/
2.1.2 The STRAGG type body
create or replace type body stragg_type
is
static
function ODCIAggregateInitialize
( sctx in out stragg_type )
return
number
is
begin
sctx := stragg_type( null ) ;
return
ODCIConst.Success ;
end;
member function ODCIAggregateIterate
( self in out stragg_type ,
value in varchar2
) return number
is
begin
self.string := self.string ',' value ;
return
ODCIConst.Success;
end;
member function ODCIAggregateTerminate
( self in stragg_type ,
returnvalue out varchar2 ,
flags in number
) return number
is
begin
returnValue := ltrim( self.string,
',' );
return ODCIConst.Success;
end;
member function
ODCIAggregateMerge
( self in out stragg_type ,
ctx2 in stragg_type
)
return number
is
begin
self.string := self.string
ctx2.string;
return ODCIConst.Success;
end;
end;
/
2.1.3 The STRAGG function
create or replace function stragg3 OBIEE Usage
( input varchar2 )
return varchar2
deterministic
parallel_enable
aggregate using stragg_type
;
/
These function work both from the repository as directly from the reports.
3.1 Unsorted
EVALUATE_AGGR( 'STRAGG(%1)' as varchar(200), EMP.ENAME)
3.2 Sorted
EVALUATE( 'STRAGG(%1) OVER ( PARTITION BY (%2) ORDER BY (%1) ASC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) ' as varchar(200), EMP.ENAME,DEPT.DEPTNO)
3.3 Distinct
EVALUATE_AGGR( 'STRAGG( DISTINCT %1)' as varchar(200), EMP.ENAME)
Till Next Time
This article was original written for the Ciber knowledge Blog:
http://knowledge.ciber.nl/weblog/?p=125
Tuesday, August 12, 2008
OBIEE Difference between two rows
Till Next Time
OBIEE Configuring Configuring the scheduler on Windows2003/Oracle
Here is how install the OBIEE scheduler on Windows2003 and an Oracle DB.
Basically you have to go trough 5 steps:
1 Create the DB User and Tables.
2 Check the instanceconfig.xml
3 Add the Scheduler Administrator to the credential store
4 Configure the Job Manager
5 Run A test
1 CREATE THE DB USER AND TABLES.
The table scripts can be found in ..\OracleBI\server\Schema\SAJOBS.Oracle.sql, but you have create the user yourself. Or you can use this script:
/*****************************************************************************/
/* Setup OBIEE scheduler on ORACLE */
/* READ THE SCRIPT BEFORE YOU RUN IT !!!!!!!!!! */
/* Run the script as SYSTEM */
/*****************************************************************************/
/*****************************************************************************/
/* Create the S_NQ_SCHED user */
/* You can change the password NOT the user name */
/*****************************************************************************/
DROP USER S_NQ_SCHED;
CREATE USER S_NQ_SCHED IDENTIFIED BY "S_NQ_SCHED_PASSWORD"
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP"
PROFILE DEFAULT
QUOTA UNLIMITED ON "USERS";
GRANT "CONNECT" TO S_NQ_SCHED;
GRANT "RESOURCE" TO S_NQ_SCHED;
GRANT CREATE SESSION TO S_NQ_SCHED;
GRANT CREATE TABLE TO S_NQ_SCHED;
GRANT CREATE VIEW TO S_NQ_SCHED;
ALTER USER S_NQ_SCHED DEFAULT ROLE NONE;
In ..\OracleBIData\web\config you will find the instanceConfig.xml
Check if the entry between Alerts Tags has a ScheduleServer entry. If you run it on an other port then 9705 add it in the form ServerName:PortNumber (MyServer:1234).
3 Add the Scheduler Administrator to the credential store
Open a command line box:
cryptotools credstore -add -infile e:/OracleBIData/web/config/credentialstore.xml
Credential Alias: admin
4 Configure the Job Manager
From the file menu select Configuration Options
On the Database tab enter the connection pool date. Always use the native call interface if possible!.
On the General tab enter the administrator name and credentials
Start the scheduler service
You can find the log in: ..\OracleBI\server\Log\
Open a connection with the jobmanager:
Enter the login credentials
This article was original written for the Ciber knowledge Blog: http://knowledge.ciber.nl/weblog/?p=124
Till Next Time