升级生产数据库 (Production Mapping)
摘要
升级生产数据库方案。生产数据库用于存储 Esri Mapping and Charting 解决方案中所使用的表。Esri Production Mapping、Esri Defense Mapping 和 ArcGIS for Aviation:Charting 在各自的生产数据库中存储了不同的数据模型。这些数据模型基于产品规范描述了硬拷贝地图或图表。
用法
-
产品数据库的工作空间必须是一个包含生产数据库的地理数据库。此工具可用于将生产数据库升级至最新版本。
Use a path to an sde connection file if Workspace for Product Database references an enterprise geodatabase. The user credentials in the connection file must have permission to create data in the workspace.
You can use a configuration keyword for file and enterprise geodatabases. Each geodatabase type and configuration supports different configuration keywords; however, personal geodatabases do not support keywords.
语法
参数 | 说明 | 数据类型 |
production_database_workspace |
The workspace that will store the production database. | Workspace |
database_config_keyword (可选) |
Database storage or configuration keyword. The default is Defaults. | String |
代码实例
以下独立脚本演示了如何使用升级生产数据库 (UpgradeProductionDatabase) 工具。此脚本用于从先前版本升级包含方案的生产数据库。
# Name: UpgradeProductionDatabase_Example.py
# Description: Upgrades a production database in an existing file geodatababase to the current schema
# Requirements: Production Mapping extension
# import arcpy and checkout a Production Mapping license
import arcpy
arcpy.CheckOutExtension("foundation")
#Set local variables
productiondatabase_workspace = "C:\\Data\\ProductionDatabase.gdb"
database_config_keyword = "DEFAULTS"
# upgrades a production database
arcpy.UpgradeProductionDatabase_production(productiondatabase_workspace, database_config_keyword)
print "Script completed successfully."
# Check in the extension
arcpy.CheckInExtension("foundation")