Because the Job Scheduler agent runs outside of Adaptive Server, target servers consider it a remote user. Consequently, you must define each target server (even when the target server is the server where the Job Scheduler is installed) and login to the local server, which is where Job Scheduler is installed.
Setting up access to target servers
Create a directory services entry for each target server using dscp, dsedit or a text editor as appropriate to your directory services setup:
�target_servername� master tcp ether targetserver_machine port_number� query tcp ether targetserver_machine port_number
where:
target_servername
is
the name of the server on which you want to schedule and run a job.
targetserver_machine is the name of the machine on which you want to schedule and run a job.
port_number is the port on which JS Agent connects to the target server.
See the System Administration Guide, Volume 1, for more information on directory services.
On the Adaptive Server running Job Scheduler, create an entry in the sysservers table for each target server on which you want to run a job. A target server can be remote or it can be the Job Scheduler server itself. In both cases, you must add an remote entry for the target server in the sysservers table.
Remote target server: Use sp_addserver to
add a remote target server. The server class you add must be ASEnterprise
:
sp_addserver target_servername, ASEnterprise, directoryservices_name go�
where:
target_servername
is
an alias for the local server. When you install Job Scheduler with
Adaptive Server, “loopback” is used as the alias
for the server running Job Scheduler.
directoryservices_name is the name used for the local server in the directory services file.
A remote target server can be the same server as your Job Scheduler installation.
Local (the server running Job Scheduler) target server: The sysservers table already contains a local reference to the server where Job Scheduler is installed; however, to allow this server to be a target server, you must create a remote entry for the server in the sysservers table:
sp_addserver target_servername, ASEnterprise, directoryservices_name go
where:
target_servername is the server on which you want to schedule and run a job, in this case, the local (Job Scheduler) server.
directoryservices_name is the name used for this target server in the directory services file.
Add logins for Job Scheduler users using sp_addexternlogin:
sp_addexternlogin target_servername, localname, remotename, remotepwd� go�
where:
target_servername
is
the server on which you want to schedule and run a job.
localname is the user's login name on the Job Scheduler server.
remotename is user's login name on the target server.
remotepwd is user's password on the target server.
You must add external logins for all users for all target servers, even if the target server is the server where Job Scheduler is installed.
You can now create jobs, schedules, and scheduled jobs using stored procedures from the command line or using the Sybase Central ASE plug-in. See Chapter 5, “Command Reference,” for more information on Job Scheduler stored procedures. See Chapter 6, “Managing Job Scheduler in the Sybase Central ASE Plug-in,” for more information on using Job Scheduler with Sybase Central.