Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 (中文) » MobiLink - 入门 » MobiLink 教程 » 教程:使用 MobiLink 重放实用程序模拟多个 MobiLink 客户端

 

第 7 课:重新启动 MobiLink 服务器以进行重放

在本课中,您将通过停止 MobiLink 服务器来停止记录,然后重新启动服务器(不使用 -rp 选项)以便服务器做好重放准备。

前提条件

本课假定您已完成前面的所有课程。 请参见第 1 课:建立 MobiLink 统一数据库

本课假定您拥有在教程教程:使用 MobiLink 重放实用程序模拟多个 MobiLink 客户端开头的权限部分中列出的角色和特权。

 任务
  1. 运行以下命令停止 MobiLink 服务器 mlreplay_svr

    mlstop -w -t 1m mlreplay_svr

    MobiLink 服务器将与同步记录一同停止。

    下表说明了所用的各个选项:

    选项 说明

    -w

    等待服务器关闭,然后返回到命令提示符。

    -t

    指定服务器应在一分钟之后或当前同步完成之后关闭(以较早者为准)。

  2. 运行以下命令以连接到统一数据库:

    mlsrv16 -c "DSN=cons" -zu+ -zs mlreplay_svr -x tcpip -ot server_replay.mls -v+

    即会出现 MobiLink 服务器消息窗口。

    以下对所用的每个 MobiLink 服务器选项进行了说明。选项 -ot 和 -v 提供调试和故障排除信息。这些记录选项适合在开发环境下使用。出于性能考虑,-v 选项通常不会用于生产中。

    选项 说明

    -c

    指定连接字符串。

    -ot

    指定消息日志文件 server_replay.mls

    -v+

    指定记录哪些信息。使用 -v+ 设置最大详细记录。

    -x

    设置用于监听同步请求的协议。

    -zs

    设置 MobiLink 服务器名。

    -zu+

    自动添加新用户。

结果

MobiLink 服务器已停止并再次启动。

下一个

前进至第 8 课:重放同步

 另请参见