Contents Index sp_drop_sql_remote procedure sp_grant_remote procedure

SQL Remote User's Guide
  Command Reference for Adaptive Server Enterprise

sp_grant_consolidate procedure


Purpose 

To identify a database immediately above the current database in a SQL Remote hierarchy, who will receive messages from the current database. This procedure applies only to Adaptive Server Enterprise databases acting as remote databases.

Syntax 

sp_grant_consolidate user_name,
type_name,
address
[, frequency ] 
[, send_time ]

Argument Description
user_name The user ID who will be able to receive SQL Remote messages.
type_name The message type to be used. This must be one of the following:
  • file

  • ftp

  • smtp

  • mapi

  • vim

address A string holding the address, according to the specified message type, to which the replication messages should be sent for this user.
frequency A string containing one of the following:
  • SEND EVERY    Indicates that messages are sent at a frequency specified by send_time.

  • SEND AT    Indicates that messages are sent at a time of day specified by send_time.

send_time A string containing a time specification with the following meaning:
  • If frequency is SEND EVERY, specifies a length of time between messages.

  • If frequency is SEND AT, specifies a time of day at which messages will be sent.

If no frequency is specified, the Message Agent sends messages, and then stops.
See also 

sp_grant_remote procedure

sp_revoke_consolidate procedure

GRANT CONSOLIDATE statement

Description 

If the Adaptive Server Enterprise server is acting as a remote database in a SQL Remote installation, the single database above the current database must be granted consolidated permissions using the sp_grant_consolidate procedure.

The consolidated user is identified by a message system, identifying the method by which messages are sent to and received from the consolidated user. The address-name must be a valid address for the message-system, enclosed in single quotes.

The sp_grant_consolidate procedure is required for the remote database to receive messages, but does not by itself subscribe the remote user to any data. To subscribe to data, a subscription must be created for the user ID to one of the publications in the current database.

The optional frequency argument specifies a frequency at which messages are sent. The send_time argument contains a time that is a length of time between messages (for SEND EVERY) or a time of day at which messages are sent (for SEND AT). With SEND AT, messages are sent once per day.

If no frequency argument is supplied, the Message Agent processes messages, and then stops. In order to run the Message Agent continuously, you must ensure that every user with remote or consolidated permission has a frequency specified.

Example 

Contents Index sp_drop_sql_remote procedure sp_grant_remote procedure