Your browser does not support JavaScript. This help page requires JavaScript to render correctly. Creating an Installation Script File with SQL Developer
Skip Headers
Previous
Previous
 
Next
Next

Creating an Installation Script File with SQL Developer

To create an installation script file with SQL Developer, use the Database Export tool. You specify the name of the installation script file and the objects and data to export, and SQL Developer generates DDL statements for creating the objects and INSERT statements for inserting the data into new tables, and writes these statements to the installation script file.

Note: In the following procedure, you might have to enlarge the SQL Developer windows to see all fields and options.

To create an installation script file with the Database Export tool:

  1. If you have not done so, create a directory for the installation script file, separate from the Oracle Database installation directory (for example, C:\my_exports).

  2. In the SQL Developer window, click the menu Tools.

    A drop-down menu appears.

  3. From drop-down menu, select Database Export.

    The Source/Destination window opens.

  4. In the Source/Destination window:

    1. In the File field, type the full path name of the installation script file (for example, C:\my_exports\hr_export.sql).

      The file name must end with .sql.

    2. From the Connections drop-down menu, select your connection (for example, hr_conn).

    3. Select the desired DDL Options (and deselect any selected undesired options).

      By default, Terminator and Pretty Print are selected and all other options are deselected. If you deselect Terminator, the installation script file fails.

      For descriptions of the DDL Options, see Oracle Database SQL Developer User's Guide.

    4. Click Next.

    The Types to Export window appears, listing the types of objects, and data, that you can export. To the left of each object is a check box. By default, every check box is selected.

  5. In the Types to Export window:

    1. Deselect the check boxes for the types that you do not want to export.

      Selecting or deselecting Toggle All selects or deselects all check boxes.

    2. If you do not want to export data, deselect the check box Data.

    3. Click Next.

    The Specify Objects window appears.

  6. In the Specify Objects window:

    1. In the drop-down menu with the value HR, accept that value.

    2. Click Go.

      A list appears, showing all objects in schema HR whose types you specified in step 5, and, if you specified Data in step 5, names of tables in schema HR.

    3. To export all items on the list, click >>; otherwise, select the objects to export and the tables with data to export, and click >.

      The items to be exported move from the original column to the other column. (To move all of them back to the original column, click <<; to move individual items back, select them and click <.)

    4. Click Next.

    The Export Summary window appears.

  7. In the Export Summary window, click Finish.

    The Exporting window opens, showing that exporting is occurring. When exporting is complete, the Exporting window closes, and the SQL Worksheet shows the contents of the installation script file that you specified in step 4.

  8. In the installation script file, check that:

    • Referenced objects are created before their dependent objects.

    • Tables are created before data is inserted into them.

    If necessary, edit the file in the SQL Worksheet or any text editor.

Related Topics

About Data Definition Language (DDL) Statements

About the INSERT Statement

Oracle Database SQL Developer User's Guide

Oracle Database Advanced Application Developer's Guide

Tutorial: Creating an Installation Script File for the Sequence and Tables

Tutorial: Creating an Installation Script File for the Package

Tutorial: Creating an Installation Script File for the Synonym and View

Tutorial: Creating an Installation Script File for the Data

Creating Installation Script Files