English

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

Description

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

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

The sde_setup.log shows these 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 orphaned 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'


  2. Check for the existence of the database view for the geodatabase multi-versioned view listed and identify the orphaned entries.
  3. Delete the orphaned multi-versioned view entries with following command.

    sdetable -o delete_mv_view -t <table_name>

  4. Re-run the geodatabase upgrade.
  5. Re-create the dropped multi-versioned views, if necessary.