Standard または Advancedのライセンスで利用可能。
エンタープライズ ジオデータベースをアップグレードする目的は、新機能と修正された不具合を利用するために、ジオデータベースのシステム テーブル、ストアド プロシージャ、タイプ、および機能を更新することです。
ArcGIS クライアントの最新バージョンをインストールするか、サービス パック、パッチ、またはホット フィックスを既存のインストールに適用し、ジオデータベースをアップグレードします。
Before you upgrade
ジオデータベースを含め、エンタープライズ システムをアップグレードする場合は、まず計画を立てます。開発サーバーまたはテスト サーバーで新しいバージョンをテストして、すべてのクライアント アプリケーションで動作することを確認します。
新しいシステムが想定したとおりに機能することが確認できたら、アップグレードのスケジュールを設定します。アップグレードに必要な人員を確保し、各担当者が割り当てられたタスクを実行するために必要な権限を持っていることを確認します。
次の点に注意してください。
- ArcSDE application server for Informix is no longer available beginning with ArcGIS 10.3. You must migrate all application server connections used in maps or services to use direct connections before you can upgrade your geodatabase to 10.3.
- ソフトウェアのベータ バージョンからのアップグレードはサポートされていません。
- ご使用のデータベースのバージョンがサポート対象であれば、9.3.1、10、10.1、10.2、10.2.1、または 10.2.2 ジオデータベースから 10.3 ジオデータベースに直接アップグレードできます。
- お使いのジオデータベースのバージョンが 9.3 以下の場合は、まず 10.3 でサポートされているバージョンにアップグレードしてから、10.3 にアップグレードしてください。
- ジオデータベースをいったんアップグレードすると、以前のバージョンの ArcGIS では接続できなくなる場合があります。これは、旧バージョンの ArcGIS では、新しいバージョンのジオデータベースを読み込めないためです。ArcGIS 10 より前のバージョンでは、10.3 ジオデータベースに接続できません。ArcGIS 10 のクライアントは、10.3 ジオデータベースに接続できます。
- ジオデータベースを以前のバージョンにダウングレードするための正式のメカニズムはありません。ジオデータベースを新しいバージョンにアップグレードした後で旧バージョンに戻す必要が生じた場合は、旧版のデータベースをバックアップから復元する必要があります。
以下は、ジオデータベースをアップグレードする前に実行する手順のチェックリストです。
- Be sure the version of Informix you want to use is supported with the ArcGIS 10.3. See IBM Informix database requirements for ArcGIS for information.
- Check to see if your geodatabase can be upgraded. To do this, install the ArcGIS client version you want to move to onto one machine. If you install ArcGIS for Desktop, you can connect to the geodatabase and open the Database Properties dialog box to see if a geodatabase upgrade is possible. If you install ArcGIS for Server or ArcGIS Engine with the Geodatabase Update extension, you can use the ArcPy Describe function to determine if the geodatabase can be upgraded.
# Open Python. cd /arcgis/server/tools ./python # Create a connection to the geodatabase. arcpy.CreateDatabaseConnection_management("/tmp/", "egdb_connection.sde", "INFORMIX", "myidsgdb", "DATABASE_AUTH", "sde", "mysdepassword", "SAVE_USERNAME") # Import ArcPy and check the geodatabase release. import arcpy isCurrent = arcpy.Describe('/tmp/egdb_connection.sde').currentRelease print isCurrent
If false is returned, you can upgrade your geodatabase. If true is returned, you do not need to upgrade your geodatabase. Do not proceed with the subsequent steps.
- Create a backup of the database.
- ArcGIS の外部で、ArcGIS ジオデータベース システム テーブルへ追加したカスタム機能 (トリガーや追加のインデックスなど) をすべて削除します。
アップグレード手順では、ユーザーがシステム テーブルに追加したカスタマイズは考慮されません。このようなカスタマイズによってシステム テーブルのスキーマ変更が妨げられた場合、アップグレードが失敗します。
- The informix user must grant dba privileges to the sde user account for the database through dbaccess.
If you do not grant the required privileges, there will be problems with the upgrade procedure as well as overall product performance.
The informix user would issue the following command to grant dba privileges to the sde user:
dbaccess <ArcSDE_Database> Query-language-->New--> grant dba to sde Run
- アップグレード対象のジオデータベースへの接続がないことを確認します。
ジオデータベースに現在接続しているユーザーのリストを表示するには、ArcGIS for Desktop の [ジオデータベース管理] ダイアログ ボックスの [接続ユーザー] タブを開きます。
You can now upgrade your geodatabase.
Upgrade the geodatabase
You can use the Upgrade Geodatabase tool in ArcGIS for Desktop or a Python script run on the ArcGIS client computer to upgrade your geodatabase.
Use the Upgrade Geodatabase tool
You can open the Upgrade Geodatabase from the Database Properties dialog box by clicking the Upgrade Geodatabase button on the General tab, or open the tool directly. If you open the tool from Database Properties, the Input geodatabase text box is prepopulated with the geodatabase connection information.
Esri recommends that you leave both the Pre-requisites check and Upgrade geodatabase options checked. That way, the tool checks to see if the prerequisites to upgrade have been met before continuing with the geodatabase upgrade.
The prerequisite check detects other active connections to the geodatabase, determines whether the connecting user has sufficient privileges to upgrade the geodatabase, ensures that the database can support XML columns, makes sure all datasets can be opened, and ascertains that the database and libraries are at the same release. If any prerequisites are not met, the tool terminates. You must correct any problems before you run the upgrade procedure again.
The results of this check are reported on the geoprocessing tool dialog box. If the check (or upgrade) fails, results are also written to the GDBUpgrade.log, which can be found in c:\Users\<user name>\AppData\Local\ESRI\<ArcGIS product>.
If all checks are passed, the tool proceeds with the upgrade. The status for the prerequisites check and the upgrade are shown on the geoprocessing tool progress dialog box. If the upgrade fails, information is written to the GDBUpgrade.log. Additional information is written to the sdesetup.log, which can be found in the system TEMP directory.
Run a script
To upgrade the geodatabase, copy one of these example scripts into a text editor. Alter any variable values to match the information at your site.
- If you have an existing database connection file that uses a direct connection and connects as the sde user, copy the script that applies to your operating system, paste it into a text editor, alter it to use information specific to your site, save and close the file, then run it:
# Name: upgradesdegdb_example.py # Description: Connect from a Windows computer # with an existing database connection file # and upgrade an enterprise geodatabase # Author: Esri # Import arcpy module import arcpy # Local variables: Output_Workspace = "C:\\ArcGIS\connection_files\<Connection file>" Default_gdb = "C:\\ArcGIS\connection_files\<Connection file>" # Process: Upgrade Geodatabase arcpy.UpgradeGDB_management(Default_gdb, "PREREQUISITE_CHECK", "UPGRADE")
# Name: upgradesdegdb_example.py # Description: Connect from a Linux or UNIX computer # with an existing database connection file # and upgrade an enterprise geodatabase # Author: Esri # Import arcpy module import arcpy # Local variables: Output_Workspace = "<user>/connections/<Connection_file>" Default_gdb = "<user>/connections/<Connection_file>" # Process: Upgrade Geodatabase arcpy.UpgradeGDB_management(Default_gdb, "PREREQUISITE_CHECK", "UPGRADE")
- If you do not have a database connection file on the computer from which you are scripting the upgrade, you can copy the following script and provide your site-specific information at the command line:For example, if you saved the text file as gdbupgrade and your ODBC data source name is myidsgdb, type the following at a command prompt:
""" Name: upgrade_gdb.py Description: Provide connection information to an Enterprise geodatabase and upgrade the geodatabase Type upgrade_gdb.py -h or upgrade_gdb.py --help for usage Author: Esri """ # Import system modules import arcpy, os, optparse, sys # Define usage and version parser = optparse.OptionParser(usage = "usage: %prog [Options]", version="%prog 1.0 for " + arcpy.GetInstallInfo()['Version'] ) #Define help and options parser.add_option ("--DBMS", dest="Database_type", type="choice", choices=['SQLSERVER', 'ORACLE', 'POSTGRESQL', 'DB2','INFORMIX','DB2ZOS',''], default="", help="Type of enterprise DBMS: SQLSERVER, ORACLE, or POSTGRESQL.") parser.add_option ("-i", dest="Instance", type="string", default="", help="DBMS instance name") parser.add_option ("--auth", dest="account_authentication", type ="choice", choices=['DATABASE_AUTH', 'OPERATING_SYSTEM_AUTH'], default='DATABASE_AUTH', help="Authentication type options (case-sensitive): DATABASE_AUTH, OPERATING_SYSTEM_AUTH. Default=DATABASE_AUTH") parser.add_option ("-u", dest="User", type="string", default="", help="Geodatabase administrator user name") parser.add_option ("-p", dest="Password", type="string", default="", help="Geodatabase administrator password") parser.add_option ("--upgrade", dest="Upgrade", type="choice", choices=['TRUE', 'FALSE'], default="FALSE", help="Upgrade Options (case-sensitive): TRUE=Perform Pre-requisite check and upgrade geodatabase, FALSE=Perform Pre-requisite check only. Default=FALSE") parser.add_option ("-D", dest="Database", type="string", default="none", help="Database name: Not required for Oracle") # Check if value entered for option try: (options, args) = parser.parse_args() #Check if no system arguments (options) entered if len(sys.argv) == 1: print "%s: error: %s\n" % (sys.argv[0], "No command options given") parser.print_help() sys.exit(3) #Usage parameters for spatial database connection to upgrade account_authentication = options.account_authentication.upper() username = options.User.lower() password = options.Password do_upgrade = options.Upgrade database = options.Database.lower() database_type = options.Database_type.upper() instance = options.Instance if (database_type == ""): print "\nDatabase type must be specified!\n" parser.print_help() sys.exit(3) if (database_type == "SQLSERVER"): database_type = "SQL_SERVER" # Get the current product license product_license=arcpy.ProductInfo() # Checks required license level to upgrade if product_license.upper() == "ARCVIEW" or product_license.upper() == 'ENGINE': print "\n" + product_license + " license found!" + " Enterprise geodatabase upgrade requires an ArcGIS for Desktop Standard or Advanced, ArcGIS Engine with the Geodatabase Update extension, or ArcGIS for Server license." sys.exit("Re-authorize ArcGIS before upgrading.") else: print "\n" + product_license + " license available! Continuing to upgrade..." arcpy.AddMessage("+++++++++") # Local variables instance_temp = instance.replace("\\","_") instance_temp = instance_temp.replace("/","_") instance_temp = instance_temp.replace(":","_") Conn_File_NameT = instance_temp + "_" + database + "_" + username if os.environ.get("TEMP") == None: temp = "c:\\temp" else: temp = os.environ.get("TEMP") if os.environ.get("TMP") == None: temp = "/usr/tmp" else: temp = os.environ.get("TMP") Connection_File_Name = Conn_File_NameT + ".sde" Connection_File_Name_full_path = temp + os.sep + Conn_File_NameT + ".sde" # Check for the .sde file and delete it if present arcpy.env.overwriteOutput=True if os.path.exists(Connection_File_Name_full_path): os.remove(Connection_File_Name_full_path) print "\nCreating Database Connection File...\n" # Process: Create Database Connection File... # Usage: out_file_location, out_file_name, DBMS_TYPE, instnace, database, account_authentication, username, password, save_username_password(must be true) arcpy.CreateDatabaseConnection_management(out_folder_path=temp, out_name=Connection_File_Name, database_platform=database_type, instance=instance, database=database, account_authentication=account_authentication, username=username, password=password, save_user_pass="TRUE") for i in range(arcpy.GetMessageCount()): if "000565" in arcpy.GetMessage(i): #Check if database connection was successful arcpy.AddReturnMessage(i) arcpy.AddMessage("\n+++++++++") arcpy.AddMessage("Exiting!!") arcpy.AddMessage("+++++++++\n") sys.exit(3) else: arcpy.AddReturnMessage(i) arcpy.AddMessage("+++++++++\n") # Check whether geodatabase needs upgrade isCurrent = arcpy.Describe(Connection_File_Name_full_path).currentRelease if isCurrent == True: print "The geodatabase is already at the current release and cannot be upgraded!" sys.exit("Upgrade did not run.") # Process: Upgrade geodatabase... try: if do_upgrade.lower() == "true": print "Upgrading Geodatabase...\n" arcpy.UpgradeGDB_management(input_workspace=Connection_File_Name_full_path, input_prerequisite_check="PREREQUISITE_CHECK", input_upgradegdb_check="UPGRADE") for i in range(arcpy.GetMessageCount()): arcpy.AddReturnMessage(i) arcpy.AddMessage("+++++++++\n") else: print "Running Pre-Requisite Check...\n" arcpy.UpgradeGDB_management(input_workspace=Connection_File_Name_full_path, input_prerequisite_check="PREREQUISITE_CHECK", input_upgradegdb_check="NO_UPGRADE") for i in range(arcpy.GetMessageCount()): arcpy.AddReturnMessage(i) arcpy.AddMessage("+++++++++\n") except: for i in range(arcpy.GetMessageCount()): arcpy.AddReturnMessage(i) if os.path.exists(Connection_File_Name_full_path): os.remove(Connection_File_Name_full_path) #Check if no value entered for option except SystemExit as e: if e.code == 2: parser.usage = "" print "\n" parser.print_help() parser.exit(2)
gdbupgrade --DBMS INFORMIX -i myidsgdb --auth DATABASE_AUTH -u sde -p mysdepassword --upgrade TRUE