How to ftp a file within PL/SQL procedure?
Hi, all:
Any idea of how to ftp a file within PL/SQL procedure? I have scheduled a job to periodically generate a file and want to ftp this file to another machine. I know crontab can do the ftp part, since we can send email within Oracle, I am wondering whether we can ftp within Oracle as well? Thanks a lot!
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:150612348067
Similar Messages
-
How to execute .bat file within pl/sql block
Hi,
I want to execute a batch file (.bat) file withing a pl/sql procedure. Please guide me for it.
RegardsThere are several possible ways to make a call-out from a PL/SQL program to the OS on the database server (but not to the client computer).
You could use java or an external procedure (you'll need to code it in C) for example.
You might be able to make use of UTL_HTTP to talk HTTP to another server or UTL_TCP to talk TCP to another server.
What is it you are trying to do? -
OPERATE FILE WITHIN PL/SQL
I WILL OPERATE FILE WITHIN PL/SQL,eg delete file in pl/sql procedure or function.how can I perform?
PLS send mine EMAIL [email protected],tell me!Try UTL_FILE.FREMOVE.
-
hi
how to import *.dmp file Through Oracle SQL Developer (3.2.20.09) ?
how to do it ?
thanksYou do not.
.dmp files are created from our Export and Data Pump database utilities and are proprietary files. You use the corresponding Import (or Data Pump) utility to import the data. -
Display data in log file using PL/SQL procedure
Just as srw.message is used in Oracle RDF Reports to display data in log file in Oracle Apps, similarly how it is possible to display data in log file using PL/SQL procedure?
Please also mention the syntax too.Pl post details of OS, database and EBS versions.
You will need to invoke the seeded FND_LOG procedure - see previous discussions on this topic
Enable debug for pl/sql
https://forums.oracle.com/forums/search.jspa?threadID=&q=FND_LOG&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
HTH
Srini -
How to call javascript function from PL/SQL procedure
Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?
Hi,
I have a requirement to call Javascript function inside a After Submit Process.
clear requirement below:
1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
2. user clicks on "save files" button
3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
Hope this clarify U.
Krishna. -
How to FTP a file from client machine to database server using forms 10g
Hi
I want to ftp a file from a client machine to the database server machine using forms 10G (or PL/SQL).
could you please tell me how can I do this
Regardshi
How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
Solution
Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
here are steps to get a small test form running, using WebUtil 1.06.
Note: Oracle_Home is used as an alias for your real oDS ORACLE_HOME.
Feel free to copy this note to a text editor, and do a global find/replace on
Oracle_Home with your actual value (no trailing slash). Then it is easy to
copy/paste actual commands to be executed from the note copy.
1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
2) Copy or move jacob.jar and jacob.dll
C:\webutile is the folder where you extracted Jacob, and will end in ...\jacob_18
cd C:\webutile
copy jacob.jar Oracle_Home\forms\java\.
copy jacob.dll Oracle_Home\forms\webutil\.
The Jacob staging area is no longer needed, and may be deleted.
3) Sign frmwebutil.jar and jacob.jar
Open a DOS command prompt.
Add Oracle_Home\jdk\bin to the PATH:
set PATH=Oracle_Home\jdk\bin;%PATH%
Sign the files, and check the output for success:
Oracle_Home\forms\webutil\sign_webutil Oracle_Home\forms\java\frmwebutil.jar
Oracle_Home\forms\webutil\sign_webutil Oracle_Home\forms\java\jacob.jar
4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
you may skip this step. Otherwise,
Create a schema to hold the WebUtil stored code, and privileges needed to
connect and create a stored package. Schema name "WEBUTIL" is recommended
for no reason other than consistency over the user base.
Open Oracle_Home\forms\create_webutil_db.sql in a text editor, and delete or comment
out the EXIT statement, to be able to see whether the objects were created witout
errors.
Start SQL*Plus as SYSTEM, and issue:
CREATE USER webutil IDENTIFIED BY [password]
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;
GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
CONNECT webutil/webutil@rcci
@Oracle_Home\forms\create_webutil_db.sql
-- Inspect SQL*Plus output for errors, and then
CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
Reconnect as SYSTEM, and issue:
grant execute on webutil_db to public;
5) Modify Oracle_Home\forms\server\default.env, and append Oracle_Home\jdk\jre\lib\rt.jar
to the CLASSPATH entry.
6) Modify Oracle_Home\forms\server\formsweb.cfg insde [default] add :
archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
archive=frmall.jar
also add :
[webutil]
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
baseHTML=webutilbase.htm
archive_jini=frmall_jinit.jar
WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
archive=frmwebutil.jar,f90all.jar
lookAndFeel=oracle
7) Modify Oracle_Home\forms\server\webutil.cfg and add :
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
8) Start the OC4J instance
9) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
It is important to generate the PLX, to avoid the FRM-40039 discussed in Note 303682.1
If the PLX is not generated, the Webutil.pll library would have to be attached with
full path information to all forms wishing to use WebUtil. This is NOT recommended.
10) Create a new FMB.
Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
There is no need to Subclass the WebutilConfig object.
Attach the Webutil.pll Library, and remove the path.
Add an ON-LOGON trigger with the code
NULL;
to avoid having to connect to an RDBMS (optional).
Create a new button on a new canvas, with the code
show_webutil_information (TRUE);
in a WHEN-BUTTON-PRESSED trigger.
Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
11) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
the "Application Server URL" is empty.
Then append "?config=webutil" at the end, so you end up with a URL of the form
http://server:port/forms/frmservlet?config=webutil
12) Run your form. -
How to create Batch file to execute sql scripts
Hi friends,
i want to create batch file to execute all my .sql scripts.
I have all table ( all table scripts in single file ) ,Udds ( all udds in single file ) ,Stored procedures( separate file for each SPs ),Functions ( Separate file for each Functions ),Triggers and views scripts in .SQL file.
can anybody tell me how to create batch file for executing all these scripts in sql server ?.
while executing, it should ask Database name,server name, password. if these details are given then it should execute my all scripts in given database
, if any error thrown then that error and procedure name alone have to move to separate log file..
Please help me if this possible or any other easy way to do this..
Thanks - RaviHi Mate.
can i save the below details in my batch file parmantly, so that i don't need to provide the details agains again in CMD while i execute this. Please help
set /p SName=Server Name :
set /p UName=User Name :
set /p Pwd=Password :
set /p DbName=Database Name
If i am providing the details before execution of this bat file it will throw error. -
How to get .ocp file when converting sql database to oracle database?
Hi all,
Hope doing well,
sir i am using sql developer tool for migration from sql server to oracle
i am using this offline but i don't know how to create .ocp file
please help me.
it's urgent
waiting for reply.
thanks in advance.The OCP files are created during OFFLINE Migration. In SQl Developer click on Tools -> Migration -> Create Database Capture Scripts. Choose an output directory, make sure to select the correct platform (Windows) and select MS SQl Server from the drop down list.
You'll get in the directory specified earlier the batch and OCP files required to create the source model using the offline method.
Have a look at this web site: http://www.oracle.com/technetwork/products/migration/sqlserver-095136.html
It contains more info including a link to a video demonstrating the offline capture method. -
How to download .doc file from ms sql
Hi guys.,,,!
I have a problem in file uploading and downloading. The problem is i upload my .doc file in ms sql server successfully completed. After that i would like to download the file from the database.can anybody tell that how to download the file from the database.mani_miit wrote:
I have a problem in file uploading and downloading.OK.
The problem is i upload my .doc file in ms sql server successfully completed. Sorry, I don't see a problem here? You said that it is successfully completed. Please elaborate the problem.
After that i would like to download the file from the database.can anybody tell that how to download the file from the database.Just get an inputstream of the file from the database using ResultSet#getBinaryStream() and write it to the output of whatever UI technology you're using. -
How to call swf file within another swf file using xml
hii,
I am facing some problem to call a swf file via xml when this xml file loaded it calls another swf file which includes a new xml file. now if i call this nested swf calling without xml it works but in case case of xml it is not showing the result. i m confused. how to nested xml file calling done in as2/as3. i need some logics. thanks in advanceThis is the AS3 forum and your posting involves AS2 code. You should repost in the AS2 forum...
http://forums.adobe.com/community/flash/flash_actionscript
Aside from that, your problem might lie in the following lines...
_root.createEmptyMovieClip("sub_container1", 1);
loadMovie(sub_SWFPath[1].attributes.url, "sub_container1");
You create the new movieclip, sub_container1, in the _root, but you do not assign the loadMovie to load into that same movieclip (unless you have a _lockroot = true assigned in your sub-swf). In any case, you should repost in the AS2 forum to pursue resolution. -
How to access remote file through PL/SQL
I need to access remote operating system files through PL/SQL. I have tried accessing using utl_file package by setting UTL_FILE_DIR parameter to the mapped drive of the remote machine, but when tried to read the file it raises INVALID_OPEARTION exception.
I have also tried accessing through the directory object also.
Would appreciate if anyone can suggest for the same.
Thanking you in anticipation
Regards,
VipulHi,
A remote file means a file that is on a Shared server resource. This file cannot be accessed by Oracle Unless the that drive has been mapped on the Server and proper permissions are given.
The file can be accessed by the client if he is using TEXT_IO and the shared drive is mapped to the client.
Hope this helps ...
Regards,
Ganesh R -
Producing text file from PL/SQL procedure (UTL_FILE)?
Hi,
I need to produce a text file from a PL/SQL procedure. My output should be a little over 38K records and my query has 70 fields. I'd like to separate the fields by pipe delimiters in the text file. I can either concatenate all 70 fields into one variable for each record or send all 70 fields over with a pipe, whichever is easier. It looks like I can't spool within PL/SQL but UTL_FILE might be an option from what I'm reading. Does anyone have any good, simple example(s) to produce a text file using this package in calling multiple fields from a LOOP? Our os is UNIX and db is Oracle 9i.
Also, I've read that UTL_FILE has a record output of 1,023 bytes. Is this for each record line or the whole file size? I belive the max # of characters for each line wouldn't exceed 500 characters. The 38K rows I have for the data set would be well over 1MB. If this is the case, is there a work around to produce a larger text file?
Any suggestions and/or examples would be greatly appreciated.
Thanks,
EricAssuming the goal is to create a text file on the database server, you can use UTL_FILE here. Each line can be 1023 characters, but you can have as many lines as you'd like.
Tom Kyte has an example here
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:235814350980
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
How to download output from a PL/SQL Procedure
Hi all
I have set up a PL/SQL procedure that sets up the mime type etc.
to download the output but IE keeps telling me it can't get the
file. I think that it's something to do with the browser wanting
to just GET the file and getting extra stuff because the mime
header is being sent every time. Anyone managed to do this?
Code sample follows:
create or replace procedure x
is
begin
owa_util.mime_header('application/force-download',false,null);
htp.p('Content-Disposition: attachment;
filename="timeline.html"');
htp.p('Pragma: no-cache');
htp.p('Cache-Control: no-cache');
htp.p('Expires: Thu, 01 Jan 1970 12:00:00 GMT');
owa_util.http_header_close;
htp.p('<HTML>');
htp.p('<body>');
htp.p('Hello there man');
htp.p('</body>');
htp.p('</HTML>');
end;What version are you on?
Works fine for me on my 11g:
SQL> create or replace procedure testxml (clob_out out clob)
2 is
3 l_clob clob;
4 l_ctx dbms_xmlquery.ctxhandle;
5 begin
6 l_ctx := dbms_xmlquery.newcontext ('select * from dual');
7 l_clob := dbms_xmlquery.getxml (l_ctx);
8 clob_out := l_clob;
9 dbms_xmlquery.closecontext (l_ctx);
10 end testxml;
11 /
Procedure created.
SQL>
SQL> variable vout clob;
SQL>
SQL> exec testxml (:vout)
PL/SQL procedure successfully completed.
SQL>
SQL> print vout
VOUT
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<DUMMY>X</DUMMY>
</ROW>
</ROWSET>But definitely you can optimize your proc a bit: Try
create or replace procedure testxml (clob_out in out nocopy clob)
is
l_ctx dbms_xmlquery.ctxhandle;
begin
l_ctx := dbms_xmlquery.newcontext ('select * from dual');
clob_out := dbms_xmlquery.getxml (l_ctx);
dbms_xmlquery.closecontext (l_ctx);
end testxml;
/ -
Create an ASCII file from pl/sql procedure
hello
I need to create a file starting from a pl/sql procedure launched by command line
I'll have my .sql file containing my procedure; I'll launch it via command line and it will create the ASCII file
In the procedure I'd like to use some stored procedures or functions
is all of this possible?itmick wrote:
I need to create a file starting from a pl/sql procedure launched by command line
I'll have my .sql file containing my procedure; I'll launch it via command line and it will create the ASCII file
In the procedure I'd like to use some stored procedures or functions
is all of this possible?You could have the procedure code as well as invocation in your .sql file. In that case, launching the .sql file will
(a) compile your procedure and
(b) invoke it as well
Yes, the compiled procedure can invoke other stored procedures or functions.
To create the ASCII file, you could:
(a) use UTL_FILE supplied package in your procedure; this will create the ASCII file on the Oracle server, or
(b) have DBMS_OUTPUT.PUT_LINE calls in your procedure. When invoked from SQL*Plus, this will print out the lines on the SQL*Plus interface and you could spool it to a file on your client filesystem.
HTH,
isotope
Maybe you are looking for
-
How to include "any" or wildcard in the beginning of my search
Hello, my customers have the need of using a wildcard operator in their searches in the beginning of a phrase. For example when searching for "sharepoint" to also be able to search like "*repoi*". From what I know KQL does not support wildcards in th
-
Putting my Music from my iPod to a new iTunes Library
Okay so basically I just got my computer redone and the guy that did it delete my 1000 song library... so now all the songs I got on my iPod are what is left of that Library... I do remeber reading that you can take those files and put them on your c
-
DV camera signal direct to DVD?
I would like to burn video in real time, directly from my DV camera to a DVD. I can't seem to do this in iMovie or iDVD. iMovie seems to want to save the video to the hard drive, but not to a DVD. It then takes 15 minutes and several steps to get the
-
I have a form that uses web services. A user enters a order number for an existing order and about 10 fields are populated. This works great. I now want to pass the order number in when the form is launched and call the web service on start up/form l
-
Is it possible to apply an adjustment to multiple images at once?
I'd like to be able to apply a simple Auto Enhance to multiple images. I don't see where that's possible, but maybe someone has an answer. Thanks in advance.