Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

One Bell System - it sometimes works.


devel / comp.databases.ms-access / Re: MS SQL Server: run external program

SubjectAuthor
* Re: MS SQL Server: run external programJ.O. Aho
`* Re: MS SQL Server: run external programErland Sommarskog
 `- Re: MS SQL Server: run external programRon Paii

1
Re: MS SQL Server: run external program

<imfl3pFios7U1@mid.individual.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=465&group=comp.databases.ms-access#465

 copy link   Newsgroups: comp.databases.mysql comp.databases.ms-access comp.databases.ms-sqlserver
Followup: comp.databases.ms-sqlserver,comp.databases.ms-access
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: use...@example.net (J.O. Aho)
Newsgroups: comp.databases.mysql,comp.databases.ms-access,comp.databases.ms-sqlserver
Subject: Re: MS SQL Server: run external program
Followup-To: comp.databases.ms-sqlserver,comp.databases.ms-access
Date: Thu, 29 Jul 2021 14:26:33 +0200
Lines: 60
Message-ID: <imfl3pFios7U1@mid.individual.net>
References: <XnsAD76816DCF4AFammammatatiscalineti@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Jl6NQ0n22PnZmcu0z11DXwya6mANer8v4lWHj8WuoNe5oAFuP7
Cancel-Lock: sha1:YZnzWJ3bKBKc1zG6h0u8cxYJfnQ=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
In-Reply-To: <XnsAD76816DCF4AFammammatatiscalineti@127.0.0.1>
Content-Language: en-US-large
 by: J.O. Aho - Thu, 29 Jul 2021 12:26 UTC

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

Maybe that is your account users PATH and not the system PATH. There is
a creepy GUI that you can use and check that.

> when I try this command from within MSSMS
>
> EXEC xp_cmdshell 'MSACCESS.EXE c:\Sviluppo\QCT\QCT1000.mdb ;255';
> GO
>
> I get the error:
>
> output
> 'MSACCESS.EXE' is not recognized as an internal or external command,
> operable program or batch file.
> NULL

You need to give the full path to the MSACCESS.EXE or see to that the
service user that runs the mssql has the correct path set in PATH. Don't
forget to restart the service after change in the environment variables.

>
> 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
>
> Note that I'm not sure how to use "" because of the space in the path
> between words Microsoft and Office

Looks ok, as microsoft made a bad choise to use \ as directory divider
instead of /, so they couldn't escape characters as in most other
operating systems with the backslash.

> Any suggestion is welcome

Switch to a proper OS and a better database

--

//Aho

Re: MS SQL Server: run external program

<XnsAD7769DEE4408Yazorman@127.0.0.1>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=469&group=comp.databases.ms-access#469

 copy link   Newsgroups: comp.databases.ms-sqlserver comp.databases.ms-access
Followup: comp.databases.ms-sqlserver
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: esq...@sommarskog.se (Erland Sommarskog)
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>
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=
 by: Erland Sommarskog - Fri, 30 Jul 2021 08:24 UTC

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.

Re: MS SQL Server: run external program

<1d927f68-f159-425f-b590-bcdf216ae352n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=470&group=comp.databases.ms-access#470

 copy link   Newsgroups: comp.databases.ms-access
X-Received: by 2002:a05:6214:d4d:: with SMTP id 13mr2308655qvr.42.1627646712603; Fri, 30 Jul 2021 05:05:12 -0700 (PDT)
X-Received: by 2002:a5b:286:: with SMTP id x6mr2464627ybl.59.1627646712435; Fri, 30 Jul 2021 05:05:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.databases.ms-access
Date: Fri, 30 Jul 2021 05:05:12 -0700 (PDT)
In-Reply-To: <XnsAD7769DEE4408Yazorman@127.0.0.1>
Injection-Info: google-groups.googlegroups.com; posting-host=65.30.79.18; posting-account=RurhpQoAAACBjKrwaxvElRMdPO3AZiPP
NNTP-Posting-Host: 65.30.79.18
References: <XnsAD76816DCF4AFammammatatiscalineti@127.0.0.1> <imfl3pFios7U1@mid.individual.net> <XnsAD7769DEE4408Yazorman@127.0.0.1>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1d927f68-f159-425f-b590-bcdf216ae352n@googlegroups.com>
Subject: Re: MS SQL Server: run external program
From: ron81...@gmail.com (Ron Paii)
Injection-Date: Fri, 30 Jul 2021 12:05:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 39
 by: Ron Paii - Fri, 30 Jul 2021 12:05 UTC

On Friday, July 30, 2021 at 3:24:32 AM UTC-5, Erland Sommarskog wrote:
> J.O. Aho (us...@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.

If you are using Access 2016 or newer with Office 2016 or newer you will need to account for click to run versions.

for 2016 click to run:
C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE

for 2016 normal
C:\Program Files (x86)\Microsoft Office\Office16\MSACCESS.EXE

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor