80,EDUCATION,
A SQL*Loader controlfile to load this data is DEPTS.CTL:
1 load data2 infile 'depts.txt'3 badfile 'depts.bad'4 discardfile 'depts.dsc'5 append6 into table dept7 fields terminated by ','8 trailing nullcols9 (deptno integer external(2),10 dname,11 loc)To perform the load, from an operating system prompt run this command:
sqlldr userid=scott/tiger control=depts.ctl direct=trueThis command launches the SQL*Loader user process, connects to the local database
as user SCOTT password TIGER, and then performs the actions specified in the
controlfile DEPTS.CTL. The DIRECT=TRUE argument instructs SQL*Loader to use
the direct path rather than conventional insert (which is the default). Taking the
controlfile line by line:
Line Purpose1 Start a new load operation.2 Nominate the source of the data.3 Nominate the file to write out any badly formatted records.4 Nominate the file to write out any unselected records.5 Add rows to the table (rather than, for example, truncating it first).6 Nominate the table for insertion.7 Specify the field delimiter in the source file.8 If there are missing fields, insert NULL values.
Bạn đang xem 80, - OCA OCP ORACLE DATABASE 11G A LL IN ONE EXAM GUIDE P88 POT