Problems caused by calling external EXE execution programs in SQL Server, sqlserver

Source: Internet
Author: User

Problems caused by calling external EXE execution programs in SQL Server, sqlserver

1. Enable xp_cmdshell first

Open the peripheral application configurator->

Function Peripheral application configurator->

Instance name \ Database Engine \ xp_mongoshell->

Enable

Ii. Solution

Use master Exec xp_mongoshell 'mkdir d: \ csj' -- call the DOS command to create a folder. (The execution is successful !)
Exec xp_cmdshell 'C: \ calc.exe '-- call the exe file (but the execution of the exe file always displays "query in progress ")

Iii. Problems

The above [calling the exe file (but executing the exe file always displays "executing the query")] may occur because, the exe program is not important for Automatic Execution and automatic exit. Refer to the following tips:

Notes:

1. Permission

The execution permission of xp_deletemail is granted to members of the sysadmin fixed server role by default, but other users can be granted.

2. Execution Method

Xp_mongoshell operates in synchronous mode. No control is returned before the command of the command line interpreter is executed.

3.You cannot execute commands for user interaction. For example, if you execute a program that requires user input or close operations such as Notepad, the program will be suspended.

4.If the program is to bring up the user interface, the user interface will not pop up

The above section describes the problems caused by calling external EXE execution programs in SQL Server. I hope it will be helpful to you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.