SQL Remote can be used even if you do not have an email or FTP system in place, by using 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, 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.
When the SQL Remote Message Agent (dbremote) is running as a service, the account it is running under must have permissions to read from and write to all necessary directories. If the correct permissions are not assigned, the SQL Remote Message Agent is unable to access network drives.
Typically, the FILE message system addresses are subdirectories of a shared directory that is available to all SQL Remote users, whether by modem or 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 computers. You can use a simple file transfer mechanism to exchange files and complete replication.
The FILE message system uses the following control parameters that are set by the SET REMOTE OPTION statement:
directory The directory under which the messages are stored. This parameter is an alternative to the SQLREMOTE environment variable.
debug The setting for this parameter is either YES or NO. The default is NO. When set to YES, all FILE system calls made by the FILE link are displayed in the output log.
encode_dll If you are using a custom encoding scheme, you must set this parameter to the full path of the custom encoding DLL that you created.
invalid_extensions A comma-separated list of file extensions that you do not want the SQL Remote Message Agent (dbremote) to use when generating files in the messaging system.
max_retries By default, when SQL Remote is running in continuous mode and an error occurs when accessing the message system, it shuts down after the send and/or receive phases. Use this parameter to specify the number of times you want SQL Remote to retry the send and/or receive phases before it shuts down.
pause_after_failure This parameter applies when the max_retries parameter is specified to a value other than zero and SQL Remote is running in continuous mode. When an error occurs in the message system, this parameter defines the number of seconds SQL Remote waits between retrying the send and/or receive phases.
unlink_delay The number of seconds to wait before attempting to delete a file if the previous attempt to delete the file failed. If no value is defined for unlink_delay, then the default behavior is set to pause for 1 second after the first failed attempt, 2 seconds after the second failed attempt, 3 seconds after the third failed attempt, and 4 seconds after the fourth failed attempt.
The SQL Remote Message Agent (dbremote) searches in C:\My Documents\Synchronized Files for the FILE link. On the consolidated database computer, the SQLREMOTE environment variable or directory message link parameter for the FILE link should be set to the following directory where userid and Windows-mobile-device-name are set to the appropriate values:
%SystemRoot%\Profiles\userid\Personal\Windows-mobile-device-name\Synchronized Files |
With this system, Microsoft ActiveSync automatically synchronizes the message files between the consolidated database computer and the Windows Mobile device.
To verify that FILE synchronization is activated, check Mobile Devices » Tools » ActiveSync Options.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |