On the master server, expand the Enterprise Manager hierarchy so that you can see SQL Server Agent, Jobs. After you configure the server as a master server, the Jobs item splits into Local Server Jobs and Multi Server Jobs, as Figure 2 shows. The SQL Server Agent now has (MSX) next to it, meaning that this SQL Server Agent is running on the master server. You don't need to do anything further to set up the target server; setting up the master server automatically configures the target server. On the target server, SQL Server Agent now has (TSX) next to it and the master server's name. The SQL Server Agent (TSX) entry also shows the Jobs item split into Local Server Jobs and Multi Server Jobs.
Adding and Removing Target Servers
As your network grows, you might need to add more target servers to provide the additional resources that a growing network needs. To add target servers from the master server, follow the same steps you used to set up the master server initially. Note that when you right-click SQL Server Agent and select Multi Server Administration, you now have the options of managing or adding target servers. If you're connected to the new target server in Enterprise Manager, you can right-click the SQL Server Agent, select Multi Server Administration, then choose the option Make this a Target.
Keep in mind that when I talk about making changes on any SQL Server system, you don't have to be physically present at the server. As long as you can register the system in Enterprise Manager and you're a member of the system admins role, you can administer the system and make changes remotely. So, when I talk about making changes at the master server or at the target server, I'm referring to the server you're connected to in Enterprise Manager.
Removing a target server is called defecting a target server. You can remove a target server from the master server's list of target servers through the Multi Server Administration, Manage Target Servers option, then choosing the Force Defections button. Or you can remove it from the target server's Enterprise Manager, again through Multi Server Administration. On the target server, the only administrative option you have is to defect.
Setting Up a Multiserver Task
Adding a new job or task in a multiserver environment is done in much the same way that you would typically add a job. Right-click Multi Server Jobs and select New Job to get the New Job Properties dialog box. The difference is that with multiserver tasks, you must pay attention to the options on the General tab, which Figure 3 shows, on which you can specify whether this job is to Target local server or Target multiple servers. (For a discussion of how to set up jobs and the associated operators and alerts, see Certifiably SQL, "Lab Files: Defining Jobs," May 2000, http://www.sqlmag.com, InstantDoc 8760, and Certifiably SQL, "Lab Files: Alerts and Operators," April 2000, http://www.sqlmag.com, InstantDoc 8576.)
To select the servers you want this job to run on, click Change to get a list of target servers. You can send the job to all the target servers or to a subset of target servers, as Figure 3 shows. You might need to select a subset of target servers because each server could have its own set of unique databases, so you must create jobs to target each database individually. Another reason you might pick a subset is that a job's schedule applies to all the servers to which you assign the job, and you might want the job to run at different times on different groups of servers. Keep in mind that the target server downloads the scheduling instructions and executes them locally. So, for example, if you schedule a backup of the master database for 1:00 a.m. on Sunday, each target server would run the job at 1:00 a.m. local time. That's why you can check the time on each target server from within the Multi Server Administration dialog boxes.
While the Job Properties dialog box is open, click the Notifications tab. When you select a box to email, page, or Net Send for this job, note that the operator to notify automatically becomes the MSXOperator. Even if you've defined other operators, you can't select them.
The target servers actually drive the downloading of instructions to run multiserver tasks, polling the master server every minute (by default). This constant polling increases the master server's load, so you wouldn't typically want to use one of your essential production servers as the master server. When a target server finds a new set of instructions assigned to it, the target server downloads the instructions and schedules the job for the specified time. Possible instructions include setting up a job, deleting a job, or changing the polling interval. The job runs on the target server at the scheduled time, then the target server sends a message to the master server that reports the job's success or failure.
Prev. page
1
[2]
3
next page