Top 17 Sql Loader Interview Questions
Q1. How Does One Load Ebcdic Data?
Specify the person set WE8EBCDIC500 for the EBCDIC information.
The following example suggests the SQL*Loader controlfile to load a hard and fast length EBCDIC file into the Oracle Database:
LOAD DATA
CHARACTERSET WE8EBCDIC500
INFILE facts.Ebc "restore 86 buffers 1024"
BADFILE statistics.Awful'
DISCARDFILE facts.Dsc'
REPLACE
INTO TABLE temp_data
(
field1 POSITION (1:four) INTEGER EXTERNAL,
field2 POSITION (5:6) INTEGER EXTERNAL,
field3 POSITION (7:12) INTEGER EXTERNAL,
field4 POSITION (thirteen:forty two) CHAR,
field5 POSITION (forty three:72) CHAR,
field6 POSITION (seventy three:73) INTEGER EXTERNAL,
field7 POSITION (seventy four:74) INTEGER EXTERNAL,
field8 POSITION (seventy five:75) INTEGER EXTERNAL,
field9 POSITION (76:86) INTEGER EXTERNAL
Q2. How Can You Load Microsoft Excel Data Into Oracle?
You can keep the statistics in textual content file with right separators from Microsoft Excel.
Q3. What Is The Difference Between The Sql*loader And Import Utilities?
Import and SQL*Loader each can be used to load records in a database.
However, import works in aggregate with export and may study files generated by export only.
Q4. Can You Skip Header Records While Loading?
You can use the SKIP parameter to bypass range of facts. In addition, you can use SKIP = 1 to bypass the header file.
Q5. Can One Improve The Performance Of Sql*loader?
A quite simple however without difficulty not noted hint isn't always to have any indexes and/or constraints (number one key) to your load tables at some stage in the load manner. This will substantially sluggish download instances even with ROWS= set to a excessive fee.
Add the following alternative in the command line: DIRECT=TRUE. This will effectively skip maximum of the RDBMS processing. However, there are cases whilst you cannot use direct load. For information, check with the FAQ approximately the differences among the traditional and direct direction loader under.
Turn off database logging by way of specifying the UNRECOVERABLE option. This option can most effective be used with direct facts masses.
Run multiple load jobs concurrently.
Q6. How Can One Get Sql*loader To Commit Only At The End Of The Load File?
One can not, but by means of setting the ROWS= parameter to a large cost, committing may be reduced. Make certain you have got large rollback segments ready while you operate a excessive price for ROWS.
Q7. How Does One Use Sql*loader To Load Images, Sound Clips And Documents?
SQL*Loader can load information from a "number one records document", SDF (Secondary Data file - for loading nested tables and VARRAYs) or LOBFILE. The LOBFILE approach presents an smooth way to load files, photographs, pics and audio clips into BLOB and CLOB columns. Look at this situation:
Given the subsequent table:
CREATE TABLE image_table (
image_id NUMBER(5),
file_name VARCHAR2(30),
image_data BLOB);
Control File:
LOAD DATA
INFILE *
INTO TABLE image_table
REPLACE
FIELDS TERMINATED BY ','
(
image_id INTEGER(five),
file_name CHAR(30),
image_data LOBFILE (file_name) TERMINATED BY EOF
)
BEGINDATA
001,image1.Gif
002,image2.Jpg
003,image3.Jpg
Q8. How Can You Load Multi Line Records?
You can use the CONCATENATE or CONTINUEIF characteristic to enroll in a couple of physical information to form a unmarried logical document.
However, CONTINUEIF is used if a situation shows that more than one facts should be treateed as one. For example, a # man or woman within the first column.
Q9. How You Improve The Performance Of Sql*loader?
You can use direct course load to improve the overall performance.
Indexes and constraints make inserts slow. Removing indexes and constraints improve performance of inserts; and therefore, of SQL*Loader.
Q10. What Is The Sql*loader?
SQL Loader is a tool to guide records from record to a database desk.
Q11. How Does Sql*loader Handles Newline Characters In A Record?
SQL*Loader expects a file to be in a single line; consequently, each time it encounters a newline person in a report, it treats the file as a new report and either throws an error bases on the restrictions of a table or inserts erroreous records with out throwing any mistakes.
Q12. How Can You Get Sql*loader To Commit Only At The End Of The Load File?
You cannot ensure a dedicate most effective on the cease of the weight file but you can growth the price of ROWS parameter to ensure the devote after certain variety of rows.
Q13. Can You Selectively Load Only Those Records That You Need?
Yes, you could use the WHEN clause to specify the selection criteria. However, it does now not will let you use the OR clause; rather, you can simplest use the AND clause.
Q14. What Is The Difference Between The Conventional And Direct Path Loader?
The conventional path loader essentially loads the facts via the usage of trendy INSERT statements. The direct route loader (DIRECT=TRUE) bypasses an awful lot of the logic involved with that, and loads without delay into the Oracle facts files. More facts approximately the restrictions of direct direction loading can be received from the Oracle Server Utilities Guide.
Some of the regulations with direct path hundreds are:
Loaded information will no longer be replicated
Cannot always use SQL strings for column processing in the manipulate record.
Q15. What Is The Difference Between The Conventional And Direct Path Loads?
The direct path load masses information without delay into datafiles even as conventional route load uses standard insert statements.
There are a few regulations with direct direction loads. The data loaded the use of direct path does no longer reflect.
Q16. What Is Sql*loader And What Is It Used For?
SQL Loader is a bulk loader application used for shifting records from external documents into the Oracle database. Its syntax is just like that of the DB2 load application, however comes with extra options. SQL*Loader supports diverse load formats, selective loading, and multi-table masses.
SQL Loader (sqlldr) is the software to apply for high performance information loads. The records can be loaded from any textual content file and inserted into the database.
Q17. Can You Load Data Into Multiple Tables At Once?
Yes.

