Další tipy v EBOOK. Přihlaste se k odběru. ZDE

Oracle databáze verze 12c má vylepšený import dat do databáze. Není již potřeba vytvářet konfigurační soubor. jediné, co se musí dodržet, že jmého datového souboru se shoduje se jménem tabulky.

SQL> connect tom/oracle_4U
Connected.
SQL> create table webinar_1 (email varchar2(40),jmeno varchar2(30),prijmeni varchar2(10));
Table created.
[oel64:oracle:orcl12c]$ sqlldr tom/oracle_4U TABLE=webinar_1
SQL*Loader: Release 12.1.0.1.0 - Production on Fri Mar 14 06:39:52 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
Express Mode Load, Table: WEBINAR_1
Path used: External Table, DEGREE_OF_PARALLELISM=AUTO
SQL*Loader-816: error creating temporary directory object SYS_SQLLDR_XT_TMPDIR_00000 for file webinar_1.dat
ORA-01031: insufficient privileges
SQL*Loader-579: switching to direct path for the load
SQL*Loader-583: ignoring trim setting with direct path, using value of LDRTRIM
SQL*Loader-584: ignoring DEGREE_OF_PARALLELISM setting with direct path, using value of NONE
Express Mode Load, Table: WEBINAR_1
Path used: Direct
SQL*Loader-500: Unable to open file (webinar_1.dat)
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
Table WEBINAR_1:
 0 Rows successfully loaded.
Check the log file:
 webinar_1.log
for more information about the load.
[oel64:oracle:orcl12c]$ ls -ltr
total 36
-rw-r--r--. 1 oracle oinstall 47 Nov 7 17:29 login.sql.bkp
-rw-r--r--. 1 oracle oinstall 25054 Mar 14 05:17 10_nej.csv
-rw-r--r--. 1 oracle oinstall 3652 Mar 14 06:39 webinar_1.log
[oel64:oracle:orcl12c]$ mv 10_nej.csv webinar_1.dat
[oel64:oracle:orcl12c]$ sqlldr tom/oracle_4U TABLE=webinar_1
SQL*Loader: Release 12.1.0.1.0 - Production on Fri Mar 14 06:41:10 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
Express Mode Load, Table: WEBINAR_1
Path used: External Table, DEGREE_OF_PARALLELISM=AUTO
SQL*Loader-816: error creating temporary directory object SYS_SQLLDR_XT_TMPDIR_00000 for file webinar_1.dat
ORA-01031: insufficient privileges
SQL*Loader-579: switching to direct path for the load
SQL*Loader-583: ignoring trim setting with direct path, using value of LDRTRIM
SQL*Loader-584: ignoring DEGREE_OF_PARALLELISM setting with direct path, using value of NONE
Express Mode Load, Table: WEBINAR_1
Path used: Direct
Load completed - logical record count 144.
Table WEBINAR_1:
 135 Rows successfully loaded.
Check the log file:
 webinar_1.log
for more information about the load.
SQL> select count(*) from webinar_1;
COUNT(*)
----------
 135


Komentáře