Consultor Eletrônico



Kbase 21875: Error 1461 When Database Name is Changed -- MSS & ODBC Dsrv.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/7/2002
SUMMARY:

This Solution applies to Microsoft SQL Server and ODBC DataServer Version 9. If you change your foreign database name and keep the same schema holder, you might encounter the following error message when your application tries to access any table:

Schema holder does not match database schema -- file field . (1461)

EXPLANATION:

When you pull definitions from the foreign database through the ODBC or MS SQL Server DataServer, the actual database name is stored in the schema holder, so simply changing the database name in the DataSource configuration will not be enough.

You might also face the same problem if you have made a copy of the foreign database, and want to keep different environments (testing and production, for example) with separate schema holders.

SOLUTION:

This solution assumes that only the foreign database name has changed. If there were actual changes to the table definitions, you will need to re-pull the schema definitions into the schema holder.

1) Dump the schema holder definitions: from Data Administration. Make sure the schema holder is the working database, and select
Admin > Dump Data and Definitions > Data Definitions (.df file).

2) Open the file in any editor (Procedure Editor, for instance).
The foreign database name is defined as QUALIFIER in the .df file,
for each table in the schema holder.

3) Change the QUALIFIER value to the database name. (Be careful when
changing the .df file.)

For instance, if the old database name is TEST and the new
database name is PROD, replace the line:

QUALIFIER "test"

with

QUALIFIER "prod".


4) Then you will need to load the changed .df into the schema holder.
Make a backup of the original schema holder, and recreate it so you can load the .df file.