|
|
 |
***
This article is being delivered in Draft form and may contain
errors. Please use the MetaLink "Feedback" button to advise
Oracle of any issues related to this article.
***
|
| Purpose |
|---|
To inform migration specialists of the correct procedure for BCP utility usage.
|
| Scope & Application |
|---|
The audience for this document is Oracle customers, partners and migration specialists.
|
| BCP Utility Usage and use SQL*LOADER on Oracle |
|---|
Whenever the Sybase bulk loading utility, BCP, is being invoked from
within application code, it is important to flag such occurrences with
an MTGISSUE: PRT0019 comment immediately to the right of the line containing
the invocation of the BCP utility.
The syntax when invoking the SQL*Loader utility is of the form:
Sqlldr [username]/[password]@[service_name] control=[control file]
log=[log file] direct=true
In the example below, you will notice that a format file i.e. bcp.fmt,
was specified in the BCP invocation. This format file instructs BCP how
to process the data. SQL*Loader allows the user to specify similar formatting
options via a SQL*Loader control file. This control file can be specified
as a SQL*Loader command line argument.
It is important to realize that in some cases a reengineering of the
code is required as existing method names e.g. getBcpPath(), won¿t be
appropriate in an Oracle environment.
|
| BCP Statement Example | SQL*Loader Corresponding Statement |
|---|
System.out.println(getBcpPath() + " "+ tsreq.getDBName() + "..TSRawValues in " +
tsreq.getBcpFile()+".out" + " -S" + tsreq.getDBServer() + " -U" +
tsreq.getDBUser() + " -f bcp.fmt -P" + tsreq.getDBPasswd() );
| System.out.println("getSqlldrPath() + " " + tsreq.getDBUser() + "/" + tsreg.getDBPasswd() +
"@" + tsreq.getDBService() + " " + "control=TSRAWVALUES.ctl log=TSRAWVALUES.log direct=true");
|
|
|
|
|