This post I thought of covering end to end creating a sample RPD, Changing the settings in EM and querying it from

answers in OBIEE 11g. It covers following topics This will be a good starting point for someone who wants to learn OBIEE11g. 1. Building Physical Layer 2. Buiding BMM layer 3. Building Presentation Layer 4. Updating the settings in EM for latest RPD 5. Starting BI services 6. Enabling Query Logging

Building Physical Layer
Understanding the Business Scenario & Data structure
Business Scenario: Sales history schema comes with Oracle database as one of the sample schemas. It explains a business scenario where company has products which are sold through multiple channels to customers with seasoned promotions to make the sales effective. Steps to Install the Schema: Scripts can be found under the path $ORACLE_HOME/demo/schema/sales_history Login to the Oracle Database with system user. Run the main script sh_main.sql which will create the whole schema. It will create the user SH and below list of tables. Table Name COUNTRIES CUSTOMERS PRODUCTS TIMES PROMOTIONS CHANNELS SALES COSTS

Importing a Data Source
1.

Create a New Repository for DW as mentioned below :

a. Select Start > Programs > Oracle Business Intelligence > BI Administration. (Shortcut – Start > Run > Admintool) b. Select File > New

c. Enter DW in the Name, password in the Repository Password and retype the same. Select No for Import Metadata option.

Note: Please note the path where the RPD is getting stored. This is the default location for storing the RPD.
2.

Import DW table Schema

a. Create a tnsentry in ORACLE_HOME/Oracle_BI1 /network/ admin/Tnsnames.ora file for the Oracle Database from which you are planning to import the data.

b. Go back to Admin tool and Select File > Import Metadata Make sure that the connection type is ‘OCI 10g/11g’.

c. Select Tables & Keys check boxes (which ever object you needed)

Also at the time of import, you can specify the type of metadata to import. The default is to import tables, primary keys, and foreign keys. Only import objects needed for query generation. d. Then Click on Next

f.Note: Select the tables you wish to import and then click on Import Selected button. expand the SH schema data source in the rpd. After clicking the Import button you will see the connection pool which is automatically configured based on the options you had selected. . e. To display the tables. Just click ‘OK’. Verify that all tables imported successfully.

The Admin tool will look like this : 4 Update the row count and verify the database connection as shown below .g.

6 Save the repository. In the following section we are going to show both the techniques. b. Creating keys using Table Properties: Let us start with the Physical table CHANNELS table. 1. The primary key on this table is made up of a single column CHANNEL_ID. In the physical layer. Click No to check Global Consistency. Defining Keys and Physical Joins There are two different ways to define keys in Administration tool. Select File > Save. For now you can ignore this. Generally these are done to check errors in Business Model and Mapping. a. expand the DW folder and select CHANNELS . The first technique is to create Keys on the table using Table properties and the second technique allows you to create keys and joins using Physical diagram. Note: “Check Global Consistency” checks for errors in the entire repository.5 Should be able to see the row counts for each table after the above step.

5. 9. 7. Select SALES table Double click or right click and select Properties Go to Foreign Keys tab 13. Select the check boxes for CHANNEL_ID. Give a name for the Primary Key. Now you can see the Key Sign after collapsing the CHANNELS table.2. 12. 4. Click Add button then select the CHANNLES table in the first section . Double click or right click and select properties Select the Keys tab. 10. To create a foreign key. Click OK to close the Physical Table window. 11. 3. Click OK to close the dialog box. 8. Collapse the CHANNELS table. 6.

1. Click ok. right-click the DW data source > select Physical Diagram > Object (s) and All Joins. 14. Using Physical Diagram (Recommended): Using the Physical Diagram approach you can define both Primary and Foreign keys in one step. .like below and select the CHANNEL_ID column. In the Physical layer. Now Foreign Key also created.

2. The physical diagram may appear as in screenshot below: .

. as shown in screenshot below : You can now drag the tables to move around and rearrange them. To adjust the zoom level. right click on the white space and set the zoom level to 100%. Click the Create New Join button on the toolbar. 4.3. Objects will appear very big. but the zoom can be adjusted.

Click the PRODUCTS table first and then on the SALES table.5. The Physical Foreign Key dialog box will open up. . Select PROD_ID from PRODUCTS and PROD_ID from SALES. 6.

The first table and the second table has one to many relationship. there is one to many relationship between Dimensions and Facts. Generally. we click on dimension first and then on Fact.Note: The order of selecting the tables matters while defining the joins. So. The join has one to many relationship. 7. please select Yes. . If prompted for any question. Click Ok.

TIME_ID = SALES. When you are finished.Click No when prompted to check global consistency. Select File > Save or click the Save button on the toolbar to save the repository. Keep saving the repository at regular intervals. 13. and defined keys and joins. CUST_ID = SALES. 14. CUST_ID CHANNELS. 11. CHANNEL_ID = SALES.8. Leave the Administration Tool and the DW repository open for the next topic. set up an ODBC data source. CHANNEL_ID 9. The join conditions are as follows: PROMOTIONS. Repeat the above steps to define join between all the tables. PROMO_ID TIMES. 12. . PROMO_ID = SALES. 10. Congratulations! You have successfully created a new repository. TIME_ID CUSTOMERS. imported a table schema from an external data source into the Physical layer. click the X in the upper right corner to close the Physical Diagram.

.In the next topic you learn how to build the Business Model and Mapping layer of a repository.

you could drag and drop the Physical schema to create the initial Business Model.Building the Business Model & Mapping Layer The main purpose of the business model is to capture how users think about their business using their own business terms.rpd to open the repository file. There are two main categories of logical tables: Fact and Dimension. 1) In order to define logical table structure in DW Business Model. d) Enter the following parameters: User: Administrator Password: Admin123 e) Click OK. you will use Oracle BI Administration tool. Logical fact tables contain the measures of organization’s business operations and performance. In the name field. c) Double-click DW. 2) Create a Business Model by right clicking in the white space in the Business Model and Mapping layer and select New Business Model. The business model simplifies the physical schema and maps the users’ business terms to physical sources. name the business model as DW and click OK. A. Logical dimension tables contain the data used to qualify the facts. b) Select File > Open > Offline. . Follow the instructions in case you closed the admin tool or else go to point 2. 3) Create logical tables by right-clicking on DW business model and select New Object > Logical Table and name it Sales Fact in the Logical Table dialog box and click OK. a) Select Start > Programs > Oracle Business Intelligence > BI Administration. Alternatively.

It should appear as like below 5) Create Dimensions in Business Model and Mapping Layer as follows : a) Select the following tables in the Physical layer. double-click AMOUNT_SOLD logical column to open the Logical Column dialog box. PRODUCTS. Notice that the logical column icon is changed to indicate an aggregation rule is applied.4) Create Logical column of Sales Fact table a) In The Physical Layer expand SALES table. b) Select and drag AMOUNT_SOLD column from the Physical layer to the Sales Fact logical table in the Business Model and Mapping layer. CUSTOMERS and PROMOTIONS b) Drag the selected tables from the Physical layer onto the DW business model folder in the Business Model and Mapping layer. count etc. This automatically creates logical tables in the Business Model and Mapping layer. avg. In the Business Model and Mapping layer. Aggregation rule determines the aggregation type to be used in the SQL query generated by OBI. f) Click OK to close the Logical Column dialog box. rename the column to “Amount Sold” d) Click the Aggregation tab. g) Pull the QUANTITY_SOLD column from the SALES table to the Sales Fact h) Add the aggregation rule as SUM for Quantity Sold logical column. e) In the Default aggregation rule drop down list. CHANNELS. A new AMOUNT_SOLD logical column is added to the Sales Fact logical table. select SUM. c) Go to the General tab and in the Name field. sum. TIMES. For example. .

Leave the defaults as they are and click OK. To adjust the zoom factor. e) Click the New Join button in the toolbar. The Logical Join dialog box opens. right click on the empty space of diagram window and select the zoom. d) Place the Sales Fact table in the middle. f) Click on the PRODUCTS table icon first and then click on Sales Fact table icon in the Logical Table Diagram. .c) Right-click the DW business model and select Business Model Diagram > Whole Diagram.

CHANNELS join with Sales Fact CUSTOMERS join with Sales Fact TIMES join with Sales Fact PROMOTIONS join with Sales Fact Observe and close Logical Table Diagram window. 6) Select File > Save to save the DW repository 7) Click NO to check global consistency. Create the joins and repeat the steps for the remaining tables.g) The join is creating a one-to-many (1:N) relationship that joins the key column in the first table to a column that is a foreign key in the second table. BI server will pick the joins defined in the Physical Layer. . You don’t have to specify any join conditions in Business Model.

8) Remain logged in to the Oracle BI Administration Tool for the next lab. double click a column and change the name. Rename Business Model Renaming Business Model Objects 1) To change a column name manually. . click Rename Wizard and then Execute. Click Tools > Utilities and from utility dialog box. 2) To automate column name changing. For example change ‘CALENDAR YEAR’ to ‘Calendar Year’.

3) In the Rename Wizard. . click the Business Model and Mapping tab and select the DW business model. 4) Click the Add Hierarchy button and click Next button.

Similarly add other rules as per the screenshot. 8) Click First letter capital and click Add. it should appear as shown in next screenshot . The order of the selected rules is very important. 6) Select All text lowercase and click Add.5) First check ONLY Logical Table and Logical Column and click Next. 7) Click Change each occurrence of ‘_’ into a space and click Add.

It can be done manually > right click the logical table > select the Rename option.9) Click next and click Finish and verify that logical tables and logical columns in the Business Model and Mapping layer are renamed as per rules. . 10) The Logical Table names needs to be renamed further.

6) Save the repository. 5) Repeat the steps to delete the ‘ID’ logical columns from the following tables a) b) c) d) Customers Products Promotions Times Note: If you choose ‘ctrl’ button to select multiple object make sure the Logical Table is not highlighted. Use Ctrl + click to select the ID columns except Channel ID(we have to retain the primary key always). Do not check global consistency. 2) Press Delete key from keyboard or Right-click either of the selected columns and select Delete. the logical tables it should appear as : Deleting Unnecessary Business Objects 1) Expand Channels logical table in the Business Model and Mapping layer.11) After renaming. 4) Verify that the Channels logical table now has only three logical columns. . 3) Click Yes to confirm delete.

To do so.e. different view of data for business measures are provide for different type of users. d) Enter the following parameters: User: Administrator Password: Admin123 e) Click OK. c) Double-click DW. Steps for making Presentation catalog in Presentation Layer are as follows: 1) In case you closed the rpd file. b) Select File > Open > Offline. double click on the DW business model in the BMM layer > select the Checkbox for . a) Select Start >Programs > Oracle Business Intelligence > BI Administration. select View > Presentation from the menu bar. use the following steps to open the repository.rpd to open the repository file. 3) Make the DW Business model available for Queries. 2) Verify that the Presentation layer is visible. If it is not visible.Building Presentation Layer Creating Presentation Layer of DW Repository Exercise The main purpose of building the Presentation catalog in Presentation Layer is to provide the useful and necessary data from the end-users perspective i.

After rearranging it should appear as : . b) Double click the Customers table and select the column tab. 5) Reordering the columns of DW presentation catalog.4) Drag the DW Business Model folder from the Business Model and Mapping Layer to the Presentation Layer. a) Expand the DW presentation catalog. c) Change the order of columns using Up and Down buttons. Select the column and then click on Up or Down button. Thus the DW presentation catalog is created in Presentation Layer.

6) Similarly reorder the other columns by following the method described in step 4 in following order.d) Click OK to close the window. c) Change the column name by typing Product Name in the name field. b) Double-click the Prod Name column. 8) Repeat the process till all the column of Products presentation table get name as: . a) Expand the Products presentation table. d) Click OK. 7) Rename the columns of DW presentation catalog. select the General tab in the Presentation Column dialog box and uncheck the Use Logical Column Name.

For this purpose you have to perform deletion of unnecessary columns: a) In the Channels presentation column. c) Similarly delete the following columns from the presentation tables.Note: Alternatively you could rename these columns in the Business Model & Mapping layer (manually or using Rename wizard shown previously) 9) In order to meet end user’s requirement we have to hide/delete some columns from presentation Layer which are not used by users or are required in Business Model & Mapping layer. Do not check global consistency. 11) Save the repository. Tip: Drag and drop the business model from the business model and mapping layer onto the presentation layer. . this ensures faster creation of the presentation model. b) Click Yes to delete the object. Table Promotions Times Products Customers Column Name Promo Id Time Id Prod Id Cust Id 10) Verify the presentation tables for the changes you made. select the Channel Id and press Delete key from keyboard.

2) Select File > Check Global Consistency (Shortcut – You can select the presentation catalog and press CTRL + K) 3) If any error appears in Consistency Check Manager.rpd to open the repository file. Steps of checking repository are as follows: 1) If you haven’t open the Oracle BI Administration tool just open it by following steps. then edit the repository to correct the inconsistencies and rerun Check Global Consistency as in step 1. d) Enter the following parameters: User: Administrator Password: Admin123 e) Click OK. c) Double-click DW.Testing and Validating Repository Consistency Check Before testing the repository by running queries using Oracle BI Answers. b) Select File > Open > Offline. you have to check the consistencies of repository and its business model. 4) Consistency Check Manager can show three type of messages: . a) Select Start > Programs > Oracle Business Intelligence > BI Administration.

You can see the status of BI Server like below .cmd 2) Make sure the WLS running successfully as shown below 3) Also verify that BI Server web application is running properly by logging into the WLS 4) Login to the URL http://localhost:7001/console using below username/password given during the installation 5) After logging in go to Environment -> Servers. Updating the EM with new RPD and start Oracle BI Services Instructions Steps for starting the WLS and updating the configuration using Enterprise Manager Starting the WLS 1) Run the script from the below location ORACLE_HOME\user_projects\domains\bifoundation_domain\bin\startWebLogic. If you get these errors then go through the error description and fix it before proceeding. b) Warning: These messages show some warning messages which may or may not cause any errors.a) Error: These messages indicate that there has been some inconsistency in the model and need to be fixed before querieng. which can be followed. click on Close. 6) Keep the rpd open for the next lab. 5) On successfully and errorless appearance of Consistency Check Manager. c) Best Practices: These messages are displays information about the best practices.

Create an encrypted key entry in the EM After logging in navigate to WebLogic Domain -> bifoundation_domain Lock the domain like below before changing the configuration .6) Now login to EM URL http://localhost:7001/em using the same username/password used for WLS We have to do following steps to config BI server with our new RPD 1. Create an encrypted key entry in the EM (new feature from 11g) 2. Enter the new RPD name in the configuration 1.

Click on Security -> Credentials Click on Create Key .

bi.Enter the Details like below Select Map -> oracle.DW (repository string with the RPD name) Type -> password (always) Username/password -> enter the administrator user with password (Administrator/Admin123) .enterprise (default for encrypted key) Key -> repository.

we have to change the RPD that has to be loaded to the memory. After creating the key. Without this key BI server won’t upload the repository online.Then click on ok. Navigate to System MBean Browser like below After that go to Server Configuration like below .

Enter the RPD name and click on apply Then for enabling cache go to Performance Configuration .

Select true for the cache enabling option and then click apply Navigate to BIDomain like below .

.Click on commit to complete your changes and make it to the config files.

Check the configuration files whether the changes are into effect or not. Path: ORACLE_HOME\instances\instance1\config\OracleBIServerComponent\coreapplication_obis1\N QSConfig.INI To check the webcat location navigate like below to the PresentationServerConfiguration See the parameter called WebCatalogSharedLocation .Enter the value as Error (so it throws only error) and click invoke.

Let us start the BI services Go to Business Intelligence -> coreapplication like below and click on start Make sure we have four components running We have not configured the scheduler so it won’t run.Now we are done with the Enterprise Manager settings. Now WLS & BI services both are running. .

Enabling Query logging 1) Enable query logging to see the Objects being used and the SQL being issued to the data source by the BI Server. b) We can set the log level only in online mode. c) Open the Admin tool after starting all the services d) Navigate to Manage -> Identity e) Click on Administrator . a) From OBIEE 11g Administrator user will not be in RPD as they are coming from WLS.

f) Set the log level appropriately and click ok g) After that checking the changes 2) Select File > Save to save the DW repository. Click NO to check global consistency (since consistency check was just performed). . 3) Close the Admin tool.

Now we have to reload the metadata configuration which is loaded in the BI server following below steps. 2) Since we had made changes to the RPD (log level changes) after starting the services. Click on Administration after logging in Then click on Reload Files and Metadata Now click on Home tab and continue. 3) Click on the Analysis and the click on DW subject area to see the AD HOC layer. . 4) Click on the DW Subject Area in the right pane.Executing queries using Oracle BI Answers 1) Log in to Oracle Business Intelligence as the following parameters: a) Enter the following parameters: URL: http://localhost:9704/analytics User: Administrator Password: Admin123 b) Click OK.

. then expand Sales folder and click on Amount Sold. In order to create a report for this. 7) It may take few minutes to return the results as there are no filters. 8) The result is displayed as follows. 6) Click on Results tab or Display Results button in the right pane.5) Let’s start with a simple query say state wise amount sold. you have to first expand Customers folder and click on State Province.

The SQL Request is seen as: .log. click View Log link to see entries of Query log file. Scroll down to the bottom of the file to locate the last query you executed.9) Examine the Analytics query log file. a) Open <Oracle BI installation directory (generally D:\Oracle\instances\instance2\diagnostics\logs\OracleBIServerComponent\coreapplication_obis1 \NQQuery. OR the other method is: b) Go to Oracle Answers > Click Administration c) Then click Manage Sessions to open Session Management window d) Manage Sessions window opens. Under Action column.

we can full details like 1. Logical Table Sources List 4. SQL Request 2. Caching Information 5. Row count Details. Subject Area Details 3. Execution Plan 6. Physical Query 7. .As we had set the log level to 7. As we proceed in the course we will learn all these aspects. 10) Click the logout button to log out of Oracle Answers.