Can Get Name Of File Loading Table In Control File

Feb 21, 2011

is there any way you can get the name of the file loading the table in a control file? i have a table with a column called source_file, and need to populate it during the load.

View 1 Replies


ADVERTISEMENT

SQL & PL/SQL :: Loading Complete XML File Into Oracle Table

Mar 19, 2012

I am loading data from XML file into Oracle table.This program is working fine for small XML files. If I try to load large XML file with multiple pages, only first ten records are loaded. Here is the procedure.

PROCEDURE Test_xml_read(p_tag varchar2,p_xml_file varchar2,p_path varchar2)
AS
BEGIN
INSERT INTO stg_xml_table(
Productid,productname,price)
select y1.productid,y1.productname,y1.price
y2.categoryid,y2.categoryname,y2.categorypath
FROM xmltable('ProductFeed/Products/Product'
passing xmltype(bfilename('TEST_DIR1', 'sample.xml' ), nls_charset_id('CHAR_CS'))
[code]...

what changes to be done to load multiple pages of data pages table.

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

SQL & PL/SQL :: Combining Rows In Data File Based On Values In Control File?

Aug 29, 2013

I have to load data file into a table. And the requirement is as below:

Input Data:

1234|20130815|20130822|This is a test, this is the the part
3456|20130823|20130809|This is a test
3456|20130823|20130809|This is a test
3456|20130823|20130809|This is a test
3456|20130823|20130809|Siva 1234

The data should be inserted only in two rows as below:

When Value in first 3 fields is same, 4th field should be appended to the existing value in table.

1234|20130815|20130822|This is a test, this is the the part
3456|20130823|20130809|This is a testThis is a testThis is a testSiva 1234

View 3 Replies View Related

PL/SQL :: Data File Which Starts With T As Trailer To Be Skipped While Loading Into Table Using SQL LOADER?

Sep 11, 2012

I have following in the data file

572ACTS ERD LLC SUE CCCC
T R 1010

I want to skip the last line of the data file which starts with 'T' as trailer to be skipped while loading into table using SQL LOADER?

View 2 Replies View Related

Server Utilities :: Control File To Update Multiple Rows In Database Table?

Dec 22, 2010

The following control file updates multiple rows in database table.

LOAD DATA
INFILE *
replace
INTO TABLE temp_tab
FIELDS TERMINATED BY ","
(Data LOBFILE(CONSTANT cadd_pass.xml) terminated by eof

There are 21 lines in the xml. So 21 rows are updated in table.update only one row?

View 9 Replies View Related

Server Utilities :: Control File - Insert Rows Into Table By Defaulting Date?

Jan 15, 2013

My Table structure

column1 varchar(10)
column2 Date
Column3 varcahr(2)
Column4 varcahr(2)

By Data file

asds 12/12/2001asas
textsd asds
asds 12/12/2001asas
ramkiy asds

I still want to insert row 2 and row 4 into table by defaulting the date. how can I handle this in control file?

View 14 Replies View Related

Server Utilities :: How To Write Control File To Load Data Into Revenue Table

Aug 16, 2011

I have a table revenue

create table revenue
(
person varchar2(23),
month varchar2(3),
rev_amt number
)

and i have data in a file like below

Person Jan Feb Mar Apr Mai Jun Jul Aug Sep Oct Nov Dez
--------------------------------------------------------
Schnyder,345,223,122,345,324,244,123,123,345,121,345,197
Weber,234,234,123,457,456,287,234,123,678,656,341,567
Keller,596,276,347,134,743,545,216,456,124,753,346,456
Meyer,987,345,645,567,834,567,789,234,678,973,456,125
Holzer,509,154,876,347,146,788,174,986,568,246,324,987
Müller,456,125,678,235,878,237,567,237,788,237,324,778
Binggeli,487,347,458,347,235,864,689,235,764,964,624,347
Stoller,596,237,976,876,346,567,126,879,125,568,124,753
Marty,094,234,235,763,054,567,237,457,325,753,577,346
Studer,784,567,235,753,124,575,864,235,753,864,634,678

i want to load it into the table in the following way.

Person Month Revenue
-------------------------
Schnyder Jan 345
Schnyder Feb 223
Schnyder Mar 122
Schnyder Apr 345
Schnyder Mai 324
Schnyder Jun 244
Schnyder Jul 123
Schnyder Aug 123
Schnyder Sep 345
Schnyder Oct 121
Schnyder Nov 345
Schnyder Dez 197
........ ... ...
How to write control file to load this data into the above revenue table.

View 2 Replies View Related

SQL & PL/SQL :: Loading XML File Into Clob Data Type

Apr 12, 2012

Iam using Oracle client 11g(32 bit) and Oracle database 11g on Unix server.

I have the created the following procedure to load XML file located in TEST_XML oracle directory( which is mapped to

DB/bulk01/REFLIB/REFDV/LOAD_XML) on the server.

Create or replace procedure TEST_LOAD_XML IS

dest_clob clob;
src_clob BFILE := BFILENAME('TEST_XML', 'arenas.xml');
dst_offset NUMBER := 1;
src_offset NUMBER := 1;
lang_ctx number := DBMS_LOB.DEFAULT_LANG_CTX;
warning NUMBER;

[Code]....

when I execute the above procedure I get ORA-22288 file or LOB operation FILEOPEN failed No such file or directory error.

Looks like it did not find my oracle directory 'TEST_XML'

do I have to do anything like mapping? if so since my database is on unix server how do I map?

View 4 Replies View Related

SQL & PL/SQL :: Loading Unique Text File Names With Utl_file

Oct 9, 2012

I am using an Oracle 8i database.We intend creating a dbms_job that would run every 5 minutes. The job executes a script that would use utl_file to read two text files (a header file and detail file) from a particular directory and load the data into temporary tables. The naming convention of the files are Parts_Master_DD/MM/YY HH:MI:SS and Parts_Stats_DD/MM/YY HH:MI:SS. Both files to be stored in the same directory.

If the file name was constant ie. Parts_Master, Parts_Stats I would not have a problem. However with each file name now going to be unique, how do I handle this using utl_file. To add to my dilemma, within an hour more than one set of files could be piped to the directory to be read into the database.

View 3 Replies View Related

JDeveloper, Java & XML :: Loading And Processing XML File At Run Time

Jul 16, 2011

if there is any package provided with DB that would allow me to import XML file and then use XPath to read the data? I need to insert it in proper tables then. I could see packages to create XML files, but I could not see any one to load it from the file. I could see it could be done in Java using XMLDOM, but is there any way of doing this using pure PL/SQL?

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

Getting Error While Loading Excel File Into Oracle Database

Dec 30, 2010

I am loading a Excel file into oracle database using a ORACLE form 6i and i am getting an ORA-302000. This Form run and load database file into database in many pc.

But One of the PC COuld not loading a Excel file into oracle database. Also i can't Create Excel file Database Through form 6i.

View 1 Replies View Related

Forms :: Loading A Text File Into Oracle Database / ORA-302000

Mar 2, 2004

I am loading a text file into oracle database using a form and am getting an ORA-302000.

How do I rectify it?

View 5 Replies View Related

Precompilers, OCI & OCCI :: Data Loading Of French Input File

Aug 16, 2012

I am trying to load a input flat file (french data in it) into the database using pro*c (not using sql loader because of some validations ). i am reading the line by line and populating it into the structure and then process it.

The input file is encoded in WE8ISO8895P1 , I want the records to be populated into a table. so i did set NLS_LANG=French_France.WE8ISO8895P1 and ran the pro*c program . i used character host variable in the insert query , i used data from the earlier read structure and set these character host variable.

The problem i am facing is , when i am printing the values before insert i could see correct data.

For example the printed data of variable is "pas de donné " and strlen is 14. the target table field is of varchar type
( name varchar(20 char) )

but after i insert i could see only the truncated value in the database i.e "pas de donn" in the table length is 11.

View 17 Replies View Related

Recover Control File

Jul 24, 2011

In my system all my control files get corrupted.

FYI,I have taken control file backup and DB backup also 6 hour before the control file get corrupted,then there are quite lot of DB structure change, so Now how to recover my control file with the upto time DB state , since the backup was taken for control file 6 hour before the file get corrupted, now how do I revery the DB/control file, step by step with syntax as well.

View 1 Replies View Related

All Control File Lost?

Oct 12, 2012

I know this question must have been asked several time. I just want to know the many ways in which we can have a DB up and running even if we do not have any backup of control file not even the trace of the same.

View 6 Replies View Related

PL/SQL :: Append In Control File

Feb 14, 2013

I am just looking to my control file that I have. I have managed to successfully get my control file to load data into the required tables but just for my learning I was trying to amend the when clause with an and condition but keep getting an error.

My code:
OPTIONS (DIRECT=TRUE, ERRORS=0, SKIP=1)
load data
infile 'A:/My Files/Feeds/20130211/data_summary_1_20131214.txt' "STR '
'"

APPEND
into table I_DATA_1
WHEN (RID <> 'RID')
fields terminated by "~|~" optionally enclosed by '"'
TRAILING NULLCOLS
(
 RID,
S_TIMESTAMP   timestamp 'DD-MON-RR HH:MI:SS.FF3 PM'
)

the above code works perfectly but if i change the following line:

WHEN (RID <> 'RID' AND 'S_TIMESTAMP' IS NOT NULL)than this gives me an error.

View 4 Replies View Related

Getting Error When Try To Load The Control File

Mar 12, 2012

I am receiving errors when trying to load the control file. The errors are as follows:

SQL*Loader-500 Unable to open file (homework.ctl)
SQL*Loader-553 file not found
SQL*Loader-559 SYstem error: The system cannot find the file specified.

My control file is located directly in the C drive (C:\homework.ctl). The control file contains the following

LOAD DATA INFILE 'c:\country.dat'
APPEND INTO TABLE homework
fields terminated by ',' optionally encloded by '"'
(country, month, day)
WHEN (month='April')

On the command line, I am entering:

sqlldr system/password control=homework.ctl

View 1 Replies View Related

DECIMAL EXTERNAL In Control File?

Sep 13, 2010

In a control file, the code is as follows:

load data
infile 'C:\Documents and Settings\xxxxx\Desktop\abc.txt'
APPEND
PRESERVE BLANKS
INTO TABLE table1

[code]...

When I run the above control file in sqlldr, I'm getting the error as
Record 1: Rejected - Error on table table1, column column3.
ORA-01481: invalid number format model

In the table the column3 data type is NUMBER(6,2).: The column size in table is 6 and position of column3 in control file is only 4. Also if possible let me know how the same data (send me 2 dummy records) which exactly works for the above control file especially for column3 where decimal number comes in the flat file.

For generating the flat file, for column3, i'm using LPAD(:value,4,0) in the select query column list.

View 1 Replies View Related

How To Add Another Control File To DBOG Database

Apr 1, 2011

How can we add another control file to DBOG database? I need to clarify all the steps during this process.

View 7 Replies View Related

Error In Create Control File

Apr 8, 2012

By mistakenly Oradata file has been deleted and there is I have not any backup when we Startup the database then we get an Error as

ORA-00205: error in identifying control file, check alert log for more info

Now I want to create controlfile as

Microsoft Windows [Version 6.1.7600]
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\SARASWATIMAA>SQLPLUS
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 8 23:15:09 2012
Copyright © 1982, 2005, Oracle. All rights reserved.
Enter user-name: SYS AS SYSDBA
Enter password:
[code]...

where is My Mistake in Creating Cotrolfile..I want to know that in which condition we use "SET" or "REUSE" in Create Controlfile.

View 3 Replies View Related

Restore Backup Without Control File

Sep 11, 2011

I have a problem with my control file [URL].........

What I did, I have a duplicate of the database with the invalid control file, let's call it DUMDB. I am using my control file and no recovery-catalog-db.

I recreated the control file. Now everything is working fine, new backups can be taken, restores can be made. I just need to restore a backup tagged with "LASTDEV". The control file for this backup is the invalid one. So I need a restore WITHOUT restoring the control file.

I did:

CODERMAN> catalog backuppiece '/u03/flash_recovery_area/DUMDB/backupset/o1_mf_nnndf_LASTDEV_75fmkllw_.bkp';
cataloged backup piece
backup piece handle=/u03/flash_recovery_area/DUMDB/backupset/o1_mf_nnndf_LASTDEV_75fmkllw_.bkp RECID=1 STAMP=761604017
CODERMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    2.77G      DISK        00:00:00     26-AUG-11
        BP Key: 1   Status: AVAILABLE  Compressed: YES  Tag: LASTDEV
        Piece Name: /u03/flash_recovery_area/DUMDB/backupset/o1_mf_nnndf_LASTDEV_75fmkllw_.bkp

  List of Datafiles in backup set 1
===========================
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 63166185   26-AUG-11 /u02/oradata/dumdb/system01.dbf
  2       Full 63166185   26-AUG-11 /u02/oradata/dumdb/sysaux01.dbf
  3       Full 63166185   26-AUG-11 /u02/oradata/dumdb/undotbs01.dbf
  5       Full 63166185   26-AUG-11 /u02/oradata/dumdb/stdtbs01.dbf
  6       Full 63166185   26-AUG-11 /u02/oradata/dumdb/users.dbf

CODERMAN> crosscheck backupset 1;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/flash_recovery_area/DUMDB/backupset/o1_mf_nnndf_LASTDEV_75fmkllw_.bkp RECID=1 STAMP=761603187
Crosschecked 1 objects

CODERMAN> RESTORE DATABASE FROM TAG='LASTDEV';

Starting restore at 11-SEP-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=130 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/11/2011 20:32:25
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

This is exactly the same message if you do "RESTORE DATABASE FROM TAG='NONEXISTENTDUMMYTAGXXXX'"
Why can the data files not be found even if they are listed in the backup?

I am on 11.2.0.2.0 on Linux64.

View 1 Replies View Related

Simulating Control File Damage

Feb 16, 2012

I am trying to simulate a damage in my control files

$ORACLE_BASE/oradata/orcl/control01.ctl and $ORACLE_BASE/flash_recovery_area/orcl/control02.ctl

So I moved these files to another folder different of origin with the database online (in linux, I tried to do it in win7, but not works)!

And for my surprise the DML and DDL commands still working! The Oracle docs said:

QUOTE If any of the control files become unavailable during database operation, the instance becomes inoperable and should be aborted.

[URL] ....

What " the instance becomes inoperable" in Oracle Docs means?

View 2 Replies View Related

How To Control File Parallel Write

Mar 2, 2011

We have a database that is accessed by ArcSDE, a product to modify maps. It uses BLOBs to store those maps.

We ran a load on the server and the response time was slow. By running the following query:

select event, total_waits, time_waited, avg_ms, round(ratio_to_report(time_waited) over () * 100) percent
from (select substr(event, 1, 30) event, total_waits, time_waited, round(time_waited_micro / total_waits / 1000, 2) avg_ms
from v$system_event
where wait_class in ('System I/O') union
select 'CPU' event, NULL, value, NULL
from v$sysstat
where statistic# = 12
order by 3 desc)
where rownum <= 10;

I get

EVENT TOTAL_WAITS TIME_WAITED AVG_MS PERCENT
--------------------------- -------------- ------------- -------- ---------
control file parallel write 127187 6354909 499.65 70
CPU 988274 11
db file parallel write 20461 886442 433.23 10
log file parallel write 14987 870672 580.95 10
log archive I/O 1557 18094 116.21 0
control file single write 149 10590 710.71 0
control file sequential read 136502 5219 .38 0
log file single write 56 2511 448.41 0
log file sequential read 489 492 10.05 0

BUG: 733426 says to change the event="10359 trace name context forever, level 1"

View 2 Replies View Related

Creation Control File Failed?

Nov 30, 2004

I am cloning a database from a cold backup in archivelog mode using the control file script but failes:

STARTUP NOMOUNT
CREATE CONTROLFILE DATABASE PROD NORESETLOGS ARCHIVELOG
:
:
:
ALTER DATABASE OPEN;
ALTER TABLESPACE TEMP ADD TEMPFILE 'C:\ORADATA\PROD\TEMP01.DBF'

[code]...

Tried again with RESETLOGS:

STARTUP NOMOUNT
CREATE CONTROLFILE DATABASE PROD RESETLOGS ARCHIVELOG
:

ALTER DATABASE OPEN RESETLOGS
*
ERROR at line 1:
ORA-00344: unable to re-create online log 'D:\ORADATA\PROD\REDO01B.ORA'
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.

View 3 Replies View Related

Restoring Control File When Using A Recovery Catalog

Aug 29, 2010

I want to use rman to restore all my control files, I just did a level 0 incremental backup and ran the following script.

rman <<EOF
connect target sys/sys@GOLD_AUX
connect catalog rman/rman@GOLD_CAT
RUN
{
STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
ALTER DATABASE OPEN RESETLOGS;
}
EOF

My control files seem to be put back in the correct spot and suggest a way I can restore only my control files and have everything in sync with my datafiles.

end of out from rman script
====================

channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
output filename=/oracle/data/aux/control01.ctl
output filename=/oracle/data/aux/control02.ctl
output filename=/oracle/data/aux/control03.ctl
Finished restore at 29-AUG-10
[code]...

View 6 Replies View Related

Restore Control File To Connect With Oracle

May 13, 2011

I deleted the control file using $rm control01.ctl. But i perform the back up

rman> backup incremental level 0 database;

i have no any backup

so how can i recover the my lost control file to connect with oracle instance.

View 1 Replies View Related

Server Utilities :: Where Clause In Control File

Oct 18, 2010

Is it possible to use where clause to discard one of the item which is not able to fit into column because of the length constraint.

Example:
1.Remove first digit from the item_ID where ITEM_ID IN (12345)
2.Do not load data WHERE ITEM_ID IN (12345)

View 7 Replies View Related

Server Administration :: Create A New Control File?

Jul 12, 2012

I am trying to create a new controlfile. I used "alter database backup controlfile to trace;" and then I copied and pasted the contents of the trace file into the .sql file. My sql script is

CREATE CONTROLFILE SET DATABASE "FIVESTAR" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292

[code]....

Actually, the name of my database was 'STAR' and I changed it to "FIVESTAR" int this .sql script. Now when I run this script with SQL> @ <path of my sql script>, it gives me the following errors:

ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'FIVESTAR' does not match parameter db_name 'STAR'

View 2 Replies View Related







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