Exporting and importing applications

You can export the contents of an application from one Oracle Portal instance to another. Oracle Portal generates a SQL script that you can download to a local directory. Use the Oracle Portal import feature to import the object into the new schema. You can also use SQL*Plus to run the script and import the object.

If your application uses any User shared components, you need to export the shared components into the new Oracle Portal instance as well.

To export an application:

  1. In the Navigator, navigate to the list of applications.

  2. In the Name column, scroll to the application you want to export.

  3. In the Actions column, click Export next to the application that you want to export.

  4. A confirmation message displays when the SQL export script is generated. The message lists the application and all components that are to be exported when you run the script.

  5. Click the here link at the bottom of the page.

  6. A Save As dialog prompts you to save the export script file for the application and components in a local directory.

  7. Save the script file as an ASCII text file with the extension .sql.

  8. You can now import the application using appimp.csh or appimp.cmd, or SQL*Plus.

To import an application using appimp.csh or appimp.cmd:

Use the appimp.csh or appimp.cmd utility in the src/wwu directory (on UNIX) or src\wwu directory (on Windows NT) in the directory in which Oracle Portal is installed. Enter the following at the command line prompt:

appimp.csh <-s portal_schema> <-p portal_password> <-m import mode> <-t app_schema> <-a app_name> <-f script_file_name> <-security> <-d sec_dump_file><-c connect_string>

where:

portal_schema

The Oracle database account for the Portal user. The default is PORTAL30.

portal_password

The Oracle database password for the Portal user. The default is PORTAL30.

import_mode

Values include: CHECK or CREATE. The default is CHECK.

app_schema

The schema in which the application is to be created. If not specified, the schema in the script is used.

app_name

The name of the application to be imported. If not specified, the name in the script is used.

script_file_name

The script file name for the application. The default is <app_name>.sql.

security

Imports Portal security.

sec_dump_file

Optional, use this when you include the -security option. The security dump file (security.dmp). It imports the users and groups that have been exported, either by the page export script, the content area export script, or the security script itself. This parameter calls security.dmp to obtain the user and group information.

from_portal_schema

Optional, use this when you include the -security option. The Oracle schema name for Portal security from which the security is exported. The default is <portal_schema>.

db_user_mode

Optional, use this when you include the -security option. Indicates the mode for Portal users during the import (if the security flag is set). Modes include:

  • database_user (if the user exists in the target schema, that name is used. If the user does not, set the user to the _PUBLIC schema)

  • public_user (all database users are set to the _PUBLIC schema)

The default is database_user.

connect_string

An optional connect string for a remote database connection.

Example:

appimp.csh -s portal30 -p portal30 -t SCOTT -a EXAMPLE_APP -f appexport.sql

To import an application using SQL*Plus:

  1. Run the export script in SQL*Plus. For example:

sqlplus portal30/portal30 @application1.sql

  1. Connect as the Portal schema.

  2. The script interactively collects the following information for performing the import:

Import Mode

Values include: CHECK or CREATE.

Portal Schema

The target portal installation name.

Login User Name

The Portal user name.

Login User Password

The Portal user password.

Application Schema

Specify the schema in which the application is to be created.

Application Name

The name of the application to be imported. The application can be imported with a new name.

Log File

Specify a log file.

You can also run the import in silent mode by specifying the parameters along with the script. For example:

sqlplus portal30/portal30 @application1.sql CHECK portal30 portal30 portal30 SCOTT EXAMPLE_APP app.log

Note: You can import shared components by calling the export script from SQL*Plus. When you run the script interactively it prompts for the following:

Import Mode

Values include: CHECK or CREATE.

Portal Schema

The target portal installation name.

Login User Name

The Portal user name.

Login User Password

The Portal user password.

Log File

Specify a log file.

You can also run the script in silent mode. For example:

Example : sqlplus portal30/portal30 @sc1.sql CHECK portal30 portal30 portal30 sc.log

Note

  • Oracle Portal automatically generates a PL/SQL package for a component when it is imported into a new schema. The package's name is the same as the component's name. If a package with the same name exists in the application schema of the target database, you need to import the application to another schema.