The code is not supplied by Control-M, it is the feedback from the OS.
Also note that is sometimes better to run these as job type = cmd. This will also help in working out the issue, you can run a string of commands to see what the environment is, etc.
Thanks Mark for the quick reply.
Yep, the code seems to be returned by the OS rather than Control-M, but the funny part is that this does not occur when running it either manually or by the task scheduler, but cannot find this code anywhere in the internet either.
On running this as command, we just tried, but the result is the same. Guess we´re back to square one.
Try this command =
echo %USERNAME% && pushd "d:\FTP\Babel\Scripts\Oracle_to_CSV\bin\Debug\" && Oracle_to_CSV.exe && popd
Is the userid expected to be PAR001UA$ ? Is that possibly the server name instead?
1 of 1 people found this helpful
Hello @Mark Francome, thanks for keeping on trying to help us, that´s really cool of you!
Yep, we tried with all we could throw in... that particular capture is when we used the server name, but yet the same result comes out when using the USERID:
We also tried putting the exe as the only command line within a .bat file, and the results is this same error -6232576...
3 of 3 people found this helpful
What I pretty much think this is:
It is related to the fact controlm windows agent behave when it is set to start as "SYSTEM" and due to that no execution process can get outside of the box over the network differently when you start it as "This user" where the agent can execute processes that cross over different windows boxes.
I am guessing this binary " kind of " connect with external DB box and extract some data from DB and converts it to csv? Am I right? Would you be able do describe how it process it's exec?
So, if that is the case, I would recommend you to define a domain user with the appropriate Rights and use it to start the controlm service. Also, define a domain user with the appropriate Rights to run batches and fill it in the Job "run as" field and add it to "run as" users. Those steps will allow the agent service to cross boxes when performing jobs execution on behalf of the run as user.
Or as an option, if you have access to the windows box when the binary runs with the same account defined on " run as " field, do the following:
With the service checked as "SYSTEM" and "interact with desktop" , trigger the defined the job from controlm. You may want to add " timeout" as last command, so you can have enough time to notice the cmd box popping up on the windows host and the track the interactive session happening.
I am pretty much sure that this will help you troubleshoot.
1 of 1 people found this helpful
@Adriano Gomes, many thanks for this tip.
Yes! Indeed the process is trying to access an external DB to the box where the exe runs, and it makes a lot of sense this is an authorization issue.
I have discussed this internally with the team who can apply it ant they agree this looks like a way forward; we´ll give it a shot and report back on how it goes.
Sorry, I thought you were already using the correct userid. In my experience specific userids are required in these circumstances;
1. When trying to access networked files (e.g. net use).
2. When interacting with a security related product (e.g. intrusion detection).
3. DB access (as here).