Previous |
Next |
To install the sample application, you run the installation script files that you created in the tutorials in "Creating Installation Script Files", in this order:
2day_tables.sql
2day_package.sql
2day_other.sql
2day_data.sql
You can either run the files one at a time, or you can create and run a master SQL script file that runs them in order.
The following master SQL script runs the files in order, commits the changes, and writes server messages to a log file:
spool C:\my_exports\create_log.txt @C:\my_exports\2day_tables.sql @C:\my_exports\2day_package.sql @C:\my_exports\2day_other.sql @C:\my_exports\2day_data.sql commit; spool off
The SQL*Plus command @
file_name
.sql
runs a file.
Typically, you run the master script file in SQL*Plus. However, if the master script specifies the full path names of the individual files (as in the preceding example), you can run it in SQL Developer.
The following procedure uses SQL Developer to install the sample application by running the installation script files one at a time, in order.
Note: The deployment environment must be different from the development environment, and is assumed to be another standard HR
schema.
To install the sample application using SQL Developer:
Connect to Oracle Database as user HR
in the deployment environment.
For instructions, see "Connecting to Oracle Database as User HR from SQL Developer". For Connection Name, enter a name other than hr_conn
(for example, hr_conn_2
).
In the navigation frame, click the tab Files.
The Files pane appears, showing the directories on your computer.
Navigate to the directory C:\my_exports
.
Expand my_exports.
The list of installation script files appears.
Right-click 2day_tables.sql.
A list of choices appears.
Select Open.
In the SQL Worksheet, a new 2day_tables.sql
pane appears, showing the content of the 2day_tables.sql
file.
Click the icon Run Script.
The Select Connection window opens.
For Connection, on the drop-down menu, select the connection to the deployment environment (created in step 1).
Click OK.
The result of each statement in 2day_tables.sql
is displayed in the Script Output pane.
Click the icon Clear.
The title of the 2day_tables.sql
pane is now in italic font, indicating that the changes have not been committed, and the SQL Worksheet is blank.
Click the icon Commit.
The changes are committed.
When you are sure that the individual installation script files run without errors, you can create a master SQL script (.sql
) file that runs them in order, commits the changes, and writes the results to a log file. For example:
spool C:\my_exports\create_log.txt @C:\my_exports\2day_tables.sql @C:\my_exports\2day_package.sql @C:\my_exports\2day_other.sql @C:\my_exports\2day_data.sql commit; spool off
Typically, you run the master file in SQL*Plus. However, if the master file specifies the full path names of the individual files (as in the preceding example), you can open and run it in SQL Developer.