Note: The samples in this section use Coastal Risk (Distance to Coast) as an example. All products are uploaded using the same steps. Related scripts for each product are found in the Prerequisites section.
- Download the product delivery file.
- Extract the delivery file to find the text data file.
- Create the table structure in the database using the Create Table script. Be sure to change the table name in the template to the name of the dataset you are loading. If, for example, you are loading the data for Coastal Risk (Distance to Coast), the table should be named dist_to_coast.
- Once the table structure has been created, copy the Oracle CTL template to the directory in which the product delivery file is located.
- Open the CTL file in a text editor.
- Add the path to the extracted data file to the infile statement and replace Oracle table name with the name of the table created in Step 3. (Note: The TRAILING NULLCOLS clause used in the CTL file instructs SQL Loader to treat any relatively positioned columns that are not present in the record as null columns.)
- Open a Windows command prompt and issue the following:
Example:sqlldr userid=<username>/<password>@<database_connection> control=<path>/<ctl_file_name> log=<path>/<log_file_name>
sqlldr userid=username/password@hostname/service control='D:\Distance_to_Coast\Distance_to_Coast_Data\oracle_dist_to_coast_ctl_template.ctl' log='D:\Distance_to_Coast\Distance_to_Coast\dist_to_coast.log'
- Data will begin loading into the database.