To create the message type

1.In Interactive SQL, create the file message type using the following statement:

CREATE REMOTE MESSAGE

TYPE file

ADDRESS ’hq’

The address (hq) for a file link is a directory in which files containing the message are placed. It is taken relative to the SQLRemote environment variable or registry entry. As you have not set this value, the address is taken relative to the directory from which the Message Agent is run. You should run the Message Agent from your tutorial directory for the addresses to be interpreted properly.

For information about setting the SQLRemote value, see “Setting message type control parameters” on page 214 .

Grant PUBLISH and REMOTE at the consolidated database

 

In the hierarchical replication system supported by SQL Remote, each

 

database may have one consolidated database immediately above it in the

 

hierarchy and many databases immediately below it on the hierarchy

 

(remote databases).

 

PUBLISH permission identifies the current database for outgoing messages,

 

and the REMOTE permission identifies each database receiving messages

 

from the current database.

 

Permissions can only be granted by a user with DBA authority. To carry out

 

these examples you should connect using the Interactive SQL utility to hq as

 

user ID DBA, with password SQL.

GRANT PUBLISH to

Each database that distributes its changes to other databases in the replication

identify outgoing

system is a publisher database. Each database in the replication system that

messages

publishes changes to a database is identified by a single user ID. You set that

 

ID for your database using the GRANT PUBLISH statement. This section

 

describes setting permissions for the consolidated database (hq.db ).

To create a publisher for the database

1.Connect to the database using Interactive SQL, and type the following statement:

GRANT CONNECT

TO hq_user

IDENTIFIED BY hq_pwd ;

GRANT PUBLISH TO hq_user ;

42

Page 60
Image 60
Sybase DC38133-01-0902-01 manual To create the message type, Grant Publish and Remote at the consolidated database