Consultor Eletrônico



Kbase P146024: How to delete a schema image and re-load a new schema image back to the same schema holder?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   08/05/2009
Status: Unverified

GOAL:

How to delete a schema image and re-load a new schema image back to the same schema holder?

GOAL:

HOw to load a schema image from one schema holder to another schema holder?

GOAL:

How to delete an existing schema image?

GOAL:

How to delete schema image from schema holder?

GOAL:

How to load schema image .df file to an empty schema holder?

GOAL:

How to load schema image .df file to an empty database?

GOAL:

How to load a modified table from one schema holder to a different schema holder?

FACT(s) (Environment):

DataServer
All Supported Operating Systems

FIX:

You can usually change the schema image for foreign data source using the Data Dictionary by manually editing the tables and fields. But if you, for example, have a windows GUI Data Dictionary to change and try to re-distribute the changes to the schema holder on to other Windows/UNIX based client machine, you can follow one of the four methods described below:


METHOD 1: If you need to create a schema holder from an existing schema image .df file:

1. Create an empty Database
2. Load the .df file using the data definition load utility on the Data Administration/Dictionary > Admin > Load Data and Definitions > Load Data Definitions (.df file)


METHOD 2: If you need to modify schema holder to load a new schema image .df and delete the existing schema image:

1. Connect to the schema holder and the foreign schema image
2. Delete the schema image by going to Data Administration (windows)/Dictionary (UNIX) > DataServer menu> appropriate foreign data source utilities (Oracle, MS SQL, or ODBC) > Delete DataServer Schema..., and click Yes to confirm the deletion of the schema image.
3. Reload the new schema image .df file into the same schema holder

If you do not mind creating another schema holder with the same name you can delete the existing schema holder using the following command on the proenv prompt or Operating System delete, then follow Method 1.

prodel <schema holder name>

press "y" on the keyboard to confirm the deletion.


METHOD 3: If you modified a table on the schema holder:

1. Dump the .df for the specific table from the schema holder
2. Delete the table from the schema holder
3. Modify the .df dumped on the step1 to add the following on the top of the file:

UPDATE DATABASE "<-ld name used on the connection parameter>" TYPE <FOREIGN DATA SOURCE DB TYPE>*

*<FOREIGN DATA SOURCE DB TYPE> should be replaced for MSS for MS SQL Server, ORACLE for ORACLE Database, and ODBC for other ODBC foreign data source type.


METHOD 4: Likewise if a field is changed, then

1. Dump the .df for the specific table from the schema holder
2. Delete the field from the table on the schema holder
3. Modify the .df dumped on the step1, and delete all the fields except the one changed and change the "ADD TABLE" to "UPDATE TABLE". Also need to add the following which is same as the second workaround shown above:

UPDATE DATABASE "<-ld name used on the connection parameter>" TYPE <FOREIGN DATA SOURCE DB TYPE>**

**<FOREIGN DATA SOURCE DB TYPE> should be replaced for MSS for MS SQL Server, ORACLE for ORACLE Database, and ODBC for other ODBC foreign data source type.


Usually Method 1, Method 2 are most easier to do. If the schema image is really big, Method 3 is easier.