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 (中文) » SQL Anywhere 服务器 - 数据库管理 » SQL Anywhere 数据库连接 » 数据库连接

 

连接到 Mac OS X 上的示例数据库

文档中的许多示例使用了 SQL Anywhere 示例数据库。连接到此数据库并探究 SQL Anywhere。

前提条件

  • 在 [Finder] 中,找到 SQL Anywhere 示例数据库,然后将文件复制到您拥有读写权限的位置。缺省情况下,示例数据库位于 /Applications/SQLAnywhere16/demo.db 中。

  • 启动数据库服务器。在 [Finder] 中,双击 [DBLauncher]。缺省情况下,[DBLauncher] 位于 /Applications/SQLAnywhere16 中。

    1. 在 [数据库] 字段,浏览至 SQL Anywhere 示例数据库的位置。(例如,/Applications/SQLAnywhere16/System/demo.db。)

    2. 在 [服务器名] 字段中键入 demo

    3. 单击 [本地服务器]。

      [本地服务器] 选项不允许通过网络进行客户端/服务器通信。

    4. 单击 [启动] 启动名为 demo 的个人数据库服务器。

 任务
  1. 在 [Finder] 中,双击 /Applications/SQLAnywhere16 中的 [Interactive SQL]。

  2. 在 [连接] 窗口中提供以下信息,以连接 SQL Anywhere 示例数据库:

    • 在 [验证] 下拉列表中,单击 [数据库]。

    • 在 [用户 ID] 字段中键入 DBA

    • 在 [口令] 字段中键入 sql

    • 在 [操作] 下拉列表中,单击 [连接到此计算机上正在运行的数据库] 以连接到正在您的计算机上运行的数据库。

    • 在 [服务器名] 字段中键入 demo

    • 在 [数据库名] 字段中键入 demo

    • 可选:要获得使用此窗口创建的连接字符串的副本,请单击 [工具]  » [将连接字符串复制到剪贴板]。

    • 单击 [连接]。

结果

Interactive SQL 将启动并连接到示例数据库。

 另请参见