Setting Permissions of Catalog Objects

17-28 System Administrators Guide for Oracle Business Intelligence Enterprise Edition

17.8 Searching for and Replacing Catalog Text Using Catalog Manager

You can search for specific text in the catalog and replace it with other text using Catalog Manager. You can open the catalog in either online or offline mode. In offline mode, you can replace all objects. In online mode, you might be unable to replace certain objects, depending on your permissions. Specifically, you can search for and replace: ■ A simple text string using a dialog, as described in Section 17.8.1, Searching for and Replacing a Simple Catalog Text String. For example, suppose that an object contains the string My Misspeled Wirds. You can use Catalog Manager to search and replace that string with the proper text of My Misspelled Words. ■ Multiple or complex text strings all at the same time using an XML file, as described in Section 17.8.3, Searching for and Replacing Multiple Catalog Text Strings. For example, suppose that the administrator renames a subject area, a table, or column in the repository file. The table Sales might be renamed MySales. You can use Catalog Manager to search and replace all uses of that object throughout the catalog.

17.8.1 Searching for and Replacing a Simple Catalog Text String

Use the following procedure to search for a simple text string in the catalog and replace it with other text. To search for and replace a simple text string: 1. In Catalog Manager, open the catalog in either online or offline mode.

2. From the Tools menu, select XML Search and Replace.

3. In the Old text field, enter the text string to search for.

4. In the Replace with field, enter the replacement text.

5. To make the search case insensitive, deselect the Case Sensitive box.

6. Click OK.

17.8.2 About Searching for and Replacing Multiple Catalog Text Strings

You can perform more powerful search and replace operations on multiple catalog text strings all at the same time by importing a XML file that identifies each text string to search for and replace.

17.8.2.1 XML File Format for Searching for and Replacing Text Strings

In the search and replace XML file, you use an action element to identify each text string to search for and replace. The action elements are contained in a commands element. The action element has the following attributes: ■ command — Specifies the text to replace. The valid value is: ■ textReplace — Replaces all the text that matches in an XML file, such as a column name. ■ oldValue — Specifies the text string to search for. Configuring and Managing the Oracle BI Presentation Catalog 17-29 When you specify this attribute for the textReplace command for the search and replace XML file, you must use the full Java regex syntax, which is not like a normal string. To replace a string, you must do the following: 1. Escape any special Java regex characters such as brackets, parentheses, dollar signs, and carets. 2. Escape any special normal string characters such as backslashes and quotes. 3. Because you are working in an XML file, escape any special HTML characters such as quotes and ampersands. The full Java regex syntax is described in the following document: http:java.sun.comj2se1.5.0docsapijavautilregexPatte rn.html Table 17–2 provides sample strings for use with the regex syntax in search criteria. ■ newValue — Specifies the replacement text. ■ ignoreCase — Ignores case when set to true, but becomes case-sensitive when set to false. The default value is false.

17.8.2.2 Example XML File for Searching for and Replacing Text Strings

The following is a partial example of an XML file for searching for and replacing a text string: ?xml version=1.0 encoding=utf-8? actions action command=textReplace oldValue=boots newValue=HoleyShoes ignoreCase=true actions

17.8.3 Searching for and Replacing Multiple Catalog Text Strings

Use the following procedure to search for and replace multiple catalog text strings all at the same time. To search for and replace multiple text strings: 1. Create the XML file for searching for and replacing multiple text strings. Table 17–2 Using regex Syntax in Search Criteria Search String Entered Result a Adds wildcards before and after your search string for example, a, enabling the search to return results that contain the letter a. a Adds a wildcard after your search string for example, a , enabling the search to return results that begin with the letter a. a Adds a wildcard before your search string for example, a , enabling the search to return results that end with the character a. a\ Searches explicitly for strings containing a character followed by an asterisk for example, a. ? Use a question mark ? with a character and an asterisk to return zero 0 or more occurrences of a character. For example ?a returns zero or more occurrences of the character a. 17-30 System Administrators Guide for Oracle Business Intelligence Enterprise Edition For information, see Section 17.8.2, About Searching for and Replacing Multiple Catalog Text Strings. 2. In Catalog Manager, open the catalog in offline mode.

3. From the Tools menu, select XML Search and Replace.

4. In the Import from File field, enter the path or click Browse to specify the XML

file that you created in Step 1.

5. To make the search case-sensitive, select the Case Sensitive box.

6. Click OK.

17.9 Creating Reports to Display Catalog Data Using Catalog Manager

You can create reports to display catalog data for all catalog object types. You can either display the report on the screen or save it to a file. For example, to find out which dashboards are using an analysis, you could run a Dashboard report including analyses, and search that report for the analysis. Or, to find analyses that are affected by a changed column in an RPD table, you could run an Analysis report including all columns and formulas, and then search the report for the items that must then be replaced in Catalog Manager. When you create a report, a blank or empty field is exported as a tab character. If you are creating a report with the default of a tab as the field separator, then two tab characters in the report file indicate a blank field. To create a report that displays catalog data: 1. In Catalog Manager, open the catalog. To create a report that shows the SQL statement that is sent to the Oracle BI Server for the object, open the catalog in online mode. 2. Select the top folder for the catalog.

3. From the Tools menu, select Create Report.

4. Select the catalog object type to create a report on.

5. To eliminate any rows that are the same from the report, select the Distinct box.

6. Specify the columns to appear in the report in the Columns in Report list. Use the left and right-arrow buttons and to move the columns between the Available Columns list and the Columns in Report list, and the plus and minus buttons + and - to set the order in which columns are displayed in the report.

7. Click OK.

8. Repeat Steps 4 through 7 until you the report contains the appropriate columns.

9. To save the report to a file, in the Save report to field, specify the path name of the

file. Click the Browse button to display the Save As dialog for selecting the path name if the file does not exist, then it is created.

10. Click OK to overwrite an existing file or click Cancel and enter a new name to

save to a new file.

11. Select Excel Format to specify to create a file with a .tab extension that can be

imported into Microsoft Excel 2003 or later.

12. Click OK.