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

SQL Anywhere 11.0.1 (中文) » UltraLite - 数据库管理和参考 » UltraLite 数据库参考 » UltraLite 实用程序

 

UltraLite 信息实用程序 (ulinfo)

显示有关 UltraLite 数据库的信息并更改或清除 global_id 或 ml_remote_id 数据库选项。

语法
ulinfo -c "connection-string" [ options ]
选项 说明
-c "connection-string" 必需。连接到 DBF 或 connection-string 的 file_name 参数所标识的数据库。如果未指定用户 ID 和口令,则会假定缺省 UID 为 DBA 且 PWD 为 sql
-g ID

将初始全局数据库 ID 设置为指派的值。数据库将此值用于所有具有全局自动增量列的新行。数据库将此基值用于与每个附加行和/或列相关联的自动增量 ID。

在部署应用程序时,必须为每个数据库指派不同的标识号,目的是为了与 MobiLink 服务器同步。

-oa 如果过程标识数据库由 UltraLite 的前一版本创建(将导致数据库升级),则将该过程取消。
-or

以只读模式打开数据库。UltraLite 会创建原始文件的副本,然后可以使用此副本测试脚本而不会变更数据库。完成后会放弃对复制文件的更改。

如果直接从桌面操作系统连接到已部署到 Windows Mobile 设备的数据库,则不支持此选项。

-ou 如果数据库由较旧版本的 UltraLite 创建,则升级数据库。

-q

将实用程序设置为在安静模式下运行。取消信息性标题、版本号和状态消息。但是,仍然会显示错误消息。
-r ID 将初始 ml_remote_id 设置为指派的值。缺省情况下,新的 UltraLite 数据库将 MobiLink 远程 ID 设置为 NULL。选择以下内容可以保留此缺省值:UltraLite 和 dbmlsync 都在启动同步时自动将 MobiLink 远程 ID 设置为唯一用户 ID (UUID)。
-rc 将 MobiLink 远程 ID 设置为 NULL。
-v 打印详细消息。除指定数据库的数据库内部信息之外,还显示当前数据库属性。
注释

始终会显示打开 UltraLite 数据库时生成的警告消息,除非使用了 -q 选项。

当使用安静标志 (-q) 时,ulinfo 实用程序显示有关现有同步配置文件的信息以及待执行 SQL 直通脚本的编号。例如:

Sync profile cv_prosync: "TableOrder=cv_prosync;MobiLinkUid=cv_prosync;ScriptVersion=test;"
Number of available SQL pass-through scripts: 0
另请参见
示例

显示已经同步的、名为 sample.udb 的文件的基本数据库内部信息:

ulinfo -c DBF=cv_dbattr.udb
ulinfo -c DBF=cv_dbattr.udb 
Utility Version 11.*suppressed*
Collation: 1252LATIN1
Number of Users: 1
  1. User: 'DBA'
Page size: 4096
Default index maximum hash size: 4
Checksum level: 0
MobiLink Remote ID: not set
Global database ID: 1000
Global autoincrement usage: 0%
Number of tables: 3
Number of columns: 7
Number of publications: 3
Number of tables that will always be uploaded: 0
Number of tables that are never synchronized: 0
Number of primary Keys: 3
Number of foreign Keys: 0
Number of indexes: 0
This database has not yet been synchronized.
Synchronization by publication number:
  1. Publication cv_sync
      Number of rows in next upload: 0
      Last download: 1900-01-01 00:00:00.000
  2. Publication cv_syncPub2
      Number of rows in next upload: 0
      Last download: 1900-01-01 00:00:00.000
  3. Publication cv_syncPub3
      Number of rows in next upload: 0
      Last download: 1900-01-01 00:00:00.000
Number of available SQL pass-through scripts: 0
ulsync ...
Utility Version 11.*suppressed*
Results of this synchronization:
Succeeded
Download timestamp: 20XX-XX-XX XX:XX:XX.XXXXXX
 Upload OK
 No ignored rows
 No part download remaining
 Authentication value: 1000 (0x3e8)
ulinfo -c dbf=cv_dbattr.udb 
Utility Version 11.*suppressed*
Collation: 1252LATIN1
Number of Users: 1
  1. User: 'DBA'
Page size: 4096
Default index maximum hash size: 4
Checksum level: 0
MobiLink Remote ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Global database ID: 1000
Global autoincrement usage: 0%
Number of tables: 3
Number of columns: 7
Number of publications: 3
Number of tables that will always be uploaded: 0
Number of tables that are never synchronized: 0
Number of primary Keys: 3
Number of foreign Keys: 0
Number of indexes: 0
Last synchronization completed successfully
Download occurred: *suppressed*
Upload OK
Upload rows not ignored
No partial downloads
Actual MobiLink Authentication value: 1000
Authentication valid
Synchronization by publication number:
  1. Publication cv_sync
      Number of rows in next upload: 0
      Last download: 20XX-XX-XX XX:XX:XX.XXXXXX
  2. Publication cv_syncPub2
      Number of rows in next upload: 0
      Last download: 1900-01-01 00:00:00.000
  3. Publication cv_syncPub3
      Number of rows in next upload: 0
      Last download: 1900-01-01 00:00:00.000
Number of available SQL pass-through scripts: 0

显示名为 CustDB.udb 的文件的数据库内部信息,并通过启用详细消息显示数据库属性:

ulinfo -c DBF=CustDB.udb -v
Utility Version 11.*suppressed*
Database information
Database name: custdb
Disk file 'C:\Documents and Settings\All Users\Shared Documents\SQL Anywhere 11\Samples\UltraLite\CustDB\custdb.udb'
Collation: 1252LATIN1
Number of Users: 1
  1. User: 'DBA'
Page size: 4096
Default index maximum hash size: 8
Checksum level: 0
MobiLink Remote ID: not set
Global database ID: not set
Encryption: None
Character encoding set: 1252LATIN1
Case sensitive: OFF
Date format: YYYY-MM-DD
Date order: YMD
Nearest century: 50
Numeric precision: 30
Numeric scale: 6
Time format: HH:NN:SS.SSS
Timestamp format: YYYY-MM-DD HH:NN:SS.SSS
Timestamp increment: 1
Number of tables: 6
Number of columns: 16
Number of publications: 1
Number of tables that will always be uploaded: 0
Number of tables that are never synchronized: 1
Number of primary Keys: 6
Number of foreign Keys: 2
Number of indexes: 3
This database has not yet been synchronized.
Synchronization by publication number:
  1. Publication test
      Number of rows in next upload: 0
      Last download: 1900-01-01 00:00:00.000
Done.

为名为 sample.udb 的文件将 ml_remote_id 设置为 NULL:

ulinfo -c DBF=sample.udb -rc