2. Grant PUBLISH permissions to a user ID to identify the source of
outgoingmessages.
3. Grant REMOTE permissions to all user IDs that are to receive messages.
4. Create a publication describing the data to be replicated.
5. Create subscriptions describing who is to receive the publication.
Youshould have system administrator authority to carry out these tasks.
Create the message links and addresses
Inthis tutorial, messages are exchanged using the shared file link. Youmust
createa FILE message type supplying the address of the consolidated
databasepublisher.
Tocreate the message type
1. Executethe sp_remote_type stored procedure, using HQ as the address
ofthe consolidated database publisher:
sp_remote_type file, hq
go
Theaddress (hq )for a file link is a directory in which files containing the
messageare placed. It is taken relativeto the SQLRemote environment
variableor registry entry. As you have not set this value, the address is
takenrelative to the directory from which the Message Agent is run. You
shouldrun the Message Agent from your tutorial directory for the
addressesto be interpreted properly.
Forinformation about setting the SQLRemote value, see “Setting
messagetype control parameters” on page 214.
Withthe message type defined, you can now make the necessary users.
Create the necessary users and permissions
Aset of users and permissions are required for SQL Remote installations. In
thistutorial, the following are required:
Aremote user or subscriber, with name field_user.
Apublisher user name, called hq_user.
Thissection describes the steps you need to take to create each user and
assignthem the necessary permissions.
60