SQL & PL/SQL :: Fetch File Path From A Folder
Oct 4, 2013We upload a file on our library on weekly basis. I wanted to fetch the latest uploaded file path/URL from a folder through PL/SQL, but not sure if it's possible.
View 12 RepliesWe upload a file on our library on weekly basis. I wanted to fetch the latest uploaded file path/URL from a folder through PL/SQL, but not sure if it's possible.
View 12 RepliesI have problem follow:
- I hava folder obitan files .xml : C: emp
+ File .xml as: emp.xml, dept-110720.xml, etc...
- Now, i would get file name .xml in folder C: emp. How do i do?
I am using Oracle database with visual studio 2010,how to add all my local database tables to App_Data folder in a .NET project?
View -1 Replies View RelatedI am trying to write data to a network shared folder. When I write to a local file it works perfectly. Below is my procedure.
CREATE OR REPLACE procedure nbpsbp_file as
type r_cursor is ref cursor;
refr r_cursor;
tab_name varchar2(20):= null;
tab_name1 varchar2(20) := null;
tab_name2 varchar2(20) := null;
[code]....
When I execute the above procedure, it gives me the following error
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at "NBPSBP_FILE", line 36
ORA-06512: at line 1
I have also set the parameter utl_file_dir = '\10.16.10.225 emp' When I set the utl_file_sir to a local folder, for example, c: emp, and use the same path in UTL_FILE.FOPEN, then it works fine and writes the desired output to text file. But when I give it a network address, it raises the above error.
How do I handle spaces in the path name of a file with PL/SQL? This is what I am trying to do.
start f:folder namefolder name with spacesfoldernamescript.sql
I keep getting an error:
"The file 'f:folder.sql' does not exist."
Is there a special character I need to put in there for the spaces? How can I get this to work?
I need to call pdf file in oracle form 6i without specify the path of adobe acrobat reader. how to do that?
i.e.:
AppID := DDE.App_Begin(<path where you have winword.exe in your system> <path of the document you wish to open>,DDE.APP_MODE_NORMAL);
i dont need to write ths part
<path where you have winword.exe in your system>
that because in our company we have several virgins of acrobat reader and i really need to call pdf file and make the call statement public
how we can find file path dynamically. In paramenter we can give only destination file name like EXCEL.EXE. and its give me full path of EXCEL.EXE file.
View 1 Replies View RelatedI 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;
I need to copy .CSV File from a Windows Server shared path (\hostnameoutput) to another server which i believe is on unix.The other server name is abc.hcl.com. On this server i need to put it in the root directory. I will have to use SFTP and not FTP.
View 19 Replies View Relatedusing pl/sql code i am creating text file on specific path of database server. i need to compress this file .how to compress the text file using pl/sql?
View 1 Replies View RelatedHow to call a batch file existing in network path through oracle forms 6i. I am using following code in Forms 6i which is supposed to FTP some .text files to a UNIX box.
Host( '\guww.netdfs.root.Global Shared Data$(LEV)Leven Shared DataLeven Shared DataPublicCOMMONMatsEmpty Bottle ReportsSchedules Preliminaryftp_files_to_ddd.bat');
When I am running this batch file ftp_files_to_ddd.bat from local directory of my PC,it is working properly.
Oracle version: 11.2.0.3.0 Enterprise Edition
OS - IBM/AIX RISC System/6000
I am trying to generate a trace file from a piece of code executed by java server. What I asked the java developer to do is to place this block immediately after establishing a connection:
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET TRACEFILE_IDENTIFIER = ''M1''';
dbms_monitor.session_trace_enable(waits => FALSE, binds => TRUE);
END;And at the end of the logical java block of code:
BEGIN
dbms_monitor.session_trace_disable;
END;
What I want to know is how many rows the java server fetches after executing one particular select statement, because they complain about receiving less in count rows from the select statement than expecting. For example, if I execute the same sql query in sqlplus session, then I fetch let's say 1000 rows. When the same query is executed from java side, the fetched rows are less in count, let's say 500.And because I doubt it, I wanted to trace to see what actually is executed and how.the excerpt of the trace file I see exactly the same query which I execute myself in a sqplus session.is no fine-grained control on the udnerlying tables in the query.
And my question is, how to interpret the FETCH phase of the cursor (for the select statement)?example, if I see one FETCH for this cursor, does this mean that the java server has fetched only one row?If I see 100 FETCHes, does this mean they fetched 100 rows from the cursor?
Here is a short excerpt from the trace file (don't crucify me for the query and the obvious denormalized design of the tables, this is not invented by me):
PARSING IN CURSOR #4573587152 len=667 dep=0 uid=737 oct=3 lid=737 tim=17685516462413 hv=954980718 ad='70000006d3e4940' sqlid='69pm96nwfrqbf'
select /* ordered */ o.id, nvl(o.par_id, -1) as par_id, o.NAME_GER, o.NAME_ENG, o.NAME_ESP, o.NAME_ITL,o.NAME_FRA, decode(lo.lflag, 'Y', 'L', 'N') as leaf_or_node, lo.distance + 1 as "LEVEL", to_char(o.beg_date,
[code]...
I am trying to import the database and i see the following error:
IMP-00051: Direct path exported dump file contains illegal column length imp abruptly stops. my source and destination database is as follows:
Source: 9.2.0.8
Destinatin: 11g-r2.
I used exp with the following options:
direct=y
buffer=899989898
recordlength=64000
File=1.dmp,2.dmp,3.dmp,4.dmp,5.dmp,6.dmp,7.dmp,8.dmp,9.dmp,10.dmp,11.dmp,12.dmp,
13.dmp,14.dmp,15.dmp,16.dmp,17.dmp,18.dmp,19.dmp,20.dmp,21.dmp,22.dmp,23.dmp,24.
dmp,25.dmp,26.dmp,27.dmp,28.dmp,29.dmp,30.dmp
grants=y
compress=y
FILESIZE=25g
owner=BRM
Using imp with the following option:
indexes=n
buffer=99989898
recordlength=64000
File=1.dmp,2.dmp,3.dmp,4.dmp,5.dmp,6.dmp,7.dmp,8.dmp,9.dmp,10.dmp,11.dmp,12.dmp,
13.dmp,14.dmp,15.dmp,16.dmp,17.dmp,18.dmp,19.dmp,
20.dmp,21.dmp,22.dmp,23.dmp,24.dmp,25.dmp,26.dmp,27.dmp,28.dmp,29.dmp,30.dmp
analyze=n
grants=y
fromuser=brm
touser=brm
statistics=none
why my imp failing?
What is the Default Path of Log File after Import Dump in Oracle 10g.
View 1 Replies View RelatedI have countries, sites, states tables (total 3) in database (i have user id and password to connect to this database).
every week i need to extract data from these tables into excel files and i need to save those in shared drive for team use.
Currently i am connecting to database every time running sql query and manually exporting that latest data to excel and saving that as excel files in (G: eamcommon) folder with specific name.
output format should be :
excel (.xls)
file names should - countries.xls,sites.xls,states.xls
server name : ap21
output location : G: eamcommon ( G is shared drive).
i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.
I am using oracle 10g version 10.2.0.1.0.
Can I use user-defined functions in my sql*loader control file and load in DIRECT path mode?
FRM-40501: ORACLE error: unable to reserve record for update or delete.
ORA-24374: define not done before fetch or execute and fetch
My master-detail form has single canvas. For both blocks, master and detail, two tables joined together in each. One table to be updated, second table has some info for reference (query only).
I am getting these errors when in detail block the item from LOV is selected for existing record. This does not happen for new record inserted in detail block.
create or replace PROCEDURE newprocedur(outname OUT VARCHAR2,outroll OUT NUMBER) AS
CURSOR c1 IS
select Name,Rollno,Section from emp;
BEGIN
Open c1;
fetch c1 into outname,outroll;
Here out of 3 columns in cursor is it possible to fetch only two columns using FETCH like i did above?
My Rman log location is d:kp man.log, how can i fetch the result of backup into this log file after windows scheduler runs backup..
View 6 Replies View RelatedMy directory has around 100 sql files to run via sqlplus. For test purpose, I took only 2.I tried following code in the batch file to process those 2 files:
for /f %%a IN ('dir /b *.sql') do ( sqlplus -S sys/ankit@orcl2 as sysdba @%%a )But as the following output shows, only 1 was processed :
C:\Documents and Settings\Administrator\Desktop>cd C:\temp\Copy_WMGIS_DWH\6DBlinks\
C:\temp\Copy_WMGIS_DWH\6DBlinks>for /F %a IN ('dir /b *.sql') do (sqlplus -S sys/ankit@orcl2 as sysdba @%a )
C:\temp\Copy_WMGIS_DWH\6DBlinks>(sqlplus -S sys/ankit@orcl2 as sysdba @PUBLIC.MAXIMO.sql )
Database link dropped.
Database link created.
It stops after this. But when I press ctrl+C , it asks me if to stop (Y/N). I choose 'N', it runs second file as shown below:
Terminate batch job (Y/N)? n
C:\temp\Copy_WMGIS_DWH\6DBlinks>(sqlplus -S sys/ankit@orcl2 as sysdba @PUBLIC.VENTYX.sql )
Database link dropped.
Database link created.
It should run second one itself, not via user interaction.
I am in process of restoring database for a standby.When I am restoring datafiles, it says it is restoring to an original location (same as primary database).
restoring datafile 00242 to +MYDB_DATADG/mydb/datafile/data_05.474.805989155 but when I checked with asmcmd utility, it is actually another path/filename. Only same thing is the diskgroup name.
So the file would be
-> +MYDB_DATADG/mydb_stby/datafile/data_05.281.812429111
How do I force rman to restore to the same exact location as my primary database?
I have recently installed a oracle 11g r2 standard edition in aix 6.1.database is on archive log but archived log is generated in daily different folder named after date on system.
i want to generate all archive log in only one folder.
I have Oracle 11g R2 64bit installed on Solaris 5.10 machine. I found that in Oracle 11g R2 there is no lib32 folder which contains the 32bit libraries. But application only works with 32bit libraries.
How and where do I get the 32 bit libraries for Oracle 11gR2.
I have some .fmb files in 'F: ask" " ' location.and my question is can i store the .Fmx files in other location like 'D:" " '
that is if i create a .fmx file for the 'F: ask**.fmb'. i want That .fmx file will store into other location i.e 'D '
I want to open any drive or specific folder in forms 6i in when button press trigger like we open any drive and folder in my computer or folder in windows
View 3 Replies View RelatedI want to copy image/pdf/doc file from one folder to another folder. For that I use following code but its not working.
DECLARE
v_path VARCHAR2 := 'C:ESMIMAGE';
BEGIN
HOST ('COPY '||v_path||'admin.jpg '||v_path||'BE2013', NO_SCREEN);
END;
I want to copy admin image from 'C:ESMIMAGE' to 'C:ESMIMAGEBE2013'.
How to create folder using oracle form. I used HOST command but its not working.
HOST ('md C:Emp_Photo2013');
I want to ask if we could create a sub folder using the SPOOL command. I tried the following but it gave "Cannot create Spool file" error.
SPOOL C:TESTABCABC.sql
where TEST is already present in the C drive whereas I want SPOOL command to create a sub-directory named 'ABC' and then create the spool file 'ABC.sql' isnside it.
Is this possible ? My OS version is MS XP.
I want read 500 GPG image files from a folder ( by A Button in Form ) and move images into a table with a image column (create new records with images) .
View 3 Replies View RelatedWhere should one store pictures in database or read it straight from a folder stored in hard disk and why (performance talking)?
View 4 Replies View Related