adTempus Master-Agent configuration architecture - is SQL database required on Agent server

Guest
September 14, 2009 09:51 PM
Accepted Answer

We are trying to evaluate adTempus on two separate Servers (Master/Agent). In this case si the SQL Server database required on each Server or can one database by shared between two Servers.

So far we installed the software as follows

Server A - adTempus is installed as Master and connected to local SQL Server 2005 located on same server. This part seem to works OK after installing database manually (had to comment all sp_dboption statements at the begging of SQL db setup script adtempusdb.sql). We are able to connect using Console, create a test job, all seems to be working OK. We can also connect to Server A from desktop running Console and view Test Job on A

Server B - adTempus installed as Agent and configured to use SQL Database on Master (removed UserID and Password from Registry). Problem is that when we connect using console to Server B it shows job from Server A. Is this a problem because adTempus requires own local database located on each server to store jobs IE Single SQL Server installation cannot be shared between server?

This topic has an accepted answer. Jump to it.
Bill Staff (599 posts)
September 15, 2009 07:16 AM
Accepted Answer

The master and agent each must have their own database. They can share the same database server, but each must have its own database. This is because the agent keeps a local copy of its data.

You need to run the database configuration tool (adtdbconfig, found in the adTempus "database" subdirectory) to create a new database for the agent.

We generally suggest that you install and use SQL Server Express on the Agent, as this removes the dependency of the Agent on the remote computer hosting SQL Server. See article K00000357 for instructions on how to install SQL Server Express without reinstalling adTempus.

I have made a note that we need to update the installation guide to explain the database requirements for distributed scheduling.

Peter Sek (9 posts)
September 15, 2009 08:03 PM
Accepted Answer

Thanks for prompt response

The Agent server now has SQL Express. All seems good after un-install both Master A and Agent B, removed Registry Keys and re-installed both master and Agent with SQL Express I manually configured NT Service for adTempus on both Master and Agent servers is configured to login using Service Account instead Local Account System. Master is still using local instance of SQL Server (developer) 2005. I subsequently created Remote Agent for B, new Queue for B etc and added new job with 1 step to this queue and all seems GOOD

In a test Job step I am trying to execute batch command E:\test.bat which contains simple redirect 'a >test.txt'. Start in e:\. To be sure I placed text.bat on both servers in same location E:\. Job is configured to 'User Account = Service Account'

Console reports error 'This program could not be started A required privilege is not held by client ||| (1314)'

I am able to execute text.bat manually using service account

What we are trying to do is to, from Master, be able to execute a batch file located on Agent. This batch file has a series of commands including execute EXE which is only installed on Agent computer. A kind of Remote Procedure Call. 

Question-When I submit this job is this batch file transferred to Agent and executed on Agent server? Do I need to add \\Agent server Id\e\path to\test.bat to Job Resources  www.arcanadev.com/adtempus/documentation/3.0/default.htm#concepts/distributed/adTempus_Mode_Utility.htm

Thanks

Peter Sek (9 posts)
September 15, 2009 08:55 PM
Accepted Answer

Hi Bill

I reconfigured the job/step to use \\unc patch but I am still getting same error 'This program could not be started A required privilege is not held by client ||| (1314)  

Job - User Account = Service Account, this has Admin access to both Master and Agent servers

Job - Resource = \\AgentServer\ShareName\ Step Target = \\AgentServer\ShareName\test.bat

Step - Startup Dir = \\AgentServer\ShareName\  

To be sure I added the Service Account to \\AgentServer\ShareName\ with 'full permissions'  

Any suggestions would be appreciated, Thanks

 

Bill Staff (599 posts)
September 15, 2009 09:05 PM
Accepted Answer

adTempus can only execute software that is installed on the same computer. So the Master cannot execute software installed on the Agent. You need to have a job on the Agent that runs the local batch file and the local application. If the batch file is stored on the Agent and you run it from the Master using a UNC path, the batch file will execute, but it will fail as soon as it tries to run a program that's not installed on the Master. To reiterate: adTempus does not do remote execution, it only executes programs that are installed on the same computer.

The privilege error is an entirely separate issue and is happening because you changed the adTempus service to run under a user account but did not give that account the necessary privileges. See KB article K00000213 for information.

 

Peter Sek (9 posts)
September 16, 2009 11:56 PM
Accepted Answer

Hi Bill

Thanks, our requirement is to be able to run from Server A a job on Server B. Currenlty we are doing this by triggering NT ScheTask on B from SQL Job running on A. In you message  I am not clear what you mean by 'You need to have a job on the Agent'? Is that still in Master-Agent adTempus configuration. Or do you mean to install separate Standalone adTempus on each server a,b and use 3rd pary tools to trigger job on B from A (eg PsTools)

FYI - on our server B (agent) we are trying to run SAS DI Jobs via a wrapper batch file from A - just in case there is some outer way achieving this

Bill Staff (599 posts)
September 17, 2009 06:12 AM
Accepted Answer

Now that I reread your previous post, I misunderstood your question. It sounds like you were doing fine, aside from the privilege problem, until I confused you,

To run the batch file on server B, you need to set up the job on the Master and assign it to the Queue that runs on server B. I think you've already done this part. The batch file needs to already exist on server B--adTempus does not copy anything from the Master to the Agent. When you specify a path in the job setup, the path must be valid on the computer where the job will execute.


Peter Sek (9 posts)
September 17, 2009 11:25 PM
Accepted Answer

It works after our server support guys increased the privileges for share/directory on B where the batch file is located (as described in one of you support pages/ealier post)

FYI 'start in' path needs to be defined either by entering CD E:\... at the start of bat file OR defining E:\... path in Job-Step definition. (UNC did not seem work here but this might be an issue with command in bat file)

Strangelly Job-Step start in path needs to be path of B server (eg E:\...) but when I click 'browse' button next to the text box it browses files on A server

Thanks for your assistance

Bill Staff (599 posts)
September 19, 2009 11:48 AM
Accepted Answer

The "Start In" needs to be set if your batch file assumes a particular working directory. We will be making a change in the future to default to the directory where the program/batch file is located, if  nothing is set. Right now it ends up being system32 if you don't set anything.

UNC paths cannot be used in the startup directory--that's a Windows limitation.

The Browse button shows files from whatever server you are connected to, in this case the Master. It doesn't browse on the Agent because you could have more than one Agent assigned to the job.


Peter Sek (9 posts)
October 5, 2009 10:51 PM
Accepted Answer

Hi Bill

We are experiencing a problem - we are testing error capture from a Program executed via batch file

When we execute a program (that raised error) directly from adTempus the job reports  error (good)

When we put same program inside a wrapper dos batch file (as a last line) the error raised by program it is not passed to adTempus from the batch file thus job reports sucess (not good)

Is there a Knowlege Base describing how to pass error from a program thru batch file to adTempus? 

BTW We currenlty have SAS consultant evaluating using adTempus to do SAS DI extracts. Due to how things are setup we pretty much have to use a wrapper batch file to call SAS

 

Bill Staff (599 posts)
October 6, 2009 01:11 PM
Accepted Answer

The exit code that gets returned from a batch file is the exit code of the last statement to be evaluated in the batch file. If you have anything at all in the batch file after your program (including "rem," "echo," "goto," etc., these will reset the exit code for the batch file to 0.

So if you have:

somecommand.exe
goto end
someothercommand
:end

and "somecommand.exe" returns with exit code of 100, the batch file is still going to have an exit code of 0 because of the goto statement. Instead you need to exit immediately after the program, using an "exit" statement.

I've just noticed, however, that the ERRORLEVEL variable remains set to the result of the program--it's not affected by running batch commands. You can use this to force the exit code of the batch file, as follows:

somecommand.exe
goto end
someothercommand
:end
exit /b %ERRORLEVEL%

The /b switch causes the batch file to exit with a specified exit code; the %ERRORLEVEL% variable is replaced with the exit code from "somecommand.exe".

 


Peter Sek (9 posts)
October 7, 2009 06:42 PM
Accepted Answer
thanks a lot, It works OK
Peter Sek (9 posts)
October 8, 2009 11:57 PM
Accepted Answer

Hi Bill

I scheduled new job to run on Master and to execute SQL server job. This SQL Job runs OK from Enterprise Manager under ServiceAccount

adTempus job is assigned to default queue and both and sql step job runs under ServiceAccount

When I run this job from adTempus I get an error 'an internal error has occured...Please contact TechSupp and provide xxx dump file'. Would you be able to look at this dump file, how can i send it to you?

thanks

Peter

 

Bill Staff (599 posts)
October 9, 2009 07:04 AM
Accepted Answer
Please submit a support request for further assistance with this.

Replies are disabled for this topic.