Purpose
Specifies a file into which all of the SQL DDL that Import would have executed, based on other parameters, is written.
Syntax and Description
SQLFILE=[directory_object:]file_name
The file_name
specifies where the import job will write the DDL that would be executed during the job. The SQL is not actually executed, and the target system remains unchanged. The file is written to the directory object specified in the DIRECTORY
parameter, unless another directory_object
is explicitly specified here. Any existing file that has a name matching the one specified with this parameter is overwritten.
Note that passwords are commented out in the SQL file. For example, if a CONNECT
statement is part of the DDL that was executed, it will be commented out and the schema name will be shown but the password will not. In the following example, the dashes indicate that a comment follows, and the hr
schema name is shown, but not the password.
-- CONNECT hr
Therefore, before you can execute the SQL file, you must edit it by removing the dashes indicating a comment and adding the password for the hr
schema (in this case, the password is also hr
), as follows:
CONNECT hr/hr
Example
The following is an example of using the SQLFILE
parameter. You can create the expfull.dmp
dump file used in this example by running the example provided for the Export FULL
parameter.
> impdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmp
SQLFILE=dpump_dir2:expfull.sql
A SQL file named expfull.sql
is written to dpump_dir2
.
No comments:
Post a Comment