描述
Upgrades a production database schema.
A production database stores ArcGIS Defense Mapping, ArcGIS Production Mapping, ArcGIS Maritime, ArcGIS Bathymetry, or ArcGIS Aviation tables using the data model for the given extension. These data models describe hard-copy maps or charts based on product specifications.
使用方法
The Workspace for Production Database parameter value must be a geodatabase that contains a production database. This tool upgrades the production database to the latest version.
如果产品数据库的工作空间引用了企业级地理数据库,则使用连接文件的路径。连接文件中的用户证书必须具有在工作空间中创建数据的权限。
可以对文件地理数据库和企业级地理数据库使用配置关键字。每个地理数据库类型和配置支持的配置关键字不同;但个人地理数据库不支持关键字。
语法
arcpy.production.UpgradeProductionDatabase(production_database_workspace, {database_config_keyword})
参数 | 说明 | 数据类型 |
production_database_workspace | 将存储生产数据库的工作空间。 | Workspace |
database_config_keyword (可选) | 数据库存储或配置关键字。默认值为 Defaults。 | String |
代码示例
UpgradeProductionDatabase example (stand-alone script)
The following stand-alone script demonstrates how to use the UpgradeProductionDatabase function. The script upgrades a production database with a schema from a previous version.
# 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")
环境
许可信息
- Basic: 否
- Standard: 需要 Production Mapping
- Advanced: 需要 Production Mapping