Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #2098

Re: MS SQL Server: run external program

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver, comp.databases.ms-access
Subject Re: MS SQL Server: run external program
Followup-To comp.databases.ms-sqlserver
Date Fri, 30 Jul 2021 10:24:27 +0200
Organization Erland Sommarskog
Lines 32
Message-ID <XnsAD7769DEE4408Yazorman@127.0.0.1> (permalink)
References <XnsAD76816DCF4AFammammatatiscalineti@127.0.0.1> <imfl3pFios7U1@mid.individual.net>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info reader02.eternal-september.org; posting-host="70ad848117a8a2211e7ec9b26160cf12"; logging-data="6756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198ZbSdUmETPsv18wDLxyEa"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:fhTVNBf1as0tqu5MM3GZG3wqPwg=
Xref csiph.com comp.databases.ms-sqlserver:2098 comp.databases.ms-access:14334

Cross-posted to 2 groups.

Followups directed to: comp.databases.ms-sqlserver

Show key headers only | View raw


J.O. Aho (user@example.net) writes:
> On 29/07/2021 12.43, Ammammata wrote:
> Hi there,
> this is a MySQL forum and has nothing to do with mssql or ms-access, so 
> adding c.d.ms-sqlserver and c.d.ms-access which also been follow-up to.
> 
> 
>> I'm trying to run MS Access runtime, with my procedure and an additional
>> parameter
>> 
>> the command line is
>> MSACCESS.EXE c:\Sviluppo\QCT\QCT1000.mdb ;255
>> 
>> without path, being it already included in the PATH variable

In *your* PATH variable. SQL Server runs under a service account, so 
it does not have your PATH.

>> If I include the path in the command line
>> 
>> EXEC xp_cmdshell '"C:\Program Files\Microsoft 
Office\Office16\MSACCESS.EXE"
>> c:\Sviluppo\QCT\QCT1000.mdb ;255';
>> GO
>> 
>> it goes into a loop and I have to kill MSSMS to exit
 
So when you run that command line directly, what happens? Specifically, 
does it open a UI?

SQL Server runs as a service and does not have a desktop, so running 
anything which has a UI is not going to work out.

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: MS SQL Server: run external program "J.O. Aho" <user@example.net> - 2021-07-29 14:26 +0200
  Re: MS SQL Server: run external program Erland Sommarskog <esquel@sommarskog.se> - 2021-07-30 10:24 +0200
    Re: MS SQL Server: run external program Ammammata <ammammata@tiscalinet.it> - 2021-07-30 08:42 +0000

csiph-web