Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute a shell command inside SQL

Status
Not open for further replies.

tofuTnT

Technical User
Jul 17, 2003
67
US
Hi,

I wonder if there is anyway you can run a shell command inside SQL.
for example "SELECT * FROM table;execute shell command"
I had googled around and didn't find anything.

Regards,
tofuTnT
 
Geez, that wouldn't be a big security hole now would it?

Bastien

Cat, the other other white meat
 
Well, from what I searched on the internet, MSSQL has a stored procedure xp_cmdshell that does just that.
example:
exec master.dbo.xp_cmdshell 'copy c:\temp\doesnotexist.txt c:\temp\workfile.txt'

so i wonder if there something similar in MySQL.

Regards,
tofuTnT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top