在本课中,您将配置 MobiLink 监听器,方法是将 MobiLink 监听器选项存储在某个文本文件中,然后通过在命令行指定该文件名来运行 dblsn。
请先在 ODBC 数据源管理器中创建一个名为 SIS_CarDealer_LP_DBLSN_REM 的文件 dsn。运行以下命令,与 MobiLink 服务器同步并创建 SIS_CarDealer_LP_DBLSN_REM.rid 文件:
dbmlsync -c "server=SIS_CarDealer_LP_DBLSN_REM;uid=DBA;pwd=sql" -e sa=on -o rem1.txt -v+ |
MobiLink 监听器可以使用 $remote_id 操作变量定义 MobiLink 服务器用于标识设备的轮询键。可从远程 ID 文件 SIS_CarDealer_LP_DBLSN_REM.rid 中检索到此变量,该文件是在首次与 MobiLink 服务器同步时创建的。要使用远程 ID 文件,必须与 MobiLink 服务器同步。
在 SQL Anywhere MobiLink 客户端窗口中单击 [关闭]。
新建一个包含以下内容的文本文件:
# Verbosity level -v2 # Show notification messages in console and log -m # Truncate, then write output to dblsn.txt -ot dblsn.txt # Remote ID file (defining the scope of $remote_id) -r SIS_CarDealer_LP_DBLSN_REM.rid # Message handlers # Watch for a notification without action -l "poll_connect='tcpip(host=localhost)'; poll_notifier=CarDealerNotifier; poll_key=$remote_id.no_action;" # Signal dbmlsync to launch, sync and then shutdown -l "poll_connect='tcpip(host=localhost)'; poll_notifier=CarDealerNotifier; poll_key=$remote_id.sync; action='run dbmlsync.exe -c server=SIS_CarDealer_LP_DBLSN_REM;uid=DBA;pwd=sql -e sa=on -o rem1.txt -v+';" # Shutdown the MobiLink Listener -l "poll_connect='tcpip(host=localhost)'; poll_notifier=CarDealerNotifier; poll_key=$remote_id.shutdown; action='DBLSN FULL SHUTDOWN';" |
此教程将 c:\MLsis 假定为服务器端组件的工作目录。在此目录中将文本文件另存为 mydblsn.txt。
启动 MobiLink 监听器。
在命令提示符处,浏览到 MobiLink 监听器命令文件的目录。
通过输入以下命令启动 MobiLink 监听器:
dblsn @mydblsn.txt |
随即出现 [Windows 版 MobiLink 监听器] 窗口,指示 MobiLink 监听器正处于休眠状态。
![]() |
使用DocCommentXchange 讨论此页。
|
版权 © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |