How to call a shell application from an SQL stored procedure?

I am trying to call a notepad or calculator from a stored procedure. can anyone help?

+3
source share
3 answers

What database will it be for?

For MySql, you can write UDF (User Defined Function - See http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html ) for this, or use the ready-made UDF repository from the repository. See http://www.mysqludf.org/lib_mysqludf_sys/index.php . See the sys_exec Function, as well as the section labeled “Caution Note”; -)

Microsoft SQL . xp_cmdshell : http://msdn.microsoft.com/en-us/library/aa260689%28SQL.80%29.aspx

+2

xp_cmdshell .

. xp_cmdshell.

0

There are ways to do this in Oracle PL / SQL. Google: Oracle "External Procedures" or start here:

Oracle External Procedures

As a result, you call SHELL32.DLL and tell it to open Notepad.

0
source

Source: https://habr.com/ru/post/1733876/


All Articles