View Full Version: Remote Lawson Command Execution

LawsonTalk > Other > Remote Lawson Command Execution



Title: Remote Lawson Command Execution
Description: How to Execute Lawson Commands Remotely


andym - April 10, 2006 09:04 AM (GMT)
Hi, is there a way to execute Lawson commands on the Lawson server remotely, i.e. from our integration server? We're designing interfaces using a 3rd party ETL tool and we would like it to initiate jobs or commands on the Lawson server once it has formatted and delivered the Lawson upload file. We have tried rcmd as part of the windows nt resource kit to initiate remote commands, but they work intermittenly with the following Lawson errors:
File USERTEST/APCVENMAST.

OpenDBFile2 error is Unable to communicate with database driver process (99).

Additional information is 1173.

Message using scheduled task...

File GEN/EXECUTABLE.

OpenDBFile2 error is Unable to communicate with database driver process (99).

Additional information is 1172.

Here is an excerpt from a GSC ticket I have logged with Lawson, which hopefully describes my question in more detail:

We are integrating Lawson with an ETL tool, which will facilitate all system integration/interfacing within our organisation. The ETL tool will be responsible for collecting foreign data and then formatting it into a Lawson API format, before copying the file to the Lawson Application Server. Is it possible to execute Lawson commands remotely in ordre for job on the ETL server to invoke an upload into Lawson?
Example:

We want to execute importdb -a usertest apcvenmast %1 >armtest.txt
and jqsubmit janeba jbap510r from a remote server.
We have installed rcmd on the server in order to run remote commands and it works intermittenly on the ETL server. The error is: File USERTEST/APCVENMAST.

OpenDBFile2 error is Unable to communicate with database driver process (99).

Additional information is 1173.
Message using scheduled task...
File GEN/EXECUTABLE.
OpenDBFile2 error is Unable to communicate with database driver process (99).
Additional information is 1172.

Install rcmdsvc.exe on the Lawson App Server
Install rcmd.exe on the 'another' server
Both files are part of the w2k03 or nt4.0 resource kit.
From the 'another/remote' server, try to execute Lawson commands on the Lawson App Server, e.g. rcmd \\servername importdb -a usertest apcvenmast >armtest.txt

The above example works, but only intermittently with the described errors.

Does this make sense? Any ideas?

bags - April 10, 2006 11:20 AM (GMT)
I haven't tried this and don't know if it would work any better than rcmd, but you might want to take a look at psexec from SysInternals (www.sysinternals.com). It is part of their PsTools suite. I've used it in the past to execute commands and scripts remotely, but have never tried executing Lawson commands.

andym - April 10, 2006 12:25 PM (GMT)
Further investigation and indication of why this doesn't work 100% of the time. When you execute importdb.exe on the Lawson Application Server with no parameters(i.e. to bring up the help), it executes an msfdb2000.exe, which runs under UID Lawson. When you execute the command remotely, if doesn't invoke the msfdb2000.exe, however it does use the one already in process if there is one there. Conclusion is, if you execute importdb locally, it will run as a msfdb2000 process for about 2 minutes. All remote executions will work as long as this process running locally is running. However, if this process is not running, then it will not work remotely.

Any ideas?

schroncd - April 10, 2006 10:09 PM (GMT)
First off let me say that I am NOT a Windows user and have no clue what a large portion of your posting means, but I have an idea that just might work.

Instead of remotely running a command, why not remotely create a batch file containing the command parameters and the appropriate env variables - then remotely send an AT command to run the batch file (locally) in say... 1 minute...

Completely untested and I may not even be in the right ballpark, but it's an idea...




Hosted for free by InvisionFree