SQL Loader Issues
I'm trying to lad a file into Oracle and I getting errors like:
Record 1: Rejected - Error on table "DW_SUPPORT"."ISAEO", column CLASS_CDE.
Variable length field exceeds maximum length.
This is for all my columns. Oracle is giving me different column widths than for the ones I've specified. In my control file, I've put:
OPTIONS ( SKIP=1, DIRECT=TRUE)
LOAD DATA
INFILE 'C:\CBOE\ICS\isaback_shrt.dat' "fix 89 "
BADFILE 'C:\CBOE\ICS\isaback_shrt.bad'
DISCARDFILE 'C:\CBOE\ICS\isaback_shrt.dsc'
INTO TABLE "DW_SUPPORT"."ISAEO"
INSERT
(CLASS_CDE POSITION (1:5) VARCHAR (5),
PUT_CALL_IND POSITION (6:6) VARCHAR (1),
EXPR_YR_DTE POSITION (7:8) VARCHAR (2),
EXPR_MO_DTE POSITION (9:10) VARCHAR (2),
EXER_PRC_INT POSITION (11:13) VARCHAR (3),
EXER_PRC_FRC POSITION (14:14) VARCHAR (1),
QUO_MO_SYM_CDE POSITION (15:15) VARCHAR (1),
QUO_PRC_SYM_CDE POSITION (16:16) VARCHAR (1),
SERS_ACTV_DTE POSITION (17:22) VARCHAR (6),
SERS_INACT_DTE POSITION (23:28) VARCHAR (6),
SERS_LSTMOD_DTE POSITION (29:34) VARCHAR (6),
DEC_FRAC_IND POSITION (35:35) VARCHAR (1),
FOUR_DIG_STRK POSITION (36:36) VARCHAR (1),
FIVE_DIG_STRK POSITION (37:37) VARCHAR (1),
FILLER POSITION (38:39) VARCHAR (2),
RAES_VOL_QTY POSITION (40:44) VARCHAR (5),
CARS_VOL_QTY POSITION (45:49) VARCHAR (5),
EXPR_RESN_CDE POSITION (50:50) VARCHAR (1),
AS_OF_CC POSITION (51:52) VARCHAR (2),
AS_OF_YY POSITION (53:54) VARCHAR (2),
AS_OF_MM POSITION (55:56) VARCHAR (2),
AS_OF_DD POSITION (57:58) VARCHAR (2),
FILLER2 POSITION (59:89) VARCHAR (31))
But Oracle, for some reason, has added two extra characters to each column giving me:
Table "DW_SUPPORT"."ISAEO", loaded from every logical record.
Insert option in effect for this table: INSERT
Column Name Position Len Term Encl Datatype
CLASS_CDE 1:5 7 VARCHAR
PUT_CALL_IND 6:6 3 VARCHAR
EXPR_YR_DTE 7:8 4 VARCHAR
EXPR_MO_DTE 9:10 4 VARCHAR
EXER_PRC_INT 11:13 5 VARCHAR
EXER_PRC_FRC 14:14 3 VARCHAR
QUO_MO_SYM_CDE 15:15 3 VARCHAR
QUO_PRC_SYM_CDE 16:16 3 VARCHAR
SERS_ACTV_DTE 17:22 8 VARCHAR
SERS_INACT_DTE 23:28 8 VARCHAR
SERS_LSTMOD_DTE 29:34 8 VARCHAR
DEC_FRAC_IND 35:35 3 VARCHAR
FOUR_DIG_STRK 36:36 3 VARCHAR
FIVE_DIG_STRK 37:37 3 VARCHAR
FILLER 38:39 4 VARCHAR
RAES_VOL_QTY 40:44 7 VARCHAR
CARS_VOL_QTY 45:49 7 VARCHAR
EXPR_RESN_CDE 50:50 3 VARCHAR
AS_OF_CC 51:52 4 VARCHAR
AS_OF_YY 53:54 4 VARCHAR
AS_OF_MM 55:56 4 VARCHAR
AS_OF_DD 57:58 4 VARCHAR
FILLER2 59:89 33 VARCHAR So it's giving me errors like:
SQL*Loader-307: Warning: conflicting lengths 5 and 7 specified for column CLASS_CDE table "DW_SUPPORT"."ISAEO"
I have no idea why its done this. It looks like it thinks I have spaces between my fields. Since I'm working with fixed width input fields do I somehow need to specify that I there are no spaces between fields? What do I need to do?
If you have some way for SQL Loader to identify that the the record is split or if you can alter how the files are generated to include a set character at the start of a record then you should be able to do this using CONTINUEIF.
If you can insert a character say $$ at the start of the record then include continueif this (1:2) = '%%' in the control file.
Other than that, it will depend on the format of your file. If your first field is always 3 characters wide you could do continueif this preserve (3:3) = ',' If it happens that the CR/LF occurs just before the closing quotes you could try continueif next preserve (1:1) = '"' Anything else and its going to be pretty difficult...
Similar Messages
-
How to load XML file to table (non-XML) with SQL*Loader -- issue with nulls
I have been attempting to use SQL*Loader to load an XML file into a "regular" Oracle table. All fields work fine, unless a null is encountered. The way that nulls are represented is shown below:
<PAYLOAD>
<FIELD1>ABCDEF</FIELD1>
<FIELD2/>
<FIELD3>123456</FIELD3>
</PAYLOAD>
In the above example, FIELD2 is a null field and that is the way it is presented. I have searched everywhere and have not found how I could code for this. The issue is that if FIELD2 is present, it is coded like: <FIELD2>SOMEDATA</FIELD2>, but the null is represented as <FIELD2/>. Here is a sample of the control file I am using to attempt the load -- very simplistic, but works fine when fields are present:
load data
infile 'testdata.xml' "str '<PAYLOAD>'"
TRUNCATE
into table DATA_FROM_XML
FIELD1 ENCLOSED BY '<FIELD1>' AND '</FIELD1>',
FIELD2 ENCLOSED BY '<FIELD2>' AND '</FIELD2>',
FIELD3 ENCLOSED BY '<FIELD3>' AND '</FIELD3>')
What do I need to do to account for the way that nulls are presented? I have tried everything I could glean from the web and the documentation and nothing has worked. Any help would be really appreciated.I hadn't even got that far. can you direct me to where the docs are to import data that is stored within xml but that you don't need any xml functionality, that just happens to be the format the data is stored in? thx
-
SQL*Loader issue with WHEN command
Environment: R12.1.2
We have a file coming in from a bank that needs to be loaded into a custom table using SQL*Loader.
The file has multiple record formats. Each record in the file starts with a "record type", which defines the format.
For simplicity, let me say that there is a record type of "H" with the header format, and another record type "D" has a detail record format. An "H" record may be followed by multiple "D" records until the next "H" record is encountered. Unfortunately, there is no common key, like say "Vendor Number" in both the "H" and "D" records to establish a relationship. So the plan was to use a Oracle sequence or SQL*Loader sequence to get a sequence loaded into the table as the file is being loaded. Then if consecutive "H" records had a sequence value of 100 and 112, we would know that the "D" records for the "H" 100 record are all the records with sequence value of 101 through 111.
The issue occurs as we have to use the WHEN command in the control file to direct a certain record type to specific columns of the table. Based on the populated sequence values, with the WHEN command, it seems that all the "H" records get loaded first followed by the "D" records. The sequence becomes of no use and we cannot establish a link between the "H" and "D" records. The alternative is to not use WHEN with the sequence, but load the file into generic column names which provides for less understanding in the application.
Is there a way (command feature) to ensure that SQL*Loader loads the records sequentially while using WHEN?
Thanks
SatishI used RECNUM parameter instead of sequence and it worked fine
-
Hi I am trying to use decode function with sql loader.. and gating error
SQL*Loader-350: Syntax error at line 8.
Expecting "," or ")", found keyword nullif.
code(:error_type,'Banned SBI',:error_type)" NULLIF error_type=BLANKS,
My ctl file is below...
LOAD DATA
INFILE 'abc.dat'
BADFILE 'abc.bad'
INTO TABLE xyz_tmp
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(record_id INTEGER EXTERNAL(4) NULLIF record_id=BLANKS,
error_type CHAR(100) "decode(:error_type,'Banned',:error_type)" NULLIF error_type=BLANKS,
error_subtype CHAR(100) NULLIF error_subtype=BLANKS,
number_of_errors INTEGER EXTERNAL(3) NULLIF number_of_errors=BLANKS,
sbi_number INTEGER EXTERNAL(8) NULLIF sbi_number=BLANKS,
team_name CHAR(60) NULLIF team_name=BLANKS
Could any one help me to correct it please.Hi,
Try changeing the line with decode to,
error_type CHAR(100) "decode(trim(:error_type),NULL, NULL,'Banned',:error_type)" ,
Cheers -
SQL*Loader issue with NULLIF
Hi all,
I am trying to use following control file,
LOAD DATA
INFILE *
REPLACE
INTO TABLE T1
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
OBJECT_NAME CHAR NULLIF OBJECT_NAME = "NULL" ,
SUBOBJECT_NAME CHAR NULLIF SUBOBJECT_NAME = "NULL" ,
OBJECT_ID DECIMAL EXTERNAL NULLIF OBJECT_ID = "NULL" ,
DATA_OBJECT_ID DECIMAL EXTERNAL NULLIF DATA_OBJECT_ID = "NULL" ,
OBJECT_TYPE CHAR NULLIF OBJECT_TYPE = "NULL" ,
CREATED DATE "DD/MM/YYYY HH24:MI:SS" NULLIF CREATED = "NULL" ,
LAST_DDL_TIME DATE "DD/MM/YYYY HH24:MI:SS" NULLIF LAST_DDL_TIME = "NULL" ,
TIMESTAMP CHAR NULLIF TIMESTAMP = "NULL" ,
STATUS CHAR NULLIF STATUS = "NULL" ,
TEMPORARY CHAR NULLIF TEMPORARY = "NULL" ,
GENERATED CHAR NULLIF GENERATED = "NULL" ,
SECONDARY CHAR NULLIF SECONDARY = "NULL"
)I am getting error,
SQL*Loader-350: Syntax error at line 21.
Expecting positive integer or column name, found keyword timestamp.
CHAR NULLIF TIMESTAMP = "NULL" ,
STATUSThe file I am trying to load is a pipe delimited file and has a string "NULL" for NULL values. So, I have added NULLIF for all columns.
Interesting thing is, Oracle allows us to have column names like TIMESTAMP or GENERATED, but I use it in the NULLIF clause, it is effectively syntax error.
The table I am using is like this (it is same as user_objects view),
SQL> desc t1
Name Null? Type
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED DATE
LAST_DDL_TIME DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)If I remove the NULLIF clause for columns, timestamp and generated, there is no problem, the control file works fine.
How can I get around this problem ?
Thanks in advanceTIMESTAMP is a keyword for the loader and confuses it.
rename your column -
Hi
I have a text file like this:
logs~-~189.138.221.234~[19/Nov/2007:18:39:53 +0100]~mujer.orange.es~/mujer.woo/home/home/index.html~mujer.woo~home~home~index.html~Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; FunWebProducts; InfoPath.2)~bid=1195493283-1925481236; __em_p=1195493283-1925481236%26bid; GUID=0002D029C7BD07412A7C28F861626364~-~?ord=4939922038660
Im trying to load via sql loader to a table like this:
CREATE TABLE SPY_LOGS_FLOGS
TYPE VARCHAR2(10 BYTE),
PROXY VARCHAR2(30 BYTE),
IP VARCHAR2(30 BYTE),
DATETIME DATE,
REFERER VARCHAR2(100 BYTE),
SPY VARCHAR2(100 BYTE),
SPY0 VARCHAR2(100 BYTE),
SPY1 VARCHAR2(100 BYTE),
SPY2 VARCHAR2(100 BYTE),
SPY3 VARCHAR2(100 BYTE),
BROWSER VARCHAR2(300 BYTE),
COOKIE VARCHAR2(100 BYTE),
UNKNOWN VARCHAR2(100 BYTE),
QS VARCHAR2(100 BYTE)
Im using a control similar to this:
LOAD DATA
infile '../files/spy_logs_flogs'
append
into table spy_logs_flogs
FIELDS TERMINATED BY '~'
TRAILING NULLCOLS
TYPE char,
PROXY char,
IP char,
DATETIME date 'to_date(:DATETIME,'"["yyyymmdd hh24:mi:ss"] +100"')' ,
REFERER char,
SPY char,
SPY0 char,
SPY1 char,
SPY2 char,
SPY3 char,
BROWSER char,
COOKIE char,
UNKNOWN char,
qs char
Im trying to transform the DATETIME field from [19/Nov/2007:18:39:53 +0100] to date 19/10/2007 18:39:53, but have tested with control and cant find the way to do it.
Any help will be appreciate.Play with
select substr('[19/Nov/2007:18:39:53 +0100]',2,20) the_date
from dualand if you get 19/Nov/2007:18:39:53 proceed to
select to_date('19/Nov/2007:18:39:53','DD/MON/YYYY:HH24:MI:SS')
from dual
select to_date('19/Nov/2007:18:39:53','DD/Mon/YYYY:HH24:MI:SS')
from dual
select to_date('19/Nov/2007 18:39:53','DD/MON/YYYY HH24:MI:SS')
from dual
select to_date('19/Nov/2007 18:39:53','DD/Mon/YYYY HH24:MI:SS')
from dualperhaps one of those will work (if it's the one without : then you must replace it with space using substr and || before using to_date)
Regards
Etbin -
SQL Loader ISSUE- when invoking function in a package - in Direct Path- SPK
This is the loader file a.ctl
load data
append
into table emp
when eno='4'
(eno number,
ename varchar2(20))
when (1)<>'4'
into table detpt
(deptno number,
deplogid "Log.get_logid('logid')"
Note: the deptlogid field is not null column.
The par fie is as follows
rows=1000
errors=0
direct=true
control=a.ctl
when i am running this file i am getting error when i am invoking the package Log.get_logid('logid')" in direct mode. It returns null value when it is used in control file.
1) if i am running this function in sql prompt like
select Log.get_logid('logid') from dual
i am getting result as 121.
2) what is the problem when the same function is used in Sql loader in direct mode.
3) is there any restriction to use the function in sql loader?
4) whether to use the function in sql loader is applicable for direct mode or conventional mode.
5) when i am running in conventional mode it is working fine . what is the reason??
I am running the loader from dos prompt like
c:> sqlldr scott/tiger@dev parfile=abc.par
Oracle 9i is the version for the loader.
Please help me out to solve the issueThis is the loader file a.ctl
load data
append
into table emp
when eno='4'
(eno number,
ename varchar2(20))
when (1)<>'4'
into table detpt
(deptno number,
deplogid "Log.get_logid('logid')"
Note: the deptlogid field is not null column.
The par fie is as follows
rows=1000
errors=0
direct=true
control=a.ctl
when i am running this file i am getting error when i am invoking the package Log.get_logid('logid')" in direct mode. It returns null value when it is used in control file.
1) if i am running this function in sql prompt like
select Log.get_logid('logid') from dual
i am getting result as 121.
2) what is the problem when the same function is used in Sql loader in direct mode.
3) is there any restriction to use the function in sql loader?
4) whether to use the function in sql loader is applicable for direct mode or conventional mode.
5) when i am running in conventional mode it is working fine . what is the reason??
I am running the loader from dos prompt like
c:> sqlldr scott/tiger@dev parfile=abc.par
Oracle 9i is the version for the loader.
Please help me out to solve the issue -
Sql loader issue ; please reply
Hi All
I added 2 extra columns to an existing table .
table tab (ATTD_IND,
ATTD_ID,
SEQ_NO,
CREATE_DATE "to_char(sysdate,'yyyymmdd')",
CYCLE_DT_CD "to_char(sysdate,'yyyymmdd')",
CMEH_ID,
ATTENDEE_TYPE,
This table is populated using loader. The issue is the file which we get is having data till seq_no .So the ctl. file works as create date and cycle dt are the last columns values defaulted to sysdate. We dont get them in the file. Now the file would have 2 new columns after seq_no , which are cmeh id and attendee type.
the issue is how to load these using the ctl file. I cant change the table and make create date and cycle date as the last columns. FILLER does not work here as I am not skipping any columns in the data file.
Please respond and guide me
thanksuser444699 wrote:
Hi All
I added 2 extra columns to an existing table .
table tab (ATTD_IND,
ATTD_ID,
SEQ_NO,
CREATE_DATE "to_char(sysdate,'yyyymmdd')",
CYCLE_DT_CD "to_char(sysdate,'yyyymmdd')",
CMEH_ID,
ATTENDEE_TYPE,
This table is populated using loader. The issue is the file which we get is having data till seq_no .So the ctl. file works as create date and cycle dt are the last columns values defaulted to sysdate. We dont get them in the file. Now the file would have 2 new columns after seq_no , which are cmeh id and attendee type.
the issue is how to load these using the ctl file. I cant change the table and make create date and cycle date as the last columns. FILLER does not work here as I am not skipping any columns in the data file.
Please respond and guide me
thanksEXTERNAL TABLE & custom PL/SQL perhaps? -
Hi Experts,
I'm trying to load data from a flat file into an Oracle table, but facing some issues.
Concern - (1)
I have a directory where there are ~20 similar files named like 'rb_1', 'rb_2', 'rb_3', etc...
All these data should be loaded into a single table say 'X'.
Is it possible that only 1 CTL file will loop and load all the files into X?
Concern - (2)
Field delimiter is Ctrl-X (CAN :Cancel) and Ctrl-M (EM : End of medium) characters
Row delimiter is Ctrl-Z (SUB : substitute) and Ctrl-T (DC4 : Device Control) characters
Is there any way I can specify this into my CTL file?
(I've only worked on field delimiter as comma ',' but not special characters like this)
Please let me know if any further info is required.
Help much appreciated.
Thanks,
-- RanitYou can give multiple infiles in your control file like
load data infile '/u01/data/rb_1.txt'
infile '/u01/data/rb_2.txt'
infile '/u01/data/rb_3.txt'
infile '/u01/data/rb_4.txt'
append into table <table_name>
(col1,
col 2,
You can also use ascii codes as a deliminator
ASCII Table - table of ASCII codes
External tables are the way to go though. -
SQL Loader issue - With junk charters in Last field
Hi
I have a data file to load .
I used a CTL and The Load is running fine.
But the last record comes with some kind of junk character when loaded into the table.
I checked if the file is in moved in binary mode or trying TRIM commands or replacing it int he code.
I tried replacing ^M and chr(10) but of no use.
can you please asssit men in this.. We have a go live soonPl post your exact OS and database versions, along with your complete sqlldr command, the table description and a sample of your input csv file.
See if the CONTINUEIF clause can help
http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/ldr_control_file.htm#i1005509
HTH
Srini -
SQL Loader : Issue with WHEN
I'm using Oracle 11g, Win XP.
I'm trying to load data with below control file:
OPTIONS (SKIP=0, DIRECT=FALSE, PARALLEL=FALSE, BINDSIZE=50000, errors=999999,ROWS=200, READSIZE=65536)
LOAD DATA
APPEND
INTO TABLE v_table
when COL_3 = 'XXXX'
fields terminated by "|" optionally enclosed by '"'
trailing nullcols
COL_1 "trim(:COL_1)",
COL_2 "trim(:COL_2)",
COL_3 "trim(:COL_3)",
COL_4 "trim(:COL_4)",
COL_5 "trim(:COL_5)",
COL_6 "trim(:COL_6)",
COL_7 "trim(:COL_7)",
INTO TABLE v_table
APPEND
when COL_3 = 'YYY'
fields terminated by "|" optionally enclosed by '"'
trailing nullcols
COL_1 "trim(:COL_1)",
COL_2 "trim(:COL_2)",
COL_3 "trim(:COL_3)",
COL_4 "trim(:COL_4)",
COL_5 "trim(:COL_5)",
COL_6 "trim(:COL_6)",
COL_7 "trim(:COL_7)",
)Below is the sample data in the data file:
33432|"ORACLE"|"XXXX"|"555827 "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
33433|"ORACLE"|"XXXX"|"555828 "|"317564"|" "|""|"ORACLE "|2011-07-24-15.37.11.879915|0001-01-01-01.01.01.000001
33434|"ORACLE"|"XXXX"|"555829 "|"317564"|" "|""|"ORACLE "|2011-07-10-15.37.11.879915|0001-01-01-01.01.01.000001
33435|"ORACLE"|"XXXX"|"555830 "|"317564"|" "|""|"ORACLE "|2011-07-22-15.37.11.879915|0001-01-01-01.01.01.000001
33436|"ORACLE"|"XXXX"|"555831 "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
33437|"ORACLE"|"XXXX"|"555832 "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
40048|"SAS"|"ZZZ "|"1017838 "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
40049|"SAS"|"ZZZ "|"1017839 "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
40050|"SAS"|"ZZZ "|"1017840 "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
20046|"SUNUSA"|"YYY "|"1017836 "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
20047|"SUNUSA"|"YYY "|"1017837 "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
20048|"SUNUSA"|"YYY "|"1017838 "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
20049|"SUNUSA"|"YYY "|"1017839 "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
20050|"SUNUSA"|"YYY "|"1017840 "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001Issue is:
When I'm loading data in the table with the above control card, only data with when COL_3 = 'XXXX' is getting loaded. And if I comment the block which has COL_3 = 'XXXX', then the second block is getting loaded (when COL_3 = 'YYY'). But I'm unable to load data for XXXX and YYY in single load. Can someone please help me on this?Thanks Warren. Found the solution.
when COL_3 = 'XXXX'
fields terminated by "|" optionally enclosed by '"'
trailing nullcols
COL_1 *POSITION(1)* "trim(:COL_1)",
COL_2 "trim(:COL_2)",
COL_3 "trim(:COL_3)",
COL_4 "trim(:COL_4)",
COL_5 "trim(:COL_5)",
COL_6 "trim(:COL_6)",
COL_7 "trim(:COL_7)",
INTO TABLE v_table
APPEND
when COL_3 = 'YYY'
fields terminated by "|" optionally enclosed by '"'
trailing nullcols
COL_1 POSITION(1) "trim(:COL_1)",
COL_2 "trim(:COL_2)", -
Sql loader issue(How to specify a file that exists on remote server)
In sqlldr infile parameter I'd like to give a data file that exists on remote server.How can I specify???Please help me in the syntax.
Any help would be greatly appreciated.
Edited by: 792353 on Sep 24, 2010 7:22 AMsqlldr can accept any path that is VALID and it can be any type of share as long as the OS supports the share.
so INFILE can be anything you want as sqlldr will simply attempt to access it via the OS.
if you are on a linux box going to another linux box with an NSF mount point on the box running sqlldr simply reference:
INFILE '/mountpoint/fname'
Now I have never tried a UNC path before but I would guess that if you are on a windows box, going to another winddows box and the box running sqlldr was logged in with the right permissions it would simply be:
INFILE '\\server\directory\file'
I doubt that it will accept a URL as in:
INFILE '//servername.com/directory/file'
I don't think that sqlldr does anonymous ftp or htp file transfer protocol, but I could be wrong.
NOTE: I have found that it is best to ALWAYS surround your INFILE parameter with single quotes. -
Help in calling sql loader and an oracle procedure in a script
Hi Guru's
please help me in writing an unix script which will call sql loader and also an oracle procedure..
i wrote an script which is as follows.
!/bin/sh
clear
#export ORACLE_SID='HOBS2'
sqlldr USERID=load/ps94mfo16 CONTROL=test_nica.ctl LOG=test_nica.log
retcode=`echo $?`
case "$retcode" in
0) echo "SQL*Loader execution successful" ;;
1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
3) echo "SQL*Loader execution encountered a fatal error" ;;
*) echo "unknown return code";;
esac
sqlplus USERID=load/ps94mfo16 << EOF
EXEC DO_TEST_SHELL_SCRIPT
it is loading the data in to an oracle table
but the procedure is not executed..
any valuable suggestion is highly appriciated..
Cheersmultiple duplicate threads:
to call an oracle procedure and sql loader in an unix script
Re: Can some one help he sql loader issue. -
HELP: SQL*LOADER AND Ref Column
Hallo,
I have already posted and I really need help and don't come further with this
I have the following problem. I have 2 tables which I created the following way:
CREATE TYPE gemark_schluessel_t AS OBJECT(
gemark_id NUMBER(8),
gemark_schl NUMBER(4),
gemark_name VARCHAR2(45)
CREATE TABLE gemark_schluessel_tab OF gemark_schluessel_t(
constraint pk_gemark PRIMARY KEY(gemark_id)
CREATE TYPE flurstueck_t AS OBJECT(
flst_id NUMBER(8),
flst_nr_zaehler NUMBER(4),
flst_nr_nenner NUMBER(4),
zusatz VARCHAR2(2),
flur_nr NUMBER(2),
gemark_schluessel REF gemark_schluessel_t,
flaeche SDO_GEOMETRY
CREATE TABLE flurstuecke_tab OF flurstueck_t(
constraint pk_flst PRIMARY KEY(flst_id),
constraint uq_flst UNIQUE(flst_nr_zaehler,flst_nr_nenner,zusatz,flur_nr),
flst_nr_zaehler NOT NULL,
flur_nr NOT NULL,
gemark_schluessel REFERENCES gemark_schluessel_tab
Now I have data in the gemark_schluessel_tab which looks like this (a sample):
1 101 Borna
2 102 Draisdorf
Now I wanna load data in my flurstuecke_tab with SQL*Loader and there I have problems with my ref column gemark_schluessel.
One data record looks like this in my file (it is without geometry)
1|97|7||1|1|
If I wanna load my data record, it does not work. The reference (the system generated OID) should be taken from gemark_schluessel_tab.
LOAD DATA
INFILE *
TRUNCATE
CONTINUEIF NEXT(1:1) = '#'
INTO TABLE FLURSTUECKE_TAB
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS (
flst_id,
flst_nr_zaehler,
flst_nr_nenner,
zusatz,
flur_nr,
gemark_schluessel REF(CONSTANT 'GEMARK_SCHLUESSEL_TAB',GEMARK_ID),
gemark_id FILLER
BEGINDATA
1|97|7||1|1|
Is there a error I made?
Thanks in advance
Tigmultiple duplicate threads:
to call an oracle procedure and sql loader in an unix script
Re: Can some one help he sql loader issue. -
Procedure won't execute after sql loader
I have a procedure that uses DDE to call a bat file. The bat file uses sqlloader to load data from an excel sheet into Oracle. After the bat file is executed, I am doing a series of deletes and inserts.
After this is done, I am calling another procedure. Whe I run the form, the second procedure is not executing. I put a message box and it does not pop up.
When I comment the first procedure, only then the second procedure is called. Is this a sql loader issue or a DDE issue?
thanksThanks for the reply.
There are no messages. Using Windows.
As an example, C:\Program Files\Adobe\Adobe Lightroom 5.7.1 is the location for Lightroom 5.7.1. I have pinned it to the task bar. Click on the icon and 5.7.1 executes. If I double click on C:\Program Files\Adobe\Adobe Lightroom 5.7.1\lightroom.exe I can execute LR 5.7.1, just as I would expect.
However, if I try the same with LR 6, which is located in C:\Program Files\Adobe\Adobe Lightroom, nothing happens. It is also pinned to the task bar. Click on the icon on the task bar, or on the desk top, and nothing happens. No message, nothing.
Task Manager indicates the only program running is Firefox, my browser.
Maybe you are looking for
-
Dual monitor for Power mac g5 dual 2.3ghz
I wanted some advice on which monitors to get for a dual monitor setup and if its even possible to setup on my G5 or do I need a different video card? Here's my computer spechs: Power mac G5 dual core 2.3 ghz (late 2005) Model: A1177 Memory: 2GB DDR2
-
Hi everyone. Before I had a chance, my wife logged into her facebook account using the facebook app on my Z10. Now all of her facebook contacts have been imported into my phone as well as all of her notifications appear in the Hub. I've tried: 1)
-
VERIZON WIRELESS, I AM TRYING TO SET UP A PAYMENT OF $529.62 FROM MY CHECKING ACCOUNT (OR LOCKBOX ACCOUNT) ON FRIDAY 12/20/13. PLEASE HELP ME WITH THIS OR GIVE THE PHONE NUMBER OF A CUSTOMER SERVICE AGENT THAT CAN HELP ME. THANK YOU.
-
How can I make Zotero fill the screen instead of only the bottom half?
I installed Zotero program but it occupies only the bottom part of my screen. How do I enlarge it and remove the Firefox part in the upper half?
-
Video on particular websites does not play.
Video doesn't play on sites like Fox.Com. I don't get a warning, pop up or the like. They do, however, play on Maxthon and other browsers. I cleared by cache, reinstalled and all the other typical hullabaloo to no avail.