HowTo:  Restore a DB2 9.1 database to a 9.7 instance and then run db2se to upgrade the DB2 Spatial Extender

相关信息
Article ID: 40798
Software:
ArcSDE 10, 10.1, 10.2
Platforms: N/A

问题描述
If the DB2 database is upgraded but the DB2 Spatial Extender is not, subsequent geodatabase upgrades fail with an error similar to the following:

"ERROR Creating Geodatabase tables
, Error = -51
,EXT_Error = 0
,EXT_ERROR1 = Underlying DBMS error
,EXT_ERROR2 = 00000"
已邀请:

易智瑞技术支持

赞同来自:

解决方案
The following steps show the restore and upgrade processes that must be performed to successfully upgrade the geodatabase after upgrading the DB2 database.
  1. Restore the older database to the newer DB2 instance:
    $ db2 restore db gis from /u01/DB2/OldDB to /u01/DB2/NewDBDB20000I  The RESTORE DATABASE command completed successfully.
  2. Apply backup logs to complete the restore operation.
    $ db2 rollforward db gis to end of logs and stop                                 Rollforward Status Input database alias                   = gis Number of nodes have returned status   = 1 Node number                            = 0 Rollforward status                     = not pending Next log file to be read               = Log files processed                    =  - Last committed transaction             = 2012-07-12-07.49.14.000000 UTCDB20000I  The ROLLFORWARD command completed successfully.
  3. Restart DB2.
    $ db2stop07/17/2012 16:35:58     0   0   SQL1064N  DB2STOP processing was successful.SQL1064N  DB2STOP processing was successful.$ db2start07/17/2012 16:36:03     0   0   SQL1063N  DB2START processing was successful.SQL1063N  DB2START processing was successful.
  4. Create a directory for a system temporary tablespace to be used for upgrading the DB2 Spatial Extender. 
    $ mkdir /u01/DB2/NewDB/NODE0000/SQL00001/SYSTEMTEMP
  5. Create a large pagesized system temporary tablespace so that the DB2 Spatial Extender can be upgraded successfully.
    $ db2db2 => connect to gis user db2admin using password   Database Connection Information Database server        = DB2/SUN64 9.7.4 SQL authorization ID   = DB2ADMIN Local database alias   = GIS db2 => CREATE BUFFERPOOL TEMPSYSBP32 IMMEDIATE SIZE AUTOMATIC PAGESIZE 32KDB20000I  The SQL command completed successfully.db2 => CREATE SYSTEM TEMPORARY TABLESPACE TEMP_SYSTEM32 PAGESIZE 32k MANAGED BY SYSTEM USING (/u01/DB2/NewDB/NODE0000/SQL00001/SYSTEMTEMP') BUFFERPOOL TEMPSYSBP32DB20000I  The SQL command completed successfully.db2 => quitDB20000I  The QUIT command completed successfully.
  6. Save the existing spatial indexes.
    $ db2se save_indexes gis -messagesFile /TEMP/save_indexes.logGSE0000I  The operation was completed successfully.
  7. Upgrade the DB2 Spatial Extender.
    $ db2se upgrade gis -force 1 -messagesFile /TEMP/gse_upgrade.logUpgrading database. Please wait ...GSE0000I  The operation was completed successfully.
  8. Restore the spatial indexes.
    $ db2se restore_indexes gis -messagesFile /TEMP/restore_indexes.logGSE0000I  The operation was completed successfully.


创建及修改时间
Created: 12/28/2012

Last Modified: 1/9/2014
原文链接
http://support.esri.com/en/kno ... 40798

要回复问题请先登录注册