Collection Contents Index Managing SQL Remote permissions Running the Message Agent pdf/chap10.pdf

Data Replication with SQL Remote
   PART 3. SQL Remote Administration
     CHAPTER 10. SQL Remote Administration       

Using message types


SQL Remote supports several different systems for exchanging messages. The message systems supported by SQL Remote are:

A database can exchange messages using one or more of the available message systems.

Operating system availability 

Not all message systems are supported on all operating systems for which SQL Remote is available. The links are implemented as DLLs on Windows 3.x, Windows 95, and Windows NT.

The Message Agent for UNIX and NetWare operating systems supports the file link only, as a compiled library.

For more information 

For full details on operating system availability, see the section on each message system:

Top of page  Working with message types

Each message type definition includes the type name (file, ftp, smtp, mapi, or vim) and also the address of the publisher under that message type. The publisher address at a consolidated database is used by the database extraction utility as a return address when creating remote databases. It is also used by the Message Agent to identify where to look for incoming messages for the file system.

The address supplied with a message type definition is closely tied to the publisher ID of the database. Valid addresses are considered in following sections.

Before you can use a message system, you must set the publisher's address.

Top of page  Using Sybase Central to work with message types

You can create and alter message types in Sybase Central.

  To add a message type, using Sybase Central:
  1. In the left pane, open the Message Types folder. The Message Types folder is inside the SQL Remote folder.

  2. Double-click Add Message Type. The New Message Type window appears.

  3. Enter one of the existing message type names, and a publisher address, in the appropriate fields. Click OK to save the definition in the database.

If you wish to change the publisher's address, you can do so by altering a message type.

  To alter a message type, using Sybase Central:
  1. In the left pane, open the Message Types folder. The Message Types folder is inside the SQL Remote folder.

  2. In the right pane, right-click the message type you wish to alter and select Properties from the popup menu. The Message Type Properties window appears.

  3. Enter a new publisher address, in the appropriate fields. Click OK to save the definition in the database.

If you wish to drop a message type from the installation, you can do so.

  To drop a message type, using Sybase Central:
  1. In the left pane, open the Message Type folder. The Message Type folder is inside the SQL Remote folder.

  2. In the right pane, right-click the message type you wish to alter and select Delete from the popup menu.

Top of page  Using commands to work with message types

  To create a message type:
  1. Make sure you have decided on an address for the publisher under the message type.

  2. Enter the command to create the message type.

    For Adaptive Server Anywhere, use the CREATE REMOTE MESSAGE TYPE statement. This statement has the following syntax:

    CREATE REMOTE MESSAGE TYPE type-name
    ADDRESS address-string

    For Adaptive Server Enterprise, use the sp_remote_type procedure. This procedure takes the following arguments:

    sp_remote_type type-name, address-string

    In these statements, type-name is one of the message systems supported by SQL Remote, and address-string is the publisher's address under that message system.

If you wish to change the publisher's address, you can do so by altering the message type.

  To alter a message type:
  1. Make sure you have decided on a new address for the publisher under the message type.

  2. Enter the command to alter the message type.

    For Adaptive Server Anywhere, use the ALTER REMOTE MESSAGE TYPE statement. This statement has the following syntax:

    ALTER REMOTE MESSAGE TYPE type-name
    ADDRESS address-string

    For Adaptive Server Enterprise, use the sp_remote_type procedure in the same way as creating a message type. This procedure takes the following arguments:

    sp_remote_type type-name, address-string

    In these statements, type-name is one of the message systems supported by SQL Remote, and address-string is the publisher's address under that message system.

You can also drop message types if they are no longer used in your installation. This has the effect of removing the publisher's address from the definition.

  To drop a message type:
  1. Enter the command to drop the message type.

    For Adaptive Server Anywhere, use the DROP REMOTE MESSAGE TYPE statement. This statement has the following syntax:

    DROP REMOTE MESSAGE TYPE type-name

    For Adaptive Server Enterprise, use the sp_drop_remote_type procedure in the same way as creating a message type. This procedure takes the following arguments:

    sp_drop_remote_type type-name

    In these statements, type-name is one of the message systems supported by SQL Remote.

Top of page  Setting message type control parameters

Each message link has several parameters that govern aspects of its behavior. The following sections document these parameters.

Where the parameters are held 

The message link control parameters are stored in the following places:

The sqlremote environment variable holds a path that can be used as an alternative to one of the control parameters for the file sharing system.

The parameters available for each message system are discussed in the following sections. Each section describes a single message system.

Top of page  The file sharing message system

SQL Remote can be used even if you do not have a message system in place, by using the file message system.

Supported operating systems 

The file sharing message system is supported on all platforms for which SQL Remote is available, for both Adaptive Server Enterprise and Adaptive Server Anywhere.

Addresses in the file message system 

The file message system is a simple file-sharing system. A file address for a remote user is a subdirectory into which all their messages are written. To retrieve messages from their "inbox", an application reads the messages from the directory containing the user's files. Return messages are sent to the address (written to the directory) of the consolidated database.

Root directory for addresses 

The file system addresses are typically subdirectories of a shared directory that is available to all SQL Remote users, whether by modem or on a local area network. Each user should have a registry entry, initialization file entry, or SQLREMOTE environment variable pointing to the shared directory.

You can also use the file system to put the messages in directories on the consolidated and remote machines. A simple file transfer mechanism can then be used to exchange the files periodically to effect replication.

Top of page  FILE message control parameters

The FILE message system uses the following control parameters:

The FILE section of the sqlany.ini file (Windows 3.x) has the following entries:

[ FILE ]

Directory=path

Debug={ yes | no }

On NetWare, you should create a file named dbremote.ini in the sys:\system directory to hold the directory setting.

Top of page  The ftp message system

Supported operating systems 

The ftp message system is supported on the Windows NT, Windows 95, and Windows 3.x operating systems.

Addresses for ftp 

In the ftp message system, messages are stored in directories under a root directory on an ftp host. The ftp host and the root directory are specified by message system control parameters held in the registry or initialization file, and the address of each user is the subdirectory where their messages are held.

Top of page  FTP message control parameters

The ftp message system uses the following control parameters:

Top of page  The SMTP message system

The Simple Mail Transfer Protocol (SMTP) is used in Internet e-mail products.

With the SMTP system, SQL Remote sends messages using Internet mail. The messages are encoded to a text format and sent in an e-mail message to the target database. The messages are sent using an SMTP server, and retrieved from a POP server: this is the way that many e-mail programs send and receive messages.

Supported operating systems 

The SMTP message system is supported on the following operating systems:

SMTP addresses and user IDs 

To use SQL Remote and an SMTP message system, each database participating in the setup requires a SMTP address, and a POP3 user ID and password. These are distinct identifiers: the SMTP address is the destination of each message, and the POP3 user ID and password are the name and password entered by a user when they connect to their mail box.

Separate e-mail account recommended    
It is recommended that a separate POP e-mail account be used for SQL Remote messages.

Top of page  Sharing SMTP/POP addresses

The database should have its own e-mail account for SQL Remote messages, separate from personal e-mail messages intended for reading. This is because many e-mail readers will collect e-mail in the following manner:

  1. Connect to the POP Host and download all messages.

  2. Delete all messages from POP Host

  3. Disconnect from POP Host.

  4. Read mail from the local file or from memory

This causes a problem, as the e-mail program downloads and deletes all of the SQL Remote e-mail messages as well as personal messages. If you are certain that your e-mail program will not delete unread messages from the POP Host then you may share an e-mail address with the database as long as you take care not to delete or alter the database messages.

These messages are easy to recognize, as they are filled with lines of seemingly random text.

Top of page  SMTP message control parameters

Before the Message Agent connects to the message system to send or receive messages, the user must either have a set of control parameters already set on their machine, or must fill in a window with the needed information. This information is needed only on the first connection. It is saved and used as the default entries on subsequent connects.

The SMTP message system uses the following control parameters:

The SMTP section of the sqlany.ini file (Windows 3.x) has the following entries:

[SMTP]

smtp_host=smtp_host

pop3_host=pop3_host

pop3_userid=userid

pop3_password=password

Debug={ yes | no }

Top of page  The MAPI message system

The Message Application Programming Interface (MAPI) is used in several popular e-mail systems, such as Microsoft Mail and later versions of Lotus cc:Mail. SQL Remote supports the MAPI message system under Windows 3.x, Windows 95, and Windows NT.

Supported operating systems 

The MAPI message system is supported on the following operating systems:

MAPI addresses and user IDs 

To use SQL Remote and a MAPI message system, each database participating in the setup requires a MAPI user ID and address. These are distinct identifiers: the MAPI address is the destination of each message, and the MAPI user ID is the name entered by a user when they connect to their mail box.

MAPI message and the e-mail inbox 

Although SQL Remote messages may arrive in the same mail box as e-mail intended for reading, they do not in general show up in your e-mail inbox.

SQL Remote sends application-defined messages, which MAPI identifies and hides when the mailbox is opened. In this way, users can use the same e-mail address and same connection to receive their personal e-mail and their database updates, yet the SQL Remote messages do not interfere with the mail intended for reading.

If a message is routed via the Internet, the special message type information is lost. The message then does show up in the recipient's mailbox.

Top of page  MAPI message control parameters

The MAPI message system uses the following control parameters:

The MAPI section of the sqlany.ini file (Windows 3.x) has the following entries:

[ MAPI ]

IPM_Send={yes |no }

IPM_Receive={ yes |no }

Force_Download={yes |no }

Debug={yes | no}

Top of page  The VIM message system

The Vendor Independent Messaging system (VIM) is used in Lotus Notes and in some releases of Lotus cc:Mail.

Supported operating systems 

The VIM message system is supported on the following operating systems:

To use SQL Remote and a VIM message system, each database participating in the setup requires a VIM user ID and address. These are distinct identifiers: the VIM address is the destination of each message, and the VIM user ID is the name entered by a user when they connect to their mail box.

Top of page  VIM message control parameters

The VIM message system uses the following control parameters:

The VIM section of the sqlany.ini file (Windows 3.x) has the following entries:

[ VIM ]

Path=path

Userid=userid

Password=password

Debug={yes | no}

Receive_All = {yes | no}

Send_VIM_Mail = {yes | no}

Top of page  

Collection Contents Index Managing SQL Remote permissions Running the Message Agent pdf/chap10.pdf