Goal To test the repository by generating some queries, retrieving the results, and examining the query log Scenario You finished building the initial business model and now need to test the repository before continuing. You begin by checking the repository for errors using the consistency checking option. You then test the repository by running queries using Oracle BI Answers. Finally, you examine the query log file to verify the SQL generated by Oracle BI Server. Outcome A tested and verified repository file Time 2535 minutes Instructions 1. In this step, you perform a consistency test to check the repository for inconsistencies. A consistent repository has met the following requirements: All logical columns are mapped directly or indirectly to one or more physical columns. All logical dimension tables have a logical key. All logical tables have a logical join relationship to another logical table. There are at least two logical tables in the business model: one is a logical fact table, the other is logical dimension table; and both tables may map to the same physical table. There are no circular logical join relationships. A presentation catalog exists for the business model. a. Select File > Check Global Consistency. A message appears indicating that the SupplierSales business model is consistent and asks if you want to make it unavailable for queries. b. Click Yes. The Consistency Check Manager opens and displays a Warning message: The user Administrator belongs to the Administrators Group and has an empty password and a Best Practice message: The Physical Table '"ORCL".."SUPPLIER2"."D1_ORDERS2"' has no keys defined. Please note that your results may be slightly different. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
The Consistency Check Manager provides three types of messages: Error messages indicate errors that need to be fixed to make the repository consistent. Warning messages indicate conditions that may or may not be errors, depending upon the intent of the Oracle BI Server administrator. For example, a warning message about a disabled join may be the result of the administrator intentionally disabling a join, such as eliminating a circular join condition. Best Practices messages provide information about conditions but do not indicate an inconsistency, for example, fact table does not contain a logical key. 2. For the purposes of this training you can safely disable the Warning message and the Best Practices messages. a. Click the Options tab. b. Expand the Warnings folder. c. Expand the User folder. d. Select Search for Administrators with no Password. e. Click Disable. f. Click the Best Practices folder. g. If the Best Practices folder is already disabled, leave as is. Otherwise, click Disable. h. Click the Messages tab. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
i. Click Check All Objects. The Consistency Check Manager appears with no messages displayed, indicating that the repository is consistent.
j. Close the Consistency Check Manager. The SupplierSales business model folder has changed from unavailable for queries to available for queries . k. Save the repository. l. Click No when prompted to check global consistency because you just checked consistency. 3. In this step, you enable query logging for the Administrator user. To test the repository, you need to generate some queries, retrieve the results, and examine the query log. You log query activity at the individual user level. Logging is intended for testing, debugging, and technical support. In production mode, logging is normally disabled because query logging can impact performance by producing very large log files. a. Select Manage > Security. b. In the left pane, select Users. The Administrator user appears in the right pane. c. In the right pane, double-click Administrator. The User dialog box opens. d. Ensure that the User tab is clicked. e. In the Logging level field, set the value to 2. f. Click OK. g. Select Action > Close to close the Security Manager window. More security-related topics are addressed in the lesson titled Security. h. Save the repository. i. Click No when prompted to check consistency. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
j. Select File > Close to close the repository. k. Select File > Exit to exit the Server Administrator. 4. In this step, you update the Repository and Cache sections of the NQSConf i g. i ni initialization file. An entry in the Repository section of the initialization file instructs Oracle BI Server to load a specific repository into memory upon startup. If Oracle BI Server detects a syntax error while loading the repository, it logs the error to the server log file (D: \ Or acl eBI \ ser ver \ Log\ NQSer ver . l og). You also disable caching. Caching is typically not used during development, except to test the cache. You learn more about caching in the lesson titled Cache Management. a. Double-click D:\OracleBI\server\Config\NQSConfig.ini. b. Locate the REPOSITORY section and change the entry from Star = ClassStart.rpd, DEFAULT; to Star = ABC.rpd, DEFAULT;. c. In the CACHE section, immediately below the REPOSITORY section, change the ENABLE parameter from YES to NO.
d. Save the changes and close the file. e. Close or minimize Windows Explorer. 5. Start the Oracle BI Server service to load the ABC repository into memory, and ensure that the Oracle BI Presentation Server service is started. a. If the Services window is not open, double-click the Services icon on your desktop. b. If the Oracle BI Server service is already started, right-click Oracle BI Server and select Restart. If Oracle BI Server is not started, right-click and select Start. c. If Oracle BI Presentation Server is not started, right-click and select Start. d. Ensure that the Oracle BI Server and Oracle BI Presentation Server services are started by clicking the Refresh button until the Status column displays the value Started. e. Minimize the Services window. 6. Examine the NQSer ver . l og file to ensure that startup is successful. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
a. Navigate to D:\OracleBI\server\Log. b. Double-click NQServer.log to open it. c. Locate the message Loading repository D:\OracleBI\server\Repository\ABC.rpd. d. Ensure that SupplierSales is the Subject Area that was loaded and note the Oracle BI Server started message. The log should look similar to the following screenshot.
The log file can contain messages indicating why the server startup failed. For example, if there was a syntax error in the NQSConf i g. i ni file, the NQSer ver . l og file would contain messages about the syntax error. After examining the log messages, if errors were detected, you would correct the problem and start the server again. e. Close the NQServer.log file. 7. Start Oracle BI Answers. a. Ensure that the Oracle BI Server and Oracle BI Presentation Server services are started. b. Select Start > Programs > Oracle Business Intelligence > Presentation Services. c. Log in as Administrator. There is no need to enter a password. d. Click the Answers link. e. Ensure that the description you entered for the SupplierSales presentation catalog appears under the SupplierSales subject area. Recall that presentation catalogs appear as subject areas in Answers.
8. Execute queries to test the SupplierSales business model. In this step, you create a request showing the dollars for each sales rep in the MidAtlantic district in the year 1999. a. Click the SupplierSales subject area. b. Place the cursor over the Customers folder and ensure that the description you entered in an earlier practice appears as a tool tip. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
c. Expand the Facts folder and ensure that SalesFacts is nested under the Facts folder.
d. Expand the Customers table and click the Sales Rep and Sales District columns to add the columns to the request.
e. Expand the SalesFacts table and click the Dollars column to add it to the request.
f. In the Dollars column, click the Column Properties button.
g. In the Column Properties dialog box, click the Data Format tab. h. Click Override Default Data Format. i. In the Treat Number As field, select Currency. j. In the Currency Symbol field, select $. k. In the Decimal Places field, select 2. l. Select the Use 1000s Separator check box. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
m. Check your work:
n. Select Save > as the system-wide default for -SalesFacts.Dollars.
o. In the Dollars column, click the Order by button once to select the Order Ascending icon. p. Expand the Periods table and press and hold [Ctrl] and select the Year column. The Create/Edit Filter dialog box opens. q. In the Value field, enter 1999 and click OK. r. In the Sales District column, click the Add Filter button . s. Click All Choices. t. Select MidAtlantic from the list and click OK. u. Check the filters:
v. Click the Remove Column icon for the Sales District column so that this column will not be displayed in the request results. w. Your request now includes two columns:
x. Click the Results tab to view the results. Ensure that the Dol l ar s column is formatted as expected.
y. Which sales rep in the MidAtlantic sales district produced the highest revenue (dollars) in 1999?
9. In this step, you create a request showing the dollars for each sales district in the East region for the year 1999. a. Click the Create a new request icon and select the SupplierSales subject area. b. Create the following request:
c. In the Dol l ar s column, click the Order by icon once, to select Order Ascending icon. d. Press and hold [Ctrl] and add the following filters for Year and Region:
e. Click Results.
f. Which sales district in the East region had the highest revenue (dollars) in 1999?
b. In the Cursor Cache section, click View Log for the last entry. c. If necessary, scroll to the bottom of the file and then scroll up to locate the last query executed by Administrator. The log file should look similar to the following screenshot:
d. Locate the SQL Request section. This section contains the logical SQL issued from Answers. e. Which presentation table does Sales District information come from?
f. Which presentation table does Dollars information come from?
g. Which catalog name does the FROMclause identify?
h. What filters were applied to this request?
i. Locate the General Query Info section, just below the SQL Request section. This section identifies the repository, subject area, and presentation catalog from which the query was run. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
j. Which repository (logical name) was accessed for this query?
k. Which subject area was accessed for this query?
l. Which presentation catalog was accessed for this query?
m. Locate the Sending query to database named ORCL section, just below the General Query Info section. This section identifies the physical data source to which Oracle BI Server connects. n. Which physical tables were accessed for this query?
o. Which physical columns were accessed for this query?
p. For which physical column was an aggregation rule applied?
q. Which logical column maps to the physical column with the aggregation rule?
r. Which physical join specifications are used in this query?
s. Which physical column orders the query results?
u. How many rows were retrieved from the database?
v. Close the log file. w. Click Finished to close the Session Management window. x. Click Close Window to close the Oracle BI Presentation Services Administration window. y. Leave Oracle BI open for the next practice.
Congratulations! You have successfully used the Consistency Check Manager, Oracle BI Answers, and the query log to test and check the repository. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
Solutions 5-1: Testing the Repository Answers 8.y. Which sales rep in the MidAtlantic sales district produced the highest revenue (dollars) in 1999? Paula Madison 9.f. Which sales district in the East region had the highest revenue (dollars) in 1999? Yankee 10.e. Which presentation table does Sales District information come from? Customers 10.f. Which presentation table does Dollars information come from? SalesFacts 10.g. Which catalog name does the FROMclause identify? SupplierSales 10.h. What filters were applied to this request? year = 1999 and region = east 10.j. Which repository (logical name) was accessed for this query? Star 10.k. Which subject area was accessed for this query? SupplierSales 10.l. Which presentation catalog was accessed for this query? SupplierSales 10.n. Which physical tables are accessed for this query? D1_CUSTOMER2, D1_CALENDAR2, and D1_ORDERS2 10.o. Which physical columns were accessed for this query? DISTRICT and ACTLEXTND 10.p. For which physical column was an aggregation rule applied? ACTLEXTND 10.q. Which logical column maps to the physical column with the aggregation rule? SalesFact.Dollars RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
10.r. Which physical join specifications are used in this query? D1_CALENDAR2.YYYYMMDD = D1_ORDERS2.PERIODKEY D1_CUSTOMER2.NEWKEY = D1_ORDERS2.CUSTKEY 10.s. The query results are ordered by which physical column? ACTLEXTND (Dollars) 10.t. Did this query complete successfully? Yes 10.u. How many rows were retrieved from the database? 4 RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
Practice 5-2: Checking Consistency Goal To understand the requirements for a consistent business model Scenario You have successfully tested the business model and made it available to end users for querying. In this practice, you modify your business model to generate an inconsistent business model. This is to further understand the requirements for troubleshooting an inconsistent business model. Time 1015 minutes Instructions 1. Before modifying the repository, stop the Oracle BI Server service. a. Double-click the Services icon on your desktop. b. Right-click Oracle BI Server and select Stop. c. Ensure that Oracle BI Server stopped by checking that the St at us column displays no value. d. Minimize the Services window. 2. Make a copy of the ABC.rpd file. a. Navigate to D:\OracleBI\server\Repository. b. Right-click ABC.rpd and select Copy. c. Right-click anywhere in the right pane and select Paste. d. Rename the copied file to ABC_CHECK.rpd. 3. Open the ABC_CHECK repository in offline mode. a. Double-click ABC_CHECK.rpd to open the repository file. b. Log in as Administrator. There is no need to enter a password. c. On the title bar, ensure that you have opened ABC_CHECK.rpd.
4. Modify the business model to generate an inconsistent business model due to a missing logical join. a. In the Business Model and Mapping layer, right-click SupplierSales and select Business Model Diagram > Whole Diagram. b. Select the join connection between the Periods and SalesFacts logical tables. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
c. Right-click and select Delete to create a condition in the business model where an undefined join condition exists. d. Click Yes to confirm the delete. e. Close the Logical Table Diagram window. f. In the Business Model and Mapping layer, right-click SupplierSales and select Check Consistency. The Consistency Check Manager appears and displays an error message for the SupplierSales business model. The error description explains that Oracle BI Server could not load the navigation space for the subject area SupplierSales because the logical table, Periods, does not join any other logical table.
g. Click Close. h. Use the Business Model Diagram to repair the logical join. Recall that you need to create a complex join, not a foreign key join. i. Check consistency and ensure that the business model is consistent again. 5. Modify the business model to generate an inconsistent business model due to the fact that a logical column is not mapped to a physical column. a. Expand the SupplierSales business model. b. Expand the Customers table and its corresponding Sources folder. c. Double-click the D1_CUSTOMER2 logical table source. d. Click the Column Mapping tab. e. Ensure that both Show mapped columns and Show unmapped columns are selected. f. To which physical table and physical column is the Customer logical column mapped?
g. Click the ellipsis button next to the Customer logical column to open the Expression Builder. h. Select the expression in the Expression Builder and delete it. i. Click OK. j. Note that the Expression and Physical Table fields are now blank. k. Click OK to close the Logical Table Source dialog box. l. Right-click the SupplierSales business model and select Check Consistency. The Consistency Check Manager appears and displays an error message for a logical column in the Customer object. The error description explains that the Cust omer logical column in the Cust omer s logical table has no physical RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
data source mapping.
m. Close the Consistency Check Manager. n. Open the Logical Table Source dialog box again and use the Expression Builder to repair the mapping. o. Check consistency and ensure that the business model is consistent again. 6. Modify the business model to generate an inconsistent business model due to the fact that a logical dimension table does not have a logical key. a. Double-click the Customers dimension table to open the Logical Table dialog box. b. Click the Keys tab. c. Double-click D1_CUSTOMER2_key. d. Which column(s) is part of the logical key?
e. Click OK to close the Logical Key dialog box. f. Click Delete to delete D1_CUSTOMER2_Key. g. Click Yes to confirm delete. h. Click OK to close the Logical Table dialog box. i. Check consistency for the SupplierSales business model. The Consistency Check Manager appears and displays an error and a warning message. The error message description explains that the logical table Customers does not have a properly defined primary key. This error would prevent Oracle BI Server from starting successfully. The warning message indicates that the logical table Customers does not have a defined key. This would not prevent Oracle BI Server from loading the repository, but should be addressed.
j. Close the Consistency Check Manager. k. Return to the Customers Logical Table dialog box and repair the key. l. Check consistency and ensure that the business model is consistent again. 7. Modify the business model to generate an inconsistent business model due to the fact that there are trailing spaces in a presentation column name. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
a. In the Presentation layer, expand the SupplierSalesDM presentation catalog and then expand the Customers presentation table. b. Double-click the Sales District column. The Presentation Column dialog box opens. c. Ensure that the General tab is clicked. d. Change the column name by adding a space in front of Sales District in the Name field. e. Click OK. f. Select File > Check Global Consistency. The Consistency Check Manager appears and displays a warning message. The warning message indicates that the presentation column Sales District in the SupplierSalesDM presentation catalog has leading or trailing spaces. This would not prevent Oracle BI Server from loading the repository, but should be addressed.
g. Close the Consistency Check Manager. h. In the Business Model and Mapping layer, right-click SupplierSales and select Check Consistency. i. Why is it that you do not see the error message relating to SupplierSalesDM having leading or trailing spaces in it?
j. Close the Consistency Check Manager. k. Return to the SupplierSalesDM presentation catalog and repair the Sales District column. Make sure that you click the Aliases tab and delete the Sales District alias. 8. Close the ABC_CHECK repository without saving. You do not use this repository in any of the remaining practices. 9. Close the Oracle BI Administration Tool. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182
Solutions 5-2: Checking Consistency Answers 5.f. To which physical table and physical column is the Customer logical column mapped? table = D1_CUSTOMER2, column = NAME 6.d. Which column(s) is part of the logical key? CustomerKey 7.i. Why is it that you do not see the error message relating to SupplierSalesDM having leading or trailing spaces in it? The consistency check from the Business Model and Mapping layer checks only for errors associated with the subject area that you have selected, such as finding logical columns that are not mapped to physical sources, checking for undefined logical join conditions, and determining if physical tables referenced in a business model are not joined to tables referenced in the business model. Global consistency checks verify the entire repository. RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182