Use Host command in Oracle Database Trigger
I need to run Host command from a database trigger in order to execute a sh file in a Solaris, Unix, environment. How can I do it? The database environment is in Solaris and the database is 10g.
Please let me know as soon as possible.
Hi,
read this <http://devtrigger.blogspot.com.br/2012/08/svn-backup-on-unix-or-solaris.html>
Or
you can to run in nohup. For example
You can a script with the command vi about your trigger and run with the sintaxe bellow:
nohup sqlplus "/as sysdba" @script.sql &
Where "script.sql" is the name of the your file.
Kind regards,
Bruno Reis.
www.brunors.com
Similar Messages
-
Use Host command in Oracle forms 6i
hi
all
i use Oracle forms 6i i run in a web and in that i have connect one server so,
i have to use Host Command and i have to fire this command
host (' net use \\windchillsvr\e\jyotionline /user:dwg_users dwg_users');
But it's Not Connect
My Forms in run in Web
so helpJavaBean does d othe job for you but it requires signing process; I used it when I was working on forms6i for our project.
I could use another approach that is the file type command executable which it stays in client's PC to do it and it does not requires signing at all since I am now working on the Java EE project for downloading and launching the third party tool in client's PC.
I plan to write a article for forms use, which could do all the heavy WebUtil can do, but not need to go thru the signing process. -
Calling SQL Loader from Forms 4.5 using HOST command in Win2000
One of my forms calls SQL Loader 7.3 using HOST command to load a csv file onto the database(Oracle 7.3) under Windows 2000 platform.
Only after sql loader finishes its operation the control should come to my form i.e. synchronous execution.
As of now its running asynchronously.
Is there any way to make it synchronous. If Not any other work arounds?
Environment Details
Forms [32 Bit] Version 4.5.10.6.0 (Production)
Windows 2000 Operating System
Oracle7 Release 7.3.2.3.2Forms6i running on W2000, Rdbms 8.1.7
in Forms I added a button TEST,
Trigger when-button-pressed : host('test.bat') ;
in directory .......\frm I added file test.bat :
REM ===============
cd /d C:\........\ldr
pause
sqlldr parfile=test.par
pause
type test.log
pause
exit
REM ================
now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command. -
hi all i am shayan and again prob:-(
i am using oracle 9iDs and forms are run on the web......i had used host command...but it is only open the program on the server....for example i haved open calculator with host command but it is only open on server not on the local computerForms was originally designed as a client/server product. This means that functions like HOST, TEXT_IO, OLE, etc were expected to perform a task on the client machine. Well, this really hasn't changed with the deployment moving to the web. However, the difference is that the client to the database is now the middle tier and these tasks are executed there.
To perform actions on the end-user (client) machine you will need to use a signed Java Bean. As mentioned by harmvos, Oracle offers WebUtil as an add-on to Forms if you don't want to write your own Java Bean. It can be used with Forms 9.0.4 and newer. It can be used with 902, but since 902 is no longer supported, this isn't recommended.
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm -
Calling SQL Loader using HOST command from Developer Forms 4.5
I want to execute a set of code from D2K Forms 4.5 which has interfface with Client - OS ( In my case Windows NT/XP). I want to execute SQL Loader from Forms using Host Command and then after completion of that process, I want to do next transcations ( depending upond success of HOST/SQL Loader).
How to achive this?
I tried writing code like this ...
l_vc_command := 'sqlldr73'
||' USERID='||l_vc_username||'/'||l_vc_password||'@'||l_vc_connect_string
||' CONTROL='||l_vc_filepath||'Upload.ctl'
||' DATA='||LTRIM(RTRIM(l_vc_fileloc))
||' LOG='||l_vc_filepath|| l_vc_log_file || '_' || l_dt_sysdate_str ||'.log'
||' BAD='||l_vc_filepath|| l_vc_bad_file || '_' || l_dt_sysdate_str ||'.bad'
||' DISCARD='||l_vc_filepath|| l_vc_discard_file || '_' || l_dt_sysdate_str ||'.dsc';
HOST(l_vc_command,NO_PROMPT);
After this command i want to do some other code execution. so even if it fails or success, next code is executed. How to control this?
Please help..
Regards,
MilindForms6i running on W2000, Rdbms 8.1.7
in Forms I added a button TEST,
Trigger when-button-pressed : host('test.bat') ;
in directory .......\frm I added file test.bat :
REM ===============
cd /d C:\........\ldr
pause
sqlldr parfile=test.par
pause
type test.log
pause
exit
REM ================
now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command. -
can anyone any one help me on this issue
i am trying to use host command in a.s which is running in unix o.s to rename one of the file i am using the below command but its not working . can any one tell me whats worng or how to perform this
the_command := 'mv /dir/filename1 /dir/filename2' ;
HOST(the_command,NO_SCREEN);I don't think you can do this with host like you did.
You can create a script which accepts filename1 and filename2 as parameters and call this
move.sh:
mv $1 $2
then call the script
host('/home/oracle/move.sh /dir/filename1 /dir/filename2', no_screen);
or if this doesn't work (in windows it works in 6i to call .cmd files without prefixing cmd /c don't know if this is also in unix, but you can try), you can call bash to do this
host('/bin/bash /home/oracle/and_so_on
regards
christian -
HOST Command in oracle forms 10g
Hi,
I need to use HOST command to run an OS(Unix) command in Oracle Forms 10g.
Its throwing a non-oracle exception during run time.
Is there any kind of configuration/settings that I need to check before using HOST command?
Is there any way to capture the error description?
Any help will be highly appreciated!
Thanks,
AnkitThanks Thangaraj for your valuable suggestion!!
One question though..
Should'nt ORACLE_HOME be an absolute path?
I have added "/bin" in FORMS_PATH but not sure if we can do the same with ORACLE_HOME.
Can you please suggest?
Regards,
Ankit -
Is there any incompatibility in using different JDBC and Oracle database versions?
Hi everybody,
I hope you can answer me ASAP.
Which version of JDBC driver for Oracle could I use to access an Oracle database version 8.0.4.3.0 running on a SUN machine?
Is it necessary to use the specific driver concerning to that version or could we use the JDBC version 8.1.6?
If we decide to use JDBC 8.1.6 to work against the 8.0.4.3.0 database, will we find any incompatibility or problem?
Thanks.
nullI don't know the answer to your question, but while looking for something else, I found a table listing "requirements and compatibilities for oracle jdbc drivers" that might answer your question:
http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83724/getsta1.htm#1008206
(My aologies if that URL gets broken apart by this posting software and you have to piece it together.)
Hope this helps. -
Internal Behaviour of Truncate Table Command in Oracle Database
Hi,
Can anyone let me know the internal behaviour of Truncate Table Command in Oracle Database?
Thanks,
Harshad.Hi Tuhinshoor,
I know the functioning of Truncate Command.
But, I needed to know whether it drops the table before recreating it, maintaining all the indexes and constraints intact??
Thanks,
Harshad. -
How to use host command for creating folders
i want to create a folder called abc in my C drive using forms 6i.
how can i do it using Host command?Host('MD C:\ABC');Francois
-
Running an SQR using HOST command
We are using Forms 10g and want to call sqr using the host command. The only way we can get this to work is to put the sqr call in a shell script which also contains all of the necessary environment variables and then use host to run that shell script.
I've tried putting the environment variables in default.env to no avail.
(This is a UNIX environment).
Is it possible to run an sqr directly using the host command?
host('sqr .....')
Thanks in advance!nope. You can use host command. And modify the shell script in such
a way that the results are written to a text file and read the result using
text io
Best regards
Rajesh ALex -
Run shell script using Host Command
How do I run Unix Shell Script using Host command?
Please help me......Are you running the shell script from the same box as the forms are deployed in? If not, then HOST call will try to execute on the machine where the forms are hosted(App server).
-
How to run a script from Oracle Form (Beside using HOST command)
I would like to run a script from Forms 6.0. I know that we can actually issue this command :
host('plus80.exe' username/password@connect_string @c:\scriptname);
BUT, is there any other alternative ?Sqlplus is a different program, so one way or the other you have to leave Forms to run sqlplus. What is you objection against HOST?
You can also run sqlplus from the database, but again you need a stored java procedure to call sqlplus (sort of HOST command that runs in the database).
Francois' solution works if your script just has a query to run, but if you have specific sqlplus commands (spool etc.) forms_ddl is probably not a solution. -
How can I use unix commands from oracle report
I have to use the following command from oracle reports.
In oracle forms we can use the HOST command but what about oracle reports2.5.
I have to email the attached file 100245.pdf from oracle reports to the given email id
uuencode 100245.pdf 100245.pdf | mailx -s "test" [email protected]Hi,
It's because .bat (or .cmd) files are scripts and not executables and are interpreted using the command line executable - which is normally cmd.exe (although you can buy others).
So you need to call cmd.exe passing the bat file name as a parameter, something like
cmd.exe /c batchfilename
Without the /c you will never get a response.
However, this brings us to the bizarre conclusion that you are going to:
call cmd.exe (a shell interpreter)
to launch a batch file
that calls cygwin (another shell interpreter)
which then runs ls
When shouldn't that just be:
call cmd.exe to run the dir command
Or better yet, If you are just after a file name listing and you seem to understand Java stored procs, why not just write a JSP to list the contents of a directory? No problems with OS dependant commands, scripts and 3rd party interpreters. Plenty of examples of that out on the internet as well.
HTH
Chris -
Using SQLplus command in LabView Database toolkit
Hi ,
I would like to ask something but before that this is my set up background
OS : Win 7,
LabVIEW : 2012
I have successfully connected with Oracle database using Labview Database toolkit.
The problem now is since I need to query the data from the database,
it will takes time for the labview to process it (since there is so much data in a specific table),
let say that the table in database is "Serial Number", and the data that I want from that table is "SN123"
if I query the data from that table, the labview will process it in a long time since it will not only give me "SN123" but also other data inside the "Serial Number" table.
(Refer to attachment)
but if in SQLplus, there is a command that can be execute to specifically call the "SN123" data,
For the SQLplus, the steps to retrieve the data is like this:
1. Key in the command to get the ID of the "SN123"
2. Key in the command "SN123" ID to retrieve the data.
I wonder if there is a way to put this command on labview database so it will be faster to retrieve the data.
Attachments:
Database.png 84 KBAn instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Maybe you are looking for
-
Why certain functionality works in Adobe Acrobat, but not in LiveCycle Preview PDF?
I have some simple logic in a LiveCycle form that will hide a subform when I click a checkbox. When I save as dynamic PDF and open in Adobe Acrobat 9, it works fine, but when I test the .xdp in LiveCycle Preview PDF it does not. I'm new to JavaScri
-
Changing ACS Administrative Port Number
Hi, Can I change the Port Number of 2002 of ACS to 2003? thanks.
-
hi ,i have a question for .Base on this example below , i need to understand some casting basic .I understand how premitives values widening rules works but not on object casting rules. Question 1. Okay ,base on the example below why 'c=(Test) a' wil
-
HOW DO I DELETE OR REMOVE AN IPHONE DEVICE FROM MY ITUNES ACCOUNT
how do i remove or delete a iphone from my itunes account when there is a muliple listing
-
MacOSXUpdCombo10.6.4 troubles...
I have just installed MacOSXUpdCombo10.6.4 and the following warning came up System extension cannot be used: The system extension "/System/Library/Extensions/N-Mon.kext" was installed improperly and cannot be used. Please try reinstalling it, or con