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

SQL Anywhere 12.0.0 (中文) » SQL Anywhere 服务器 - 数据库管理 » 启动并连接到数据库 » 使用 SQL Anywhere 数据库服务器 » 运行经过验证的 SQL Anywhere 应用程序 » 开发经过验证的应用程序

 

升级经过验证的数据库

升级或重建数据库时,能够保留验证信息的唯一方法是将验证语句存储在文件 authenticate.sql 中。

CREATE DATABASE 和 ALTER DATABASE UPGRADE 语句、dbupgrad 和 dbunload 实用程序,以及升级数据库向导会检查 install-dir/scripts 目录中是否存在名为 authenticate.sql 文件,如果该文件存在则会运行其内容。必须在对数据库运行升级或重建操作前创建该文件。

 ♦  升级或重建经过验证的数据库
  1. install-dir\scripts 目录中创建名为 authenticate.sql 的文件。

  2. 在该文件中添加以下内容:

    SET OPTION PUBLIC.database_authentication = 'authentication-statement'
    go

    文件中必须有 go;否则,将忽略该语句。

    有关字符串 authentication-statement 内容的信息,请参见database_authentication

  3. 升级或重建数据库。必须遵循的步骤取决于要升级或重建的数据库文件的版本。请参见: