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


ADVERTISEMENT

Export/Import/SQL Loader :: Setting For External Table - Create File In Directory DIR-1?

Nov 20, 2012

Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

I am new in external table so i have tried following cmd.

create directory dir_1 as 'E:ora_dirt' ;
grant read, write on directory dir_1 to HR;
select * from all_directories;
create table emp_ext
(emp_id number,
emp_name varchar2(30)

[code]...

since I am not able to see DIR_1 in E: drive due to which i havnt created  'emp.dat' file and on executing select on external table i m geting expected error *"ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04043: table column not found in external source: EMP_ID"*

how to create that file in directory "DIR_1" .

View 2 Replies View Related

Export/Import/SQL Loader :: IMP With Multiple Dump Files And Remap_tablespace

Jan 17, 2013

I have 3 dump files: A.dmp, B.dmp, C.dmp . Can I use multiple REMAP_TABLESPACE entries in a par file to remap the table spaces for the above dump file?

Parfile would look something like this:

DIRECTORY=dpump
DUMPFILE=A.dmp,B.dmp,C.dmp
JOB_NAME=import_3_schemas
REMAP_TABLESPACE=A1:D1
REMAP_TABLESPACE=B1:E1
REMAP_TABLESPACE=C1:F1

The first remap entry is only relevant to A.dmp file
The second remap entry is only relevant to B.dmp file
etc.

View 2 Replies View Related

Export/Import/SQL Loader :: Expdp / Query Option For Exporting From Multiple Tables With Same Condition?

Sep 3, 2012

export a subset of the data only from one database to another. Both on AIX.

Source/testdatabase 11.2.0.3 (non-partitioned tables)
Target productiion database 11.2.0.3 (partioned tables)

Tables same column names but diffrenet index structures and traget one to be partitioned hence only want to import the content Each table on source datbaase hascolumn seq number and only want to extract the last few months of data.

TABLES:table1,table2...
DUMPFILE=dump_dir
CONTENT=data_only
QUERY= table1:"WHERE seq_num >100 "want to use expdp but not sure about how to ensure all tables have the WHERE seq_num >100 condition, if leave table1: out and just have
QUERY= "WHERE seq_num >100 " will this condition be applied to all tables which is what we want.

I'm assuming also can use impdp CONTENT=data_only?

View 3 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 :: 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 :: Loading Data From CSV File To Table

Aug 22, 2012

I am loading data from a .csv file to table. I tried to load by using EXTERNAL TABLES

Is there a way to specify null in external tables loaded if specific column has no data in the external file(CSV) being loaded ?

View 3 Replies View Related

Export/Import/SQL Loader :: Sqlldr Options For Loading Clob Fields

Apr 8, 2013

we have table with 4 clob fields in it.to load text file of 4GB into the table it is taking around 2 hours. volumetric of that file is 40 Million. we are using direct=Y in sqlldr. but because of this clob fields we didn't got any performance improvement.

View 1 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

Export/Import/SQL Loader :: Expdp To Export Multiple Schemas

Aug 2, 2012

I have a question related to Oracle Data Pump.

So, I want to export two schemas from database with condition:

1. I want to export scheme_1 with all metadata objects + data.
2. I want to export scheme_2 with only metadata objects.

Oracle version is Oracle EE 10.2.0.4.0, OS - Microsoft Server 2003R2.

As far as I know I can not use parameter EXCLUDE like:

EXCLUDE =TABLES:" IN ('SCHEMA_NAME.TABLE')"

(-but this parameter will give me no tables at all) or I can not use CONTENT=SCHEMA_NAME.METADATA_ONLY, maybe I can use QUERY=where table in (select tablename where schema is .... - but I have tables with same name in both schemas).

View 7 Replies View Related

Export/Import/SQL Loader :: How To Import Indexes Separately / Skipping Tables And Other Objects

Jul 9, 2013

aix 6.111.2.0.3 I have an expdp dump from prod  to be imported to our test database.I have imported it using impdp, but to my surprise the tables were imported but  lots of indexes were not created? even If I have used TRANSFORM=SEGMENT_ATTRIBUTES:N just to use the default USERS tablespace. How do I import the indexes separately, skipping the tables and other objects?

View 14 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 :: Multiple Export / Import Dump Files?

Apr 25, 2011

I am trying to export/import of a schema who's size is around 60 GB.

Export parfile goes like this..
file=expdmp1.dmp, expdmp2.dmp, expdmp3.dmp, expdmp4.dmp, expdmp5.dmp, expdmp6.dmp, expdmp7.dmp
filesize=10240M
log=explog.log
owner=owner1

Import parfile goes like this..

file=impdmp1.dmp, impdmp2.dmp, impdmp3.dmp, impdmp4.dmp, impdmp5.dmp, impdmp6.dmp, impdmp7.dmp
filesize=10240M
log=implog.log
fromuser=owner1
touser=owner2
ignore=y

I am going to run this on production. So want to check it..

View 2 Replies View Related

Export/Import/SQL Loader :: How To Exclude All Tables Of A Certain Type

Aug 15, 2013

How can I exclude during the import (with impdp) all tables of a certain type, es. statistics?I tried with .... STATISTICS=NONE, but this command seem ignored during the import,

View 6 Replies View Related

Export/Import/SQL Loader :: IMPDP Into Schema With Truncated Tables

Aug 2, 2012

I've got a schema that I've truncated all tables. I have a full schema export I took awhile back, and I'm wanting to import this into the schema to basically 'reset' it.

First time run, I got the :

ORA-39151: Table "xyz.tablename" exists. All dependent metadata and data will be skipped due to table_exists_action of skip

I've been reading through, and see suggestions to add to the par file:

CONTENT=DATA_ONLY TABLE_EXISTS_ACTION=APPEND

And I've seen others use the option for:

table_exists_action=replace

I basically want to put the data back into the tables, and have the indexes rebuilt.....

View 1 Replies View Related

Export/Import/SQL Loader :: How To Skip Database JOBS During Export And Import

Aug 7, 2012

1) Is there a way to skip database jobs while exporting (EXPDP) ?

2) Is there a way to skip database jobs while importing (IMPDP) ?

View 3 Replies View Related

Export/Import/SQL Loader :: Why Do Export-import Require Temporary Tablespace

Aug 9, 2012

Why do export-import require temporary tablespace? Since export-import do behave like DMLs, when does temporary tablespace be needed by datapump utility?

View 2 Replies View Related

Client Tools :: OWB File Loading Through External Tables

Mar 15, 2011

Is it possible to trim the file name while loading into OWB through external tables?

Like suppose I am trying to read a file which has a timestamp value appended in its name. In that case loading into external file would give an error.

View 3 Replies View Related

SQL & PL/SQL :: Can't Delete Files That Were Used On External Tables

May 11, 2011

I'm not sure if this should go on this topic.

Anyway, I've loaded 5 .csv files through an external table and after doing it I tried to delete them.

But this error comes "Cannot delete 'filename': It is being used by another person or program".

I closed Oracle Developer and tried again deleting them manually, and the result was the same.

Tried restarting and deleting one .csv and it worked, but when I open sql dev and tried deleting the other files couldn't do it.

The question is: files that were used on external tables can't be deleted if developer is working?

The thing is that I've created a Stored Procedure that delete the files and obviously can't work. So, I should delete every time I load a csv file after restarting the computer.

View 6 Replies View Related

Export/Import/SQL Loader :: How To Map One Field To Another In Control File Via SQL Loader

Mar 18, 2013

I have a flat file (student.dat delimiter %~| ) using control file (student.ctl) through sql loader. Here are the details.

student.dat

student_id, student_firstname, gender, student_lastName, student_newId
101%~|abc%~|F %~|xyz%~|110%~|

Corresponding table
Student (
Student_ID,
Student_FN,
Gender,
Student_LN
)

How do i map student_newId field to student_id field in STUDENT DB table so that new id should be inserted in student_id column. How do i specify the mapping in control file. I dont want to create a new column in student table. In control file i will specify the below, Is this a best approach?. Do we have any othe way?

STUDENT_ID *(:STUDENT_NEWID)*,
STUDENT_FN,
GENDER,
STUDENT_LNAME,
STUDENT_NEWID BOUNDFILLER

View 1 Replies View Related

SQL & PL/SQL :: External Tables (Oracle Loader)?

Jan 22, 2013

i am trying to create a external table.Table is getting created but there is no data.While checking the log file, its saying

KUP-04021: field formatting error for field CUST_CODE
KUP-04026: field too long for datatype
KUP-04101: record 1 rejected in file /data/mmi_mig_data/PCOM_CUSTOMER_1.csv
KUP-04021: field formatting error for field CUST_CODE
KUP-04026: field too long for datatype
KUP-04101: record 2 rejected in file /data/mmi_mig_data/PCOM_CUSTOMER_1.csv

But according to me in CSV file everything looks to be okay.External Table:

CREATE TABLE ET_PCOM_CUSTOMER(CUST_CODE VARCHAR2(12), CUST_TITLE VARCHAR2(12),
CUST_NAME VARCHAR2(240), CUST_MIDDLE_NAME VARCHAR2(240),
CUST_FIRST_NAME VARCHAR2(240), CUST_LAST_NAME VARCHAR2(240),
CUST_GENDER VARCHAR2(12), CUST_MARITAL_STS VARCHAR2(12),
CUST_NIC_NO VARCHAR2(60), CUST_ADDR_01 VARCHAR2(240),

[code]...

View 3 Replies View Related

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 )
);
/

CREATE OR REPLACE TYPE OB_TEST_INFO_VARRAY AS VARRAY( 400 ) OF OB_TEST_INFO ;
/

CREATE OR REPLACE TYPE OB_TEST_MAINTENANCE AS OBJECT (
BREAKOUT_TYPE NUMBER ( 1 ),
EXISTING_STRIPS_FLAG NUMBER ( 1 ),
OB_TEST_INFO OB_TEST_INFO_VARRAY
);
/

[Code]....

View 12 Replies View Related

Export/Import/SQL Loader :: Table Import Takes Long Time And Still Running?

Jun 22, 2012

MY DB Version: 10.2.o

OS: Windows Server 2003

I am trying to import on table which i have the export dump file which i take using expdp previously when i load that table on the same host

by using below command:

expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

after that i zip that dump and move it to external usb and now i need that table i copy that table and unzip that that dump

Command i am using to do the import is :

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log

But the query of import is still runing even not showing any amount of rows to be imported.

i already make the tablespace in which the table was previosuly before dropping but when i check the sapce of tablespace that is also not consuming one error i got preiviously while performing this task is:

Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "CDR"."SYS_IMPORT_TABLE_03" successfully loaded/unloaded
Starting "CDR"."SYS_IMPORT_TABLE_03":  cdr/********@tsiindia directory=TEST_DIR dumpfile=CAT_IN_DATA_042012.DMP tables=CAT_IN_DATA_042012 logfile=impdpCAT_IN_DATA_042012.log

[code]....

i check streams_pool_size it will show zero and then i make it to 48M and after that

SQL> show parameter streams_pool_size;
NAME                                 TYPE        VALUE
-----------
streams_pool_size                    big integer 48M

But still it takes time

View 13 Replies View Related

Export/Import/SQL Loader :: Import Scott To Scott1 Without Affecting Existing Records

Sep 29, 2012

My database version
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - ProductionOS version:

Windows 7 64bit I have schema(scott) export with schema level option and imported with different name as (scott1).At regular period of time i need to import the scott to scott1 without affecting existing records.such as
*1. Need to append new created records.*
*2. Need to append updated records.*

for the above requirement I did in the following way
expdp xxxx/******** schemas=SCOTT directory=dumpdir dumpfile=SCOTT_28-SEP-2012.dmp logfile=exp_SCOTT_28-SEP-2012.log imported in the following way impdp xxxx/******** AS SYSDBA REMAP_SCHEMA=SCOTT:SCOTT1 directory=DUMPDIR dumpfile=SCOTT_28-SEP-2012.dmp logfile=imp_SCOTT2_28-09-2012.log TRANSFORM=SEGMENT_ATTRIBUTES:n TABLE_EXISTS_ACTION=APPEND.

The problem is i couldn'table to append the records to existing tables the log error show such ways.

ORA-31684: Object type USER:"SCOTT1" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
[code].....

View 5 Replies View Related

Export/Import/SQL Loader :: Error / Unable To Create Metadata And Import Fails

May 10, 2013

I am trying to run impdp over network to import tables only but i am getting an error saying not able to create metadata and the import fails

Here are the steps below,

1. Source database created a user and granted select on certain tables to the user.

2. Created a user in the Target database.

3. Created a public link as sys user in the target database.

4. granted imp and exp full database to both users and all the other privs.

5. Started the impdp from the target server.

The import fails with

$impdp abc/xyz directory=DATA_PUMP_DIR network_link=TESTAR logfile=net_import_proddev.log TABLES=impdb.abc parallel=12 REMAP_SCHEMA=IMPDB:ABC

Import: Release 11.2.0.3.0 - Production on Tue Apr 23 13:10:51 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "IMPDB"."SYS_IMPORT_TABLE_01": abc/******** directory=DATA_PUMP_DIR network_link=TESTAR logfile=net_import_proddev.log TABLES=impdb.abc parallel=12 REMAP_SCHEMA=IMPDB:ABC

[code]....

View 14 Replies View Related

Export/Import/SQL Loader :: How To Import Data From Excel File To Table Through Procedure

Jul 2, 2012

How to import data from excel(.xls) file to data base table

I have excel sheet(.xls) data details, I neet to upload details to data base table using procedure

excel sheet is not CSV file, so SQL Loader is not using

any alternative solution for this issue

View 3 Replies View Related

Export/Import/SQL Loader :: Expdp Command To Export Table By Specifying Query Parameter

Aug 16, 2013

I am using expdp command to export the table by specifying Query parameter. But i am unable to export the table based on the condition. 

Ex:EXPDP username/password dumpfile=employee.dmp logfile=emp.log directory=DATADIR_EXP TABLES=EMPLOYEE query=EMPLOYEE:"UPDATED_TIME >= '04-JUN-13' AND UPDATED_TIME >= '05-AUG-13'" Estimate in progress using BLOCKS method...Processing object type TABLE_ EXPORT/ TABLE/ TABLE_ DATATotal estimation using BLOCKS method: 3 GBORA-31693: Table data object "<username>"."EMPLOYEE" failed to load/unload and is being skipped due to error:ORA-00933: SQL command not properly endedMaster table "<username>"."EMPLOYEE" successfully loaded/unloaded...Dump file set for <username>.SYS_EXPORT_TABLE_01 is:  E:IMPDPemployee.dmpJob "<username>"."SYS_EXPORT_TABLE_01" completed with 1 error(s) at 12:34:45  Oracle 11g,

View 6 Replies View Related

Export/Import/SQL Loader :: Selective Export Failing - Solaris Sparc - Oracle 10g

May 11, 2013

I am trying to export selective data from one of my prod database tables. But not succeeding. I was keep on trying for the past 2 hours.

OS : SOLARIS SPARC
ORACLE - 10G
Query --> WHERE E3RECV_DT LIKE '201305%' (I need to export this query data)

Below Script i am using
===============
exp E3USER@SGEBAPU2 statistics=none consistent=n buffer=100000000 file=exp_pipe_file TABLES=IFDATA query="WHERE E3RECV_DT LIKE '201305\%'" log=PGTB_IFDATA_conditional.log

View 1 Replies View Related

Export/Import/SQL Loader :: Oracle Traditional Import Overrides Password?

Nov 23, 2012

I had just successfully finished a full importing from Oracle 9i DB to Oracle 11gR2 DB. My export was a full db export.

Prior to this importing, my 11g was a newly created DB with the default SYS, System etc.. schema. Their passwords is different from those in 9i.

However, i realised that after importing... their passwords in 11g was replaced by those passwords in 9i, including SYS and SYSTEM user...

View 5 Replies View Related

Export/Import/SQL Loader :: How To Filter Some Illegal Rows When Import Data

May 24, 2013

I want to import data in a csv file by SQL Loader.

but , I don't want to import some illegal rows when the column 'name' is null

how can I modify the SQL Loader ctrl file?

View 1 Replies View Related







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