Host commands on server via JDBC link

Host commands on server via JDBC link

Post by Pandora New » Tue, 12 Jun 2001 23:42:31



Hi,

I have a client application that connects with JDBC to an Oracle8i database;
it should start a stored procedure (no problem here) as well as a unix shell
script (major problem there). I don't know how to execute the host command
on the server, I thought by starting a script from a stored procedure my
problem would be solved but then again I can't make this stored procedure.
Is there maybe another way to execute host commands via a JDBC link?

Any help would be greatly appreciated,
Filip Humbl

 
 
 

Host commands on server via JDBC link

Post by Bastiaan Schaa » Wed, 13 Jun 2001 14:36:54


Hello Filip,

I don't know if it is the best way to do it, but you *can* write a stored
procedure that runs shell scripts by using dbms_pipe. Although this also
requires that you write a little deamon program in pro*C, that will 'listen'
to a message queue in which your stored procedure writes messages. A long
time ago when we didn't have Oracle 8i, we used this method to send email
directly from the Oracle 7.3 database. I remember there were excellent
examples in the Oracle 7.3 Developers guide.

If there aren't any other good suggestions, try to find some good info on
the dbms_pipe sys-package. I remember that with the examples from the
developer's guide from Oracle I had a little email-deamon functioning in 3
hrs. I believe for just executing a shell script, there are ready made
examples....

HTH,

Bastiaan Schaap

________________________________
"Happiness is a belt-fed weapon"

 
 
 

Host commands on server via JDBC link

Post by Vinayak Kulkarn » Thu, 14 Jun 2001 12:18:53


I suggest you have a look at the external proc method to call a lame c
function that just exec ur input parameter.

HTH,
Vinayak


Quote:> Hello Filip,

> I don't know if it is the best way to do it, but you *can* write a stored
> procedure that runs shell scripts by using dbms_pipe. Although this also
> requires that you write a little deamon program in pro*C, that will
'listen'
> to a message queue in which your stored procedure writes messages. A long
> time ago when we didn't have Oracle 8i, we used this method to send email
> directly from the Oracle 7.3 database. I remember there were excellent
> examples in the Oracle 7.3 Developers guide.

> If there aren't any other good suggestions, try to find some good info on
> the dbms_pipe sys-package. I remember that with the examples from the
> developer's guide from Oracle I had a little email-deamon functioning in 3
> hrs. I believe for just executing a shell script, there are ready made
> examples....

> HTH,

> Bastiaan Schaap

> ________________________________
> "Happiness is a belt-fed weapon"

 
 
 

1. Executind commands from MSSQL server to Oracle via Linked Service

Hi all.
I have encountered problem, i can' solve at the moment. May be someone
can offer me solution or advice...
I am to execute some commands to Oracle server from MSSql server(like
call some procedure and insert some data in some tabels).
I've created Linked Server to Oracle, and even was able to get some
data via it. But the executing... I have found a lot of information in
helps and forums about getting information via linked server, but no
information about executing commands or calling procedures. All i've
found is possibility to run function in oracle with use select... but
i can't insert or do smth like this while selecting data from Oracle.
Can anyone give me some advice how can i do this. May be Linked Server
is not useable for this, may be i am to use some other method?

2. Get Max date within same record

3. Urgent: Checking status of SQL/PLUS - via HOST command

4. ARCserveIT's DB Agent for SQL Server does not work:

5. EXECUTE HOST COMMAND FROM ORACLE7 SERVER-SIDE PL/SQL ENGINE

6. Strange SQL Server Error

7. Missing Stored Procedure

8. EXECUTE HOST SYSTEM COMMAND FROM ORACLE7 SERVER-SIDE PL/SQL

9. Linking tables via JDBC?

10. SQL Server ---->Access 97 DB via Linked Server

11. Question: SQL Server 7/2000 with linked server via ODBC

12. Problem inserting into DB2 from SQL Server via Linked Server