PROBLEM

Geodatabase upgrade fails with "Could not update server tables and stored procedures. Error (-238)"

Last Published: April 28, 2021

Description

Note:
This article pertains to ArcGIS version 10.0 only. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.
Note:
ArcSDE software, including the application server, command tools, and SDK with C and Java APIs, was deprecated at ArcGIS 10.2.2 and is no longer distributed.

Geodatabase upgrade to version 10 or later fails with the following error message:

Error:
Error(Check Datasets): Could not update server tables and stored procedures. Error (-238)

The sde_setup.log shows the following details:

[<timestamp>] Error: DBMS view exists (-238).
Tables not converted to DBS.
Error: -238

[<timestamp>] SDE release upgrade not completed(-238).
[<timestamp>] ERROR installing/upgrading ArcSDE, Error = -238

Cause

The physical database view of a geodatabase multi-versioned view for an archiving-enabled feature class is missing. The most likely causes for this are:

  • The view was unintentionally dropped by a user with a SQL command
  • During database migration, the view was missed

Solution or Workaround

The solution to this problem is to identify and delete the detached multi-versioned view entries for archiving-enabled feature classes in the geodatabase schema, as follows:

  1. Execute the following SQL statement to get a list of multi-versioned view entries for archiving-enabled feature classes as the geodatabase admin user.
select owner, table_name, imv_view_name from table_registry 
where upper(table_name) || '_H' in 
(select upper(table_name) from table_registry where Upper(table_name) like '%_H')
and upper(Imv_view_name) = upper(table_name) || '_MV'
Note:
For Microsoft SQL Server use the following SQL statement:
select owner, imv_view_name from sde_table_registry 
where upper(table_name) || '_H' in 
(select upper(table_name) from sde_table_registry where Upper(table_name) like '%_H')
and upper(Imv_view_name) = upper(table_name) || '_MV'
  1. Check for the existence of the database view for the geodatabase multi-versioned view listed and identify the detached entries.
  2. Delete the detached multi-versioned view entries with following command.
sdetable -o delete_mv_view -t <table_name>
  1. Re-run the geodatabase upgrade.
  2. Re-create the dropped multi-versioned views, if necessary.

Article ID:000011277

Software:
  • ArcMap 10 0

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic