Generate the Import File

The Oracle Database Metadata Generator creates the files needed to import metadata from the Oracle BI Server into the SQL Access Advisor.

This section contains the following topics that are common to the generator:

Run the Generator

The Oracle Database Metadata Generator is invoked from the command line or embedded in a batch file.

The command-line executable is named sametaexport.

The sametaexport utility is available on both Windows and Linux systems. However, you can only use sametaexport with binary repositories in repository format.

The location of the sametaexport utility is:

ORACLE_HOME/bi/bifoundation/server/bin

sametaexport -r "PathAndRepositoryFileName" [-p repository_password]
-f "InputFileNameAndPath" [options]

The table contains descriptions of the parameters in the command-line executable file.

Parameter Definition Additional Information

-r

Repository file name and full path

Quotation marks are required for the file name and path only if the file path is in long format or has spaces. Use the full path if the file isn't in the current directory.

-p

Repository password

The password for the given repository.

The password argument is optional. If you don't provide a password argument, you're prompted to enter a password when you run the command. To minimize the risk of security breaches, Oracle recommends that you don't provide a password argument either on the command line or in scripts. For scripting purposes, you can pass the password through standard input.

-f

Input file name and full path

Quotation marks are required for the file name and path only if the file path is in long format or has spaces. Use the full path if the file isn't in the current directory. You specify input files so that you don't have to type all the required information at the command line, and so that you can type international characters. See About the Metadata Input File.

You can include some additional parameters in the input file or at the command line to change various defaults for the Oracle Database Metadata Generator. Parameters specified in the input file take precedence over parameters specified at the command line. You must include these parameters only if you want to change the default values.

The tables describe these optional parameters.

Parameter Definition Additional Information Input File Usage Example Command Line Usage Example

Use schema name from Oracle BI repository

When set to YES, the table schema names are used as they're used in the repository. The default value is YES.

USE_SCHEMA_NAME_FROM_RPD = NO

-schemafrom rpd NO

Default schema name

The default schema name is used as the table schema name if the value of -schemafromrpd is set to NO, or if the repository schema name can't be determined. The default value is SIEBEL.

DEFAULT_SCHEMA_NAME = ORACLE

-defaultschema ORACLE

Oracle schema name

The metadata from Oracle Database Metadata Generator is created under this schema. The default value is SIEBEL.

ORA_DIM_SCHEMA_NAME = ORACLE

-orclschema ORACLE

Logging enabled

Indicates whether to keep a log of the metadata export process. Valid values are ON, OFF, and DEBUG. The default value is ON.

LOGGING = DEBUG

-logging DEBUG

Log file name

The path to the log file. If you provide an invalid path, an error occurs.

If you don't provide this parameter, the default log file path is used. The default path is:

ORACLE_INSTANCE\diagnostics\logs\
OracleBIServerComponent\
coreapplication_obisn\
OraDimExp.log

LOG_FILE_NAME = C:\bea_default\instances\instance1\diagnostics\ logs\generator\logfile.log

-logfile C:\bea_default\instances\instance1\diagnostics\logs\generator\logfile.log

Parameter Definition Additional Information Input File Usage Example Command Line Usage Example

Distinct count supported

When set to YES, allows measure containing the DISTINCT_COUNT aggregation to be exported. The recommended setting and default value is NO.

DISTINCT_COUNT_SUPPORTED = YES

-distinct YES

Statistical functions supported

When set to YES, allows measures containing the aggregation STDDEV to be exported. The recommended setting and default value is NO.

STATISTICAL_FUNCTIONS_SUPPORTED = YES

-stat YES

Use schema name

When set to YES, the Cube Views metadata attributes have columns from tables under a schema name, which are then specified in the parameters. When set to NO, the schema names for these tables are empty. The default value is YES.

USE_SCHEMA_NAME = NO

-useschema NO

Use schema name from Oracle BI repository

When set to YES, the table schema names are used as they're used in the repository. The default value is YES.

USE_SCHEMA_NAME_FROM_RPD = NO

-schemafromrpd NO

Default schema name

The default schema name is used as the table schema name if the value of -schemafromrpd is set to NO, or if the repository schema name can't be determined. The default value is SIEBEL.

DEFAULT_SCHEMA_NAME = ORACLE

-defaultschema ORACLE

Cube views schema name

The name of the schema under which the Cube Views metadata is created. The default value is SIEBEL.

CUBE_VIEWS_SCHEMA_NAME = ORACLE

-cubeschema ORACLE

Log file name

The path to the log file. If you provide an invalid path, an error occurs.

If you don't provide this parameter, the default log file path is used. The default path is:

ORACLE_INSTANCE\diagnostics\logs\
OracleBIServerComponent\
coreapplication_obisn\
CubeViews.log

LOG_FILE_NAME = C:\bea_default\instances\instance1\diagnostics\logs\generator\logfile.log

-logfile C:\bea_default\instances\instance1\diagnostics\logs\generator\logfile.log

Log failures

When set to YES, the log file lists the metadata that was invalidated under a certain rule. The default value is YES.

LOG_FAILURES = NO

-logfail NO

Log success

When set to YES, the log file lists the metadata that's been checked under each rule and has passed the check. The default value is NO.

LOG_SUCCESS = YES

-logsuccess YES

About the Metadata Input File

The table describes the parameters in the metadata input file.

The input file is a text file that contains the parameters that are described in the following table.

Input File Name Description

BUSINESS_MODEL

The name of the business model in the logical layer of the Oracle BI repository that contains the metadata to export. If the business model isn't found in the repository, then an error message is displayed.

You can only specify one business model name in the input file. To generate metadata for multiple business models, create another input file and run the Oracle Database Metadata Generator again.

PHYSICAL_DATABASE

The name of the database in the physical layer of the Oracle BI repository that contains the metadata to export. When the business model derives from multiple databases, then it eliminates metadata from all databases other than the one specified here. When the physical database isn't found in the repository, an error message is displayed.

RUN_AS_USER

The user name of the database user whose visibility must be duplicated for the metadata export. This parameter can't be empty. This user must exist as a user reference in the repository.

OUTPUT_FOLDER

The full path and file name of the folder where the SQL file placed. If the folder doesn't exist when you run the Oracle Database Metadata Generator, then the folder is created in the process. See About the Output Files.

The following text shows a sample metadata input file:

BUSINESS_MODEL = "1 - Sample App"
PHYSICAL_DATABASE = "1 - Sample App Data"
RUN_AS_USER = "Administrator"
OUTPUT_FOLDER = "C:\OracleBI"

About the Output Files

Each Generator creates different types of output files.

The following list describes the output files:

  • The Oracle Database Metadata Generator creates a SQL file that's encoded in UTF-8 and stored in the specified output folder. The file name is based on the name of the business model you specified in the input file, such as my_business_model.sql.

Troubleshoot Errors from the Generator

Error messages indicate that the Generator was unable to complete some or all of its tasks.

After starting the Generator, you might observe the following error messages:

  • Unable to write to Log file: log_file_name.

    The log file specified in the input file or at the command line might contain the wrong path, the user might not have write permissions to that folder, or the disk could be out-of-space.

  • Run_as_user, user_name, is invalid.

    The user name is incorrect.

  • Repository, repository_name.rpd, is invalid or corrupt.

    The repository name might be incorrect, it might not exist in the given path, or the user might not have permission to read it.

  • Physical Database, database_name, is invalid.

    The physical database name doesn't match a valid physical database object in the repository.

  • Business Model, model_name, is invalid.

    The business model name doesn't match a valid business model object in the repository.

  • Authentication information provided is invalid.

    The repository password provided at the command line is incorrect.

  • Path: "path_name" is invalid.

    The path or file name is incorrect, or the current user doesn't have read access.

Metadata Conversion Rules and Error Messages

When the Generator creates the output files, it also maps the metadata objects in the Oracle BI repository to similar objects in the metadata of the Oracle Database.

This section explains the rules used to identify metadata that can't be translated (converted) into either SQL or XML format. These rules are necessary because Oracle Database and IBM Cube Views don't support some of the metadata constructs that are allowed by Oracle Analytics Server.

Dimensional metadata in the SQL or XML file is generated at the logical fact table source level. If a logical fact table source has an invalid logical dimension table source, then the logical dimension table source is invalidated. If the logical fact table source is invalid, then all the logical dimension table sources that are mapped to it are also be invalidated. Invalid repository metadata elements aren't converted to cubes in the SQL or XML file.

When a rule is violated, the Generator writes the error messages and the metadata that violated the rule to the log file.

Conversion Rules for Oracle Databases

Learn the rules for converting Oracle BI metadata into objects.

The following list provides the rules for converting Oracle Analytics Server metadata into objects in the Oracle Database:

  • Attributes that contain expressions in the logical table can't be exported.

  • Tables joined using complex joins aren't considered.

  • Tables that are opaque views aren't considered.

  • Columns used as part of a key in one level can't be used as part of another level key.

    Oracle Database prohibits the use of columns as keys in multiple levels. This prohibition requires the Oracle Database Metadata Generator to eliminate one of the two joins, usually the join that's encountered first. Therefore, the other joins are lost, which prevents them from being exported.