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 数据库

 

从 XML 创建 UltraLite 数据库

可以使用 XML 作为管理 UltraLite 数据库的中间格式,只要该格式符合 UltraLite 使用要求。XML 的使用方法如下:

  • 使用不同的一组数据库属性/选项将数据装载到新数据库中。

  • 从先前版本的 UltraLite 所创建的数据库升级模式。

  • 创建一个可签入版本控制系统的 UltraLite 数据库文本版本。

UltraLite 不能使用任意的 XML 文件。install-dir\UltraLite 目录包含一个 usm.xsd 文件。使用此文件查看 XML 格式。

♦  从 XML 文件创建 UltraLite 数据库
  1. 将 XML 文件保存到所选择的目录。您可以:

    • 将数据库导出/卸载到某个 XML 文件。如果要卸载 SQL Anywhere 数据库,请使用任何一种支持的导出方法。请参见以 XML 形式导出关系数据

    • 从另一个来源取得 XML 输出—该来源可以是另一个关系数据库,甚至可以是用于将事务记录到文件的 Web 站点。务必要确保 XML 的格式始终满足 UltraLite 要求。

  2. 运行 ulload 实用程序,在其中加入任何必要的选项。

    例如,在文件 sample.udb 中通过表格式和 sample.xml 中的数据创建新 UltraLite 数据库:

    ulload -c DBF=sample.udb sample.xml
另请参见