SQL execution in server groups

If a server group has more than one connected servers, the Execute SQL menu is enabled. This menu allows you to run the same SQL command simultaneously on all servers in the group.

To execute SQL across the server group:

  1. Right click the svrGroup heading of the left pane in Sybase Central.

  2. Select Execute SQL from the drop-down list.

    Sybase Central displays the dialog box titled Server Group group_name SQL Execution, where group_name is the name of the server group on which you are executing SQL.

    The top half of this dialog box contains the names of all the servers in the server group and their status: status may be:

  3. Select the servers in the group on which you are running the query, or select from the buttons on the side of the dialog box:

  4. Enter the SQL text in the SQL Statements box. This is a standard editor, and includes cut, copy, paste, find and replace, find next, save, load for SQL text, and options (font, color change, and so on). Right click the pane for text options.

  5. Select Execute to run the query. The result set is displayed on separate tabs for each server in the server group. Select a server tab to bring it to the forefront.

  6. Review any messages in the Messages tab. Message tab records all queries you have run for this session and any errors that occurred.