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


ADVERTISEMENT

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

Application Express :: Report With Links To External Source Files

Mar 25, 2013

Application which I`m creating would work only inside domain. In the report I would like to have a link to files that stored outside from oracle server ( so apex cannot see the file but knows the absolute path to the file ).

And when I click in the report on the link to the file I would like to have this file opened in the application controlled from my OS ( naturally if I have rights to the path specified given from domain level).

I have been trying with column link ( a href, file:// ) and none of them works. I want to avoid APEX from copying files to local path or opening using java or creating directory.

View 2 Replies View Related

SQL & PL/SQL :: UNC In External Tables?

Aug 10, 2011

I made a directory and a external table, pointing to a file in the created directory. It appears that using unc path in my directory, won't work with my external table. Although the unc path points to the same server as where the database server is located.Is my assumption correct?

create or replace directory DIVA_POK as '\tvm011gm_diva_dir$ronnendbga_pok'

create table KOT_AOT(
AOT_IDENTIFICERENDE_SLEUTELvarchar2(14),
AOT_BEGINDATUMGELDIGHEIDdate,
AOT_EINDDATUMGELDIGHEIDdate,

[code]...

View 5 Replies View Related

SQL & PL/SQL :: Looping External Tables?

Jul 31, 2012

I am using an external table with numbers and joining the external table to fetch data and Insert into another table.I am altering the table within procedure to pass csv file name as parameter as It'll change each time. It's working fine but in case if my grouping id is having two gids, then Header from csv file is also inserted as row in to coupon_personlization_members.

I gave skip 1 in external table but for second GID, header is inserted as row.I don't want header to be inserted as row but header will be there on csv file.

Here is my procedure :
CREATE OR REPLACE
PROCEDURE proc_coupon_load(
p_grouping_id NUMBER,
p_file_name VARCHAR2)

[code]..

View 4 Replies View Related

SQL & PL/SQL :: Creating External Tables

Jan 26, 2011

I have created a softlink to a data file orig_file.dat using the command ln -s orig_file.dat orig_file_link.dat

Now is it possible to create an external table using this linked file orig_file_link.dat

I am using this linked file to minimise the space usage because every month we get different data files and external table creation is done as a batch job copying the data file to another file whenever a new data file arrives. External table is created with the new file. so i need to check whether it is possible with the linked file instead of copying the file.

View 6 Replies View Related

Delete Files With Extension Arc

Sep 15, 2010

I can delete the old archives with extension arc. Today, when I consult V$RECOVERY_FILE_DEST, there are files with today date. Can I delete these files, without danger the database?

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

Forms :: How To Use External Tables In Oracle 10g

Jun 6, 2011

How i use external tables as a form datablock in oracle oracle forms 10g an i use anyway external tables in a form datablock ?

View 3 Replies View Related

SQL & PL/SQL :: How To Enable NOLOGGING In External Tables

Jun 16, 2011

How can I enable NOLOGGING in an External Table ?

My Table FT_PRICE_COST_MASTER is taking a long time(more than 1 hour) to excute inside the procedure. The statement is:

SELECT SUBSTR(m.sr_no,1,16) SR_NO, m.SKU_CODE, m.location_code, m.start_date, m.end_date, m.COST, m.tax, m.octroi, m.freight, m.cash_disc, m.scheme_disc, m.mrp, m.csp, m.rsp1_qty, m.rsp1_value, m.rsp2_qty, m.rsp2_value, m.rsp3_qty, m.rsp3_value, m.net_cost, m.final_cost, m.current_margin, m.pc_effect, m.created_by, m.creation_date, m.modified_by, m.modification_date, m.change_ind, m.tax_code,
[code]......

When I am recreating the External table with NOLOGGING keyword at the bottom of the synatx, it's showing "operation not supported". Else are there any other points that I should look to increase the execution time of the above statement ?

View 2 Replies View Related

Windows :: Delete Corrupted Files In Win 7?

Mar 12, 2012

I was having troubles with deleting some files and folders in windows 7, I used a software called SPAM. It works fine. Do I have any other options to do that thing? Or is it ok to be with SPAM? This tool has more options too.

View -1 Replies View Related

Delete Archive Log Files Using RMAN

Jul 26, 2013

I am trying to remove archive log file on my standby site but I am getting the following message. There are lots of archive logs are present on the storage but rman is unable to displaying that.

RMAN> list archivelog all;

specification does not match any archived log in the repositoryRMAN> 

View 7 Replies View Related

Exporting Data From Tables To External Text File?

Apr 29, 2008

Actually what i am trying to do is to extract data form tables and place them in an external text file....i wrote the following code

FUNCTION

create or replace
FUNCTION dump_data ( p_query in varchar2,
p_separator in varchar2 ,

[Code].....

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

PL/SQL :: Create Multiple External Tables From Same Flat File?

Nov 28, 2012

using oracle 10g currently create many external tables like so..

CREATE TABLE "XT_UNITS"
(

"Q1_2012" VARCHAR2(25 BYTE),
"Q2_2012" VARCHAR2(25 BYTE),
"Q3_2012" VARCHAR2(25 BYTE),
"Q4_2012" VARCHAR2(25 BYTE)
[code]....

is there any way I can use 1 flat file (csv) to populate many external tables ?

View 4 Replies View Related

Server Utilities :: Difference Between Sqlloader And External Tables?

Feb 9, 2011

I would like to know which of the above is faster for the same conditions.

i.e. If I am loading 1 million rows for the same conditions which will perform faster?

View 9 Replies View Related

Server Utilities :: Views Linked To External Tables

Mar 28, 2011

i just posted another topic where i heard about external table and i had a few questions concerning them. I thought it was best to create a new topic than to continue on the other one...

I noticed that to create an external table the CTL is like this:
CREATE TABLE emp_load (FIELDS description)
ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY ext_tab_dir
ACCESS PARAMETERS (RECORDS FIXED 62 FIELDS (employee_number CHAR(2),

[Code]...

1) This creates an external table, but, is it possible to Create a normal table in a CTL file? For physical tables, the table has to exist right?

2) if you create a view linked to 2 external tables and if the CSV files are updated each day, the external tables will be updated automatically, and the view will be updated as well?

3) Can't there be any synchronisation problems?

4) What happens if a select request (or someone requests on the view) while the CSV file is being updated?

5) Is there anyway you can protect the accesses from those tables/views when the CSVs are being updated?

6) Is it possible to create an index on these sort of tables?

7) Is it possible to index a view?

8) Are external tables visible on a tool like sql developper?

View 11 Replies View Related

Server Administration :: How To Delete Files In Incident Folder

Aug 3, 2010

I have got oracle 11g release 1, I need recomendation, how can I delete safely content from the folder C:oraclediag dbmsinstancenameinstancenameincident?

can i delete files manually which are not useful?

View 4 Replies View Related

Server Administration :: Unable To Delete Archive Files Through ASMCMD

Apr 13, 2011

we are getting below error:

ora-00257 archiver error. connect internal only until freed

when we tried to remove the unwanted arc files thro ASMCMD,we are getting below error:

ASMCMD> rm -ef 2011_04_05/
Unknown option: e
usage: rm [-rf] <name1 name2 . . .>
ASMCMD> rm -rf 2011_04_05/
ORA-15032: not all alterations performed
ORA-15028: ASM file '+XCOM_BACKUP_DG/TXCOM/ARCHIVELOG/2011_04_05/thread_2_seq_27215.1143.747641143' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
ORA-15032: not all alterations performed
ORA-15028: ASM file '+XCOM_BACKUP_DG/TXCOM/ARCHIVELOG/2011_04_05/thread_3_seq_21762.826.747641143' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)

further we checked FRA size:

SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------

CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 3.19 0 38
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0

and checked any arc processing holding lock on arc files:

> ps -ef | grep -i ora_arc*

oracle 6989 1 0 15:07 ? 00:00:00 ora_arc0_TXCOM1
oracle 6991 1 0 15:07 ? 00:00:00 ora_arc1_TXCOM1
oracle 12246 12164 0 15:17 pts/4 00:00:00 grep -i ora_arc*
oracle 13452 1 0 Mar23 ? 00:01:07 ora_arc0_TWEBAPPS1
oracle 13454 1 0 Mar23 ? 00:00:30 ora_arc1_TWEBAPPS1
oracle 15402 1 0 Mar23 ? 00:00:50 ora_arc0_SXCOM1

[Code] ........

but we were not able to remove those .arc files from that folder. finally we have down all the instances and deleted those files manually.

View 1 Replies View Related

Automatic Storage Management :: CMD Delete Files Older Than N Days

Oct 24, 2012

in ASM disk group,

(under one directory)

ASMCMD> ls -lt

...(thousands of log files looks like, for example, log_19.26718.790635667),

how can I delete those files older than 10 days in one command line?

View 5 Replies View Related

SQL & PL/SQL :: Insert From 3 Different Files In 3 Tables

Jun 12, 2013

I am trying to insert from 3 different files in 3 tables and I am finding that the same id is being inserted for each row.

DECLARE

F UTL_FILE.FILE_TYPE;
V_LINE VARCHAR2 (1000);
V_Name varchar2(512 char);
V_ParentUID raw(16);
V_Path varchar2(1024 char);
[code]...

View 5 Replies View Related

Upload Very Large Files In Tables?

Nov 2, 2008

is it possible to upload very large files in oracle's tables. For example 1-2 gigabyte video file or even more. In other words is it possible to use oracle as file server to upload very large files and store them?

View 2 Replies View Related

SQL & PL/SQL :: How To Insert BLOB Files Into Tables

Dec 4, 2011

I created a music database, and I'm having trouble inserting the audio, video, and lyrics (.doc) into their respective tables. I searched through the forums and found some example code, but I'm not sure how to modify it to fit my purposes.

What I need is a procedure that can insert a complete record into the track table (including an .mp3 file for each row), one that can insert a record into the lyrics table (including .doc file for each row), and a procedure that can insert a single record into the Video table (including an .mv4 file).

Here's the DDL:

CREATE TABLE Artist(
artist_id number(9),
artist_name varchar(30),
country char(2),
num_albums number(3),
num_songs number(5)
);

[Code]....

View 39 Replies View Related

Creating User To Do A Delete From All Tables

Oct 30, 2011

I am trying to create a new user who will be able to do a delete from all of the tables that only I MYSELF created. I created my user and granted access but realized I may not have done it right..

is it simply SQL>grant delete on <TABLESPACE> to <new user>; ? or do i need to specify the grant the delete on my tablespace to new user?

View 4 Replies View Related

Delete Records From Multiple Tables

Jun 27, 2011

I have a service that executes a pl/sql function (legacy app) to delete records from multiple tables. This function works fine in development, and has worked fine in production until about a week ago. I'm not a DB guy but the DB guys are trying to say this is an application issue. That may be, be the "insuff privileges" really leads me to believe otherwise.

What is causing this type of Oracle error? Permissions between dev and prod are the same, yet it works in dev but not prod.

ORA-29876: failed in the execution of the ODCIINDEXDELETE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in textindexmethods.ODCIIndexDelete
ORA-20000: Oracle Text error:
DRG-10602: failed to queue DML change to column ABSTRACT for primary key AAAfBoAAEAABa62AAA
DRG-50857: oracle error in drexrdml
ORA-01031: insufficient privileges
[code]....

View 2 Replies View Related

SQL & PL/SQL :: Insert Data In Three Tables From Three CSV Files Simultaneously?

Jun 12, 2013

I am trying to insert data in three tables from three csv files simultaneously. This is what I have so far:

---insert all data from three csv files
DECLARE
--zenobject
F UTL_FILE.FILE_TYPE;

[Code]....

View 5 Replies View Related

PL/SQL :: Spool Data From Tables Into Flat Files

Oct 23, 2012

I am trying to spool data from tables into flat files. I am using the following scripts to accomplish it

1. A cmd file (windows) that makes a call to a sql file
2. The SQL file which generates another query file at the run time, depending upon the table name passed to it
3. The run time query file , that executes the final query and spools the data into a txt file | delimited

For e.g. :

Actual command passed C:Spool_utilityspool_utility TABLE_NAME

E.g. of the spool utility file :

@echo off

SET dbuser=XX@YY
SET dbpw=xxxx

echo %date% - %time% - Start > %1%log.txt

echo START

sqlplus -s %dbuser%/%dbpw% @spool_utility.sql %1>%1.txt

echo %date% - %time% - Done >> %1%log.txt
echo DONE

E.g. of the spool_utility.sql

set echo off
SET newpage 0
SET feedback off
SET linesize 32767
set pagesize 0
[code]........

The above file generates a table_name.sql file with the actual table name at run time and gets executed and the output is written to the table_name.txt file.

This works perfectly fine. But the issue is when someone passes some wrong table name or if there is a actual run time error while executing the query , the error with details itself itself gets written to the end spool file.

For e.g. : if i do this just to generate an error and execute it from command line, the query generates an error and writes the error to the spool file , but at the command prompt where I executed the command I do not see any error and the process seems to have run perfectly well

set xxx on xxx off as above

spool &1.sql;

Prompt Select * from &1 where rownum><10---this will cause the issue

spool off
set termout ON
@ &1

EXIT

Eg of spool file generated :

from     table_name WHERE rownum><=10 *
ERROR at line 62:
ORA-00936: missing expression

My question is, is there any way i can capture this runtime error and return this error to my calling sql script spool_utility.sql and then propagate it to the calling command file and do some tasks for eg removing the spool file and writing the actual error to a log file . Basically any way to know at my OS calling level that the entire spooling operation was unsuccessful.

View 8 Replies View Related

SQL & PL/SQL :: To Delete Data From Tables Based On A Condition

Feb 3, 2013

i have a list of 500 tables. I want to delete data from those tables based on a condition. (Data before 2008 year needs to be deleted). Each table has a column based on which data needs to be deleted. Provide a code which does this efficiently and fast. Bulk collect is preferable.

View 17 Replies View Related

Audit Delete And Update On All Tables Of Database?

Jun 14, 2013

Was going through this and found that

“AUDIT DELETE ANY TABLE BY <username> BY ACCESS” or “AUDIT UPDATE ANY TABLE<username> BY ACCESS”

enable audit for delete and updates for  given username/schema.  I want to enable auditing on delete and update on my entire database. 

Why? And have we tested it in our any of existing setup?  I am thinking of “Trigger after delete” but again this logic gets struck at individual tables. It do not work simply once and all for complete database/all users/all schemas

View 15 Replies View Related

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







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