Server Utilities :: Load 780 CSV Files Into 12 Tables Created In Database - Sql Loader?

Jul 22, 2011

I have 780(12*65) csv files generated from 65 databases.Now I have to load this 780 csv files into 12 tables created in my database for some monitoring and reporting purpose.to call the sql loader I am plannig to create 780 lines like below.

sqlldr abc@tns/pwd control='E:htmlctlhtml_broken_jobs_rpt.ctl' log='E:htmlreportloghtml_broken_jobs_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_db_size_rpt.ctl' log='E:htmlreportloghtml_db_size_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_fragmentation_rpt.ctl' log='E:htmlreportloghtml_fragmentation_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_index_stats_rpt.ctl' log='E:htmlreportloghtml_index_stats_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_invalid_object_rpt.ctl' log='E:htmlreportloghtml_invalid_object_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_long_running_queries_rpt.ctl' log='E:htmlreportloghtml_long_running_queries_rpt.log'

we know creating 780 control files is the difficult task.So I have created only 12 control files. is there any mechanism to pass a varible (planning to declare it in the sqlldr line) to the infile clause like below in sql loader?

infile "E:htmlreportoutput&a_html_broken_jobs_rpt.csv"

here a is the variable name. it will change every 12 csv files once.

or

is there anyother way to achive this?

View 8 Replies


ADVERTISEMENT

Server Utilities :: Load Data Into More Tables From Many Files

Jan 20, 2012

I want to load data into more tables from many files ,based on first column value,which is FILLER field.i am trying to test this scenario with two oracle tables with similar definition. and load one record on each table using WHEN/POSITION keywords. for this , i added first column as reference column in the data which i have in ctl file itself.

1st table loaded with 1st record. But, 2nd record not loading.if i missed anything with WHEN/POSITION keyword ?

This is the error in log file for 2nd table(WD1):

Record 2: Rejected - Error on table WD1, column TAB.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Table WD1:
0 Rows successfully loaded.
1 Row not loaded due to data errors.
1 Row not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
[code]....

View 9 Replies View Related

Server Utilities :: Load Multiple Tables From SQL* Loader?

Nov 1, 2011

I Have Flat file with 20columns of data,My intention is to load into two tables(i.e TABLE1 WITH 10 columns,TABLE2 With remaining 10columns)

View 5 Replies View Related

Server Utilities :: Load WKT Using Sql*loader

Mar 10, 2010

I want to load geometry into a table using sql*loader. My datafile contains geometry defined as WKT URL...., a standard for geometry and also Oracle has a function called sdo_util.from_wktgeometry.If I'm using a separate 'insert into' statement using this function in sql*plus, there's no problem. But if I'm using the same function in my control-file for sql*loader import, I get a sql*loader-418 error: "bad datafile for column geometrie".

Why and how I can import WKT using sql*loader?

-- data file
id;geometrie
1;POINT(120123.123 485345.789)
2;LINESTRING(123456.01 482543.21, 125764.76 483444.11)
3;POLYGON((121121.22 484394.22, 122887.444 484721.48, 122911.098 486382.45, 121005.21 486592.01, 121121.22 484394.22),(121922.56 485333.23, 122010.22 485854.83, 121922.56 485333.23))
4;MULTIPOINT((120586 483958.33),(120635 483726.11))
5;MULTILINESTRING((117948 480284, 118215 481236),(118475 481604, 120462 482822))
6;MULTIPOLYGON(((123678 481948, 124654 485215, 123678 481948),(127321 488321, 124907 483921, 127321 488321)))
[code]....

View 15 Replies View Related

Server Utilities :: Load To A Table Through Sql*loader

Apr 6, 2010

I Have one csv file.i want to load to a table trough sql*loader.but in table 3 column is there.but in the csv file some record hav one semicolumn in last filed like this

1234;"hogit";78887;89
4567;"rtef";12565;89

how can we load...

View 6 Replies View Related

Server Utilities :: How To Skip Last N No Of Records In Sql Loader Load

Aug 3, 2011

I have data file emp.dat in that i have 10000 records. My requirement is i want to skip last 100 records when i am loading it into EMP table using SQL *LODER.

View 6 Replies View Related

Server Utilities :: Load Data Into A Table Using SQL Loader

Feb 7, 2013

I'm trying to load data into a table using SQL Loader but getting a failure error below.

Log File
========

SQL*Loader: Release 11.2.0.2.0 - Production on Wed Feb 6 23:54:25 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Control File: /opt/Infor/Outbound_Marketing/7.2.2/EM/metadata/trans.ldr
Data File: /opt/Infor/Outbound_Marketing/7.2.2/EM/logs/trans.log
Bad File: trans.bad
Discard File: none specified
[code]....

View 13 Replies View Related

Server Utilities :: Sql Loader To Load In Multiple Table With IN Predicate?

May 17, 2012

load data in multiple table using sql loader. I have IN predicate which i don't know is allowed in the sql loader or not

my control file and is as below

LOAD DATA
INFILE 'c: empdemo05.dat'
BADFILE 'c: empad05.bad'
DISCARDFILE 'c: empdisc05.dsc'
REPLACE

[code]....

i am getting below error when executing above error

SQL*Loader-350: Syntax error at line 5.
Expecting "(", found keyword when.
WHEN DEPTNO IN ('

View 4 Replies View Related

Server Utilities :: Sql Loader Do Not Load Records And Write Them Into Badfile

Oct 18, 2012

My loader start and say commit reach logical records 8 as there are 8 records but donot load them and write them into badfile. there is no logs file generation happing so unable to trace.

table
CREATE TABLE ERS_NRT_SRC
(
POLL_ID NUMBER(10) NULL,
TIME_OF_POLL DATE NULL,
SERVICE_DESC VARCHAR2(50 BYTE) NULL,
LOCATION_AGENT VARCHAR2(30 BYTE) NULL,
TRANSACTION_NAME VARCHAR2(50 BYTE) NULL,

[code]...

View 6 Replies View Related

Server Utilities :: Sql Loader - Load Whole File In Oracle Table?

Oct 26, 2012

I am having query regarding sql loader. my data file is comm(,) seperated and I want to load the whole file in oracle table 'bill_temp' except 1st column data of data file.

e.g.
File name: bill_file.dat
fields seperated by comma ','
values are like
emp_id,emp_name,emp_sal,join_date
oracle table bill_temp having the below column:
emp_name,emp_sal,join_date

Here I want load the emp_name,emp_sal and join_date into oracle table bill_temp.
emp_id should not get loaded into table.

Is there any way to skip the loading of particular column data from data file into table?

View 12 Replies View Related

Server Utilities :: Load Selected Records From Flat File Using SQL Loader

Nov 24, 2011

Load the selected records from the flat file using SQL*Loader.

I have a flat file it's having 100 records, I want to load first 10 records from the file using SQL*LOADER.

View 8 Replies View Related

Server Utilities :: Loading Multiple XML Files Using SQL*Loader?

May 9, 2011

I am trying to load multiple XML files into Oracle DB using SQL Loader. The filenames of the XML files starts with a description and then numbers, where the numbers are different each time.

Here's my CTL file:

LOAD DATA
INFILE *
INTO TABLE XML_TABLE TRUNCATE
xmltype(XML_TABLE)
FIELDS
(

[code]....

I don't want to keep having to go into the ctl file and change the numbers of the xml file. Is there a way where I could just load all .xml files that begins with 'description'? Like maybe

description*.xml

View 1 Replies View Related

Server Utilities :: How To Load Date And Time From Text File To Oracle Table Through Sql Loader

May 31, 2010

what i miss to load date and time from text file to oracle table through sqlloader

this is my data in this path (c:externalmy_data.txt)

7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30

my table in database emp2

create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);

the control file code in this path (c:externalctrl.ctl)

load data
infile 'C:externalmy_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)

this is the error :

C:>sqlldr scott/tiger control=C:externalctrl.ctl

SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:>

View 21 Replies View Related

Server Administration :: Load Database Files On Other Machine?

Dec 7, 2010

I am trying to upload a database backup on a machine. Since the structure of files is different from server, how can i start the database.

Do i need to create a new control file? If yes, how can i run the sql command "Alter database backup controlfile to trace" in nomount mode.

View 3 Replies View Related

Server Utilities :: Loading Multiple Excel Files To Different Tables

Mar 29, 2012

I have a bunch of data in 50 excel files. I need to load all these 50 files into 50 different tables. I would like to do this in one script. I went through the forum to get this information, people suggested create a shell script etc or list the sqlldr command multiple times etc.

provide some clarity on this as to what's the best approach.If it is through shell scripting provide the shell script and instructions to execute it. Iam new to shell scripting.

View 5 Replies View Related

Server Utilities :: Insert Rows In Two Tables Using Sql Loader?

Aug 7, 2012

I am trying to insert rows in two tables using sql loader.

I have two tables in database as

SQL> desc name
Name Null? Type
---------------------- -------- ------------
ID NUMBER
NAME VARCHAR2(20)
BD DATE

SQL> desc name3
Name Null? Type
--------------------- ----------- -------------
ID NUMBER
NAME VARCHAR2(20)
BD DATE

I created controlfiles as

[oracle@DBTEST sqldri]$ cat datafile.ctl
options (direct=true)
load data
INFILE *
into table name truncate
when id='1'

[code]....

when i run sql loader as

[oracle@DBTEST sqldri]$ sqlldr hr/hr control=/u01/sqldri/datafile.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Tue Aug 7 23:30:07 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Load completed - logical record count 2.

no rows is inserted..the log file contain entries as

[oracle@DBTEST sqldri]$ cat datafile.log
SQL*Loader: Release 10.2.0.1.0 - Production on Tue Aug 7 23:30:07 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: /u01/sqldri/datafile.ctl
Data File: /u01/sqldri/datafile.ctl
Bad File: /u01/sqldri/datafile.bad

[code]....

View 7 Replies View Related

Server Utilities :: Loading Data Via SQL Loader Into VArray Tables

Aug 19, 2010

Is it Possible doing SQL LOAD into Varray table having two inner objects.

find the structure of the table and its types for your reference

CREATE OR REPLACE TYPE OB_TEST_INFO AS OBJECT (
AGE NUMBER ( 3 ),
NAME VARCHAR2 ( 14 )

[Code].....

View 3 Replies View Related

Server Utilities :: How To Import Backup On Newly Created Database Using Imp

Nov 18, 2011

I have near 114 export.dmp.z* export backup. I am trying to import it on newly created database using imp.

But i am not getting how can i select all export.dmp.z* files using imp. Its easy in impdp, but i have exported backup.

View 7 Replies View Related

Load Data Into Various Tables Through Perl Script Using Sql Loader?

Nov 3, 2006

I am trying to load data into various tables through a perl script using sql loader. Log files are created which say rows successfully loaded, but there is no data in the database. is there any way of explicitly saying commit with sql loader command (except for the rows options, Ihave tried using that also, with rows=1, but it doesn't work)?

View 1 Replies View Related

Server Utilities :: Load JPG Picture Into Oracle Database?

Jun 8, 2011

i want to load jpg into my oracle database 10g throw sqlloader

i did folloing steps

step 1)

Create the table as follows

CREATE TABLE image_table (file_id NUMBER(5),
file_name VARCHAR2(30),file_data BLOB);

step 2 )

Create control file as follows

LOAD DATA
INFILE *
INTO TABLE image_table
REPLACE
FIELDS TERMINATED BY ','
(

[code].....

step 3)

Then i have run this command

F:oracleproduct10.2.0db_1in>sqlldr control=F:practicecontrol.ctl
Username:system
Password
so i got this error
SQL*Loader: Release 10.2.0.5.0 - Production on Wed Jun 8 13:47:27 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-404: Column FILE_ID present more than once in IMAGE_TABLE's INTO TABL
E block.

View 4 Replies View Related

Server Utilities :: How To Load Data In Oracle From Microsoft Access Database (MDB) File

Aug 24, 2012

I have one .mdb (Microsoft Access Database) file and it has some tables in it. I had load it once using toad. But now i have to load it frequently into the database. Is it possible using external table, so i can access that tables using "select" statement.

View 6 Replies View Related

Server Utilities :: Loading Multiple Input Files Into Multiple Tables

Jul 9, 2012

NGFID;RECTYPE;RECNAME
25;7;POLES
PARENT
CHILD;1401;9845075;2020
817;8;SUPPORT
PARENT
CHILD

Required output:-

AREA_SRNO = 1
AREA_NAME = '3rivieres.export.ngf'

File :-mauri.export.ngf

NGFID;RECTYPE;RECNAME
257;7;POLES
PARENT
CHILD;1401;9845075;2020
8174;8;SUPPORT
PARENT
CHILD

Required output:-

AREA_SRNO = 2
AREA_NAME = 'mauri.export.ngf'....etc

CREATE TABLE NGF_REC_LINK
(
AREA_SRNO NUMBER(2),
AREA_NAME VARCHAR2(40),
NGFID NUMBER(20),
TABLENAME VARCHAR2(40),
PARENT VARCHAR2(200),
[code].......

find the ctl file (ngf_test.ctl) and modify the ctl file as per my requirement.

View 6 Replies View Related

Export/Import/SQL Loader :: External Tables Loading Multiple Files From Directory One By One

Oct 4, 2013

the following situation, I have a directory named /dat/global/stock/  inside this i will get files named differently for example below.abcdef.112dfgrt.2......

 Here i want to load this file one by one into the external tables and generate one more file based on some enrichment.

Step 1. Have to take first file and to load into the ext table.
Step 2. Enrichment
Step 3.File generation. 

Now here i am facing a problem that in that particular directory i usually get 1000 files so i need to get file one by one and to put in one more directory. how can i get file one by one and generate file by using oracle loader 

View 4 Replies View Related

Server Administration :: Find When Database Role Created And Who Has Created?

Feb 14, 2013

Is there a way to find when was a database role created and who has created?

View 5 Replies View Related

Load Data In Database Using LOADER?

Jun 25, 2008

I have a data file that looks like:

REC001;TO_NAME;TO_ADDR;TO_PHONE
REC002;ITEM_ID1;DATE_DELIVERED1
REC002;ITEM_ID2;DATE_DELIVERED2
REC002;ITEM_ID3;DATE_DELIVERED3
REC002;ITEM_ID4;DATE_DELIVERED4

i want to load this in the Database using SQL LOADER in this format:

NAME | ADDR | PHONE | ITEM | DATE DELIVERED
-------------------------------------------------
TO_NAME TO_ADDR TO_PHONE ITEM_ID1 DATE_DELIVERED1
TO_NAME TO_ADDR TO_PHONE ITEM_ID2 DATE_DELIVERED2
TO_NAME TO_ADDR TO_PHONE ITEM_ID3 DATE_DELIVERED3
TO_NAME TO_ADDR TO_PHONE ITEM_ID4 DATE_DELIVERED4

Basically i want the name, addr, phone from REC001 to be repeated every time i load REC002.

View 1 Replies View Related

Server Utilities :: Exporting Database Schema / Tables Without Data

Sep 22, 2010

I'm trying to export a relatively large database but it's a bit more complicated than that.For one schema I need a full export / import (data included).

For another 10 schemas I need them empty, with the exception of a table in some of them which needs to be exported / imported with all data inside.Is it possible to do this with datapump utility (impdp, expdp)?

Afterwards I will be running some scripts to populate the DB instance with critical data / metadata.

View 1 Replies View Related

Export/Import/SQL Loader :: How To Load DMP File Into Oracle 11gR2 Database Schema

Mar 24, 2013

i have a .dmp file and i want to use the data in this file for my further practices. so, i need to dump the data in the .dmp file to the any schema exists in data base.

View 1 Replies View Related

Export/Import/SQL Loader :: Migrating Data From Solid Database To Oracle - Flat Files

Aug 14, 2012

I am migrating data from a Solid Database to Oracle, I am using Flat Files to do that.

1.- I download the data to flat files from Solid
2.- I move the files to Oracle server
3.- I upload the data to Oracle

Now, I have done the 90% of the data base, but I have found some tables that has description columns and in this description the users writes enters, so when I try to upload the data to Oracle SQL loader cannot recognize this characters.

Example:

'25','0.','5.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''
'26','0.','2.','0.','0.','0.','0.','3.','0.','0.','0.','0.','0.','',''
'27','0.','1.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''
'28','0.','1.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''
'29','0.','38.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''
'30','0.','13.','0.','0.','0.','0.','0.','6.','0.','6.','0.','0.','|SE RECHAZA B20CS50SNW ^M
^M
SE RECHAZAN CINCO PZAS ^M
DOS MOD. HSC15I41EH,DOS MOD. HSK15I41EH |Agregó: 06/06/2009 12:22:50
|','DEV. A PROV.'
'31','0.','50.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''
'32','0.','9.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''
'33','0.','2.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','',''

How can I solve this ?

View 3 Replies View Related

Server Utilities :: Import Schema Into A Newly Created User?

Jun 6, 2012

I need a clarification on the below query:

1) DROP USER MK CASCADE;

2) Created user

3) Created objects like procedure,index... and granted privileges.

4) Now i am performing the import as below.

impdp system/.... SCHEMAS=MK DIRECTORY=EXPBKUP DUMPFILE=ABC_Export.dmp LOGFILE=ABC_imp.log INCLUDE=TABLE TABLE_EXISTS_ACTION=REPLACE

But nothing is imported.

Is this the problem of the parameter "INCLUDE=TABLE TABLE_EXISTS_ACTION=REPLACE"? as the user is new.

View 5 Replies View Related

Server Utilities :: IMP-00041 / Object Created With Compilation Warnings

Sep 1, 2010

Every quarterly, we export the data from DEEXTRA and import into INEXTRA user.This is not working after i made the changes 2 tables and views in DEEXTRA .

I added new columns to 2 tables and associated 2 views. After this change, my import process got failed, with message especially for those views. "IMP-00041: Warning: object created with compilation warnings"

before i change the tables, import process was working fine. My doubt is, views were created in INEXTRA before the tables in import functionality.

I had given the grants similary the other objects. I belive no problems with privilages.

Because of table changes the order of the objects in exporting got disturbed? like in the exporting functionality first views created then the table?or the order of the objects in importing got disturbed? like first views created and then tables?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved