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!