SQL & PL/SQL :: How To Get The File Name From Directory

Dec 12, 2012

How to get the file name from directory without Java. Is there any way to do it in Pl/Sql.

View 13 Replies


ADVERTISEMENT

Accessing File From Directory?

Oct 7, 2009

have a log file in unix server under(/usr/home/oraj/log/abc.log) I am trying to access from oracle stored procedure as fallows

src_clob BFILE := BFILENAME('/usr/home/oraj/log', 'abc.log');

Exception:
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 716
ORA-06512: at "usr.LOAD_CLOB_FROM_XML_FILE", line 39
ORA-06512: at line 1

I dont want to create directory as such ('/usr/home/oraj/log') as it is already exists and all log files sits there.

CREATE OR REPLACE PROCEDURE Load_CLOB_From_XML_File
IS
dest_clob CLOB;
src_clob BFILE := BFILENAME('/usr/home/oraj/log/', 'abc.log');
dst_offset number := 1 ;
src_offset number := 1 ;

[code]...

View 1 Replies View Related

SQL & PL/SQL :: Generates CSV File In Directory

Feb 17, 2012

This generates a CSV file in an directory. When it runs for the 1st time it take SYSDATE -7 data. After the 1st run it appends the data since the last run. Now my problem is the appending happens at the bottom of the file and every time the header appears. I want the header only the first time and the new data should keep appending at the top so that i get the latest data always at the top.

View 18 Replies View Related

There Is No File Audit In Adump Directory

Jan 6, 2013

I have an issue when I enable auditing feature in oracle,I use 'DB' to store the audit from user in oracle, my command is

SQL>alter system set audit_trail=db scope=spfile;
SQL>shutdown immediate;
SQL>startup;

in show parameter audit, I see that the audit_trail already changed to DB after I create a user and enable audit for this user, I can see in the audit table dba_audit_trail for insert, update, delete,etc but If I am not wrong, if I using DB to setting the audit parameter then I will get audit file both in oracle table and in adump oracle folder installation, but in my case I cannot find any file in adump directory.

my operating system is windows7 and I use oracle database 10g express edition

View 8 Replies View Related

Enterprise Manager :: Setup - No Such File Or Directory

Jun 17, 2010

This is the error message iam getting when trying to open EM... Im new to DBA and also to this DB....

[sandeep@Linux4 ~]$ emctl start dbconsole
TZ set to US/Eastern

Unable to locate file /home/sandeep/oracle/product/10.2.0/db_1/Linux4.localdomain.com_orcl/sysman/config/emd.properties : No such file or directory

View 16 Replies View Related

PL/SQL :: Directory List - How To Read File Names

Jun 7, 2013

i have one directory in this directory contains 100 file these files are related to table structured creation with dependence

so how to read file names from directory and executed in scheme with logs also

procedure or script

View 5 Replies View Related

Forms :: How To Get File Directory Path Dynamically In The Report

Sep 6, 2013

I want to get file directory path dynamically with out using directory in database or not hard code like below

the purpose is i need to check image in the path directory if not found i unable to generate report, is there any possible to get dynamically

function CF_URLFormula return Char is
v_handle utl_file.file_type;
v_file_dir VARCHAR2(60) := '/u002/app/applmgr/temp/';
begin
v_handle := utl_file.fopen(v_file_dir, :photo_name, 'R');
utl_file.fclose(v_handle);
RETURN v_file_dir||:photo_name;
exception
when others then
srw.message(100,SQLERRM);
return null;
end;

View 1 Replies View Related

Forms :: File Transfer From Server Directory To Client?

Oct 3, 2013

I write a file on database server by following

CREATE OR REPLACE DIRECTORY TEST_DIR AS 'c: emp'
GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
SQL> select * from all_directories;

OWNER DIRECTORY_NAME
------------------------------ ---------------------
DIRECTORY_PATH
----------------------------------------------------
SYS TEST_DIR
c: emp
SYS PUBLIC_DIR
E:PUBLIC_dir

and then

PROCEDURE run_query(p_sql IN VARCHAR2
,p_dir IN VARCHAR2
,p_header_file IN VARCHAR2
,p_data_file IN VARCHAR2 := NULL) IS

[code]...

but I get error wut_118.

View 1 Replies View Related

Forms :: Webutil File Transfer Directory Listing

May 25, 2010

Is there anyway to get a listing of the files in a specified directory on an ftp server using webutil?

View 2 Replies View Related

Listener File Rapidly Increasing In Diag Directory Of 11g

Jul 6, 2012

I noticed that listener file in diag/trace is rapidly increasing. I am using 11g Rel 1 on window 2008 server Its 1 GB in couple of days. Is there any way if I can turn it off ?

View 5 Replies View Related

Open Excel File From Oracle Directory On Local Machine

May 31, 2013

I have an application where I generate a excel using data in a table and write excel file in oracle directory.Now my requirement is to open that file from local machine .How can i achieve it.I am using Apex 4.2,Oracle 10g .

View 1 Replies View Related

Forms :: Copy Image Or Text File From Source Directory To Destination

Oct 31, 2011

how do i copy an image or a text file from ex: directory c to directory d

View 5 Replies View Related

Application Express :: Automatic Save File From Apex To User Local Directory

Jun 13, 2012

how can save pdf file from apex to user local directory on button click?

View 2 Replies View Related

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

SQL & PL/SQL :: XML Not Saving In A Particular Directory

Jul 16, 2013

I want to create a xml file for a particular query and i have used the following

SELECT DBMS_XMLGEN.getXML('SELECT * FROM EMPL_NEW') FROM dual:

the output of this is

<?xml version="1.0"?>
<ROWSET>
<ROW>
<ENO>10001</ENO>
<ENAME>rajkumar</ENAME>

[Code]....

and i need to save this as .xml file in a particular file directory in client machine and i have coded like this

DECLARE
F UTL_FILE.FILE_TYPE;
MYCLOB CLOB;
DIR_STR varchar2(100);
BEGIN
DIR_STR:='XML';
SELECT
DBMS_XMLGEN.GETXML('

[Code]...

XML is the name of directory name i have created in my user and I have also created the directory manually in D:/xml.

UTL_FILE package access given to public..

but still this error(refer the pic) exists!!

View 4 Replies View Related

Using Different Directory For Expdp

Apr 17, 2013

For now we have a directory defined as /exp wherein we do the export using expdp. Can we define a new directory and use this directory for expdp.

View 3 Replies View Related

Oracle_Home Directory Recovery

Apr 21, 2011

If ORACLE_HOME Directory crash/lose then how ? is there any option to recovery ? if yes how?

View 2 Replies View Related

Active Directory Integration With EBS

Jun 3, 2013

I have task to integrate AD users with oracle ebs r12 . Is there any mechanism to do it directly without OID between oracle ebs and Active directory during login to ebs or i have to install OID to finish that task .

View 1 Replies View Related

Authenticate 10g Through Active Directory?

Aug 19, 2009

I am trying to authenticate Oracle 10g through Active Directory ..But i am not able to do that successfully...

View 2 Replies View Related

ORA-02778 / Name Given For The Log Directory Is Invalid

May 6, 2008

I restored a date in my database (the backup of that date was taked by a snap on Windows Server 2003), now I try to startup the database it gives me the following error

ORA-02778: Name given for the log directory is invalid

here is a copy of my spfile

*.background_dump_dest='H:\oracle\oradata\gdwh2401\BDUMP'
*.bitmap_merge_area_size=16777216
*.cluster_database=FALSE
*.compatible='9.2.0.0.0'
*.control_files='G:\oracle\oradata\DWHLIVE\CONTROL01.CTL','H:\oracle\oradata\DWHLIVE\CONTROL02.CTL','I:\oracle\oradata\DWHLIVE\CONTROL03.CTL'
*.core_dump_dest='H:\oracle\oradata\gdwh2401\CDUMP'

[code]....

this is a picture of my alert_log file

Tue May 06 09:42:15 2008
Starting background process EMN0
EMN0 started with pid=53, OS id=13704
Tue May 06 09:42:16 2008
Shutting down instance: further logons disabled
Tue May 06 09:42:18 2008
Stopping background process QMNC
Tue May 06 09:42:19 2008

[code]....

View 5 Replies View Related

Oracle_home / Bin Directory Deleted

Nov 4, 2011

I have a major problem my oracle_home/bin directory was delete mistakenly by on of our user. Because i cannot use all oracle utitilessqlplus,dbca,netca,netmgr. how do i the cover this problem?

View 2 Replies View Related

SQL & PL/SQL :: Accessing Scripts From Different Directory?

Jun 30, 2010

I have customized my sqlprompt. I put the code for that in a script p.sql.

Now I log into sql from multiple directories as I have different scripts in different directories. How do I access p.sql which is not in the currect directory.

Also I wanted to know if I could change directories from the sql prompt.

View 6 Replies View Related

SQL & PL/SQL :: Retrieve The Path Of A Directory

Oct 27, 2011

I create a directory using this:

CREATE DIRECTORY xml_data AS 'c:\mytest';

How can I retrieve the 'C:mytest' in a select statement?

View 5 Replies View Related

Creating Table In A Directory

May 2, 2013

I have a directory defined as TDM_IN where a directory has been created. There is a table which has been created as

create table abc.IFP_GRP_D_INT
(
IFP_GRP_DIM_KEY VARCHAR2(10),
.....

[Code]...

Now how can i select the records from this table?

View 3 Replies View Related

Possible To Export Data To Another Directory Other Than Datapump

Sep 8, 2013

Is it possible to export data to another directory other than datapump default directory(DATA_PUMP_DIR) in Linux.

View 5 Replies View Related

Forms :: 10g Error In Writing To Directory

Apr 12, 2006

I'm trying to install forms 10g on my windows 2000 professional os which is having oracle 9i client. but while installing 10g i'm geting oracle universal installer error. error in writing to directory c:...

My D drive is having 10GB free space and C drive is having 800MB free space (both drive have normal attribute i.e it's not read only ) and oracle have already copied some temp files in C drive (size 13.6 MB) .

View 7 Replies View Related

Forms :: Read Set Of Files From A Directory

Apr 28, 2011

Am creating a form for some processing text files available in a local users system. Now I would like to get the directory name from the user using dialog box and read the files

[ I am already reading the file, but I allow the user to select the specific file name using get_file_name ]

View 1 Replies View Related

Forms :: Read Image From A Directory?

Mar 16, 2013

I have 100 image file in C:My_PIC/ i want read these image files and put in a table .

My table have 2 column : Id_pic varchar2(20) ,
PIC BLOB

I want read all files in C:MY_PIC and Insert in My table with a BUTTON in My form

ID_PIC = file name
PIC = image

View 1 Replies View Related

SQL & PL/SQL :: Executing Script Files In A Directory?

Feb 16, 2010

Using PL/SQL I want to search inside a directory and execute the script files with a specific pattern.

I know that with @@ command I can execute a script, however when the name of the files come in a variable I don't know how to execute the script.

Here is the code for searching the files:

set serveroutput on
declare
directory2 varchar2(1024):='/home/oracle/dir';

[Code].....

View 5 Replies View Related

SQL & PL/SQL :: ORA-29280 / Invalid Directory Path

May 13, 2012

I started working on utl_files. When i Am working on this topic I struck with an error: Quote:ORA-29280: invalid directory path. Below are the steps I followed to work on utl_files,

STEP1: connect sys as sysdba

STEP2: @$ORACLE_HOME/rdbms/admin/utlfile.sql

STEP3: create or replace directory utl_data_files as '/home/oracle/siva/data/'; --(the directory path is already exists in the OS)

STEP4: below is the code

DECLARE
out_file UTL_FILE.file_type;
linebuf varchar2(1999);
directory_name varchar2(100):='utl_data_files';
BEGIN
out_file:=UTL_FILE.fopen(directory_name,'emp.dat','W');
for emp_cur in (SELECT * FROM scott.EMP)

[code].....

STEP5: then it's giving the below result/error info

Quote:

SQL ERRORCODE IS:-29280
SQL ERROR MSG IS:ORA-29280: invalid directory path

PL/SQL procedure successfully completed.

View 2 Replies View Related







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