[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::repository

Title:Oracle CDD/Repositorynce
Notice:Current versions are V7.0-01 and V6.1-03eld Test 3
Moderator:8292::PJACOBN
Created:Thu Jan 21 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1094
Total number of notes:4913

1059.0. "integrate and CDD$RDB_DATA_ELEMENT" by m5.us.oracle.com::JHAYTER () Thu Feb 27 1997 16:51

Hi,

cdd 6.1-any, rdb 6.1-any

I'm trying to find out what is expected behavior of
SQL> integrate database file x create pathname cdd$default.x

If I use the cdd for everything, ie. create the database via pathname, and
create table from path.., then

If I delete generic cdd$databAse x, the link between cdd fields/records and
the database are gone.  Then when I integrate the db back, the links are
restored.  Are they supposed to be?

Why ask?  If I create a db by filename, create a table, and then integrate
and CDO> enter the field/record from database, I get the links.
But then if I delete generic database, integrate again, the links between
the previously "entered" field/records and the database are not restored.
Trying to use one of the field in a new record to create a new table
ends up with the DUPGLOBAL error.  Deleteing all fields/records and
reentering from database is required to get around the error.

So, why does integrate re-establish the links with a DB created via pathname
but does not for a DB created by the back door approach.

Thanks,
Jerry
T.RTitleUserPersonal
Name
DateLines
1059.1NOVA::SMITHIDon't understate or underestimate Rdb!Thu Feb 27 1997 19:2916
when you CREATE DATABASE PATHNAME, the CDD paths are stored in the
RDB$RELATIONS and RDB$FIELDS table in the database itself.

when you INTEGRATE then only the target is updated.  i.e.
in this case
SQL> integrate database file x create pathname cdd$default.x
the target is the CDD.

Take a look at the RDB$CDD_PATH (RDB$DATABASE) and RDB$CDD_NAME (RDB$RELATIONS
and RDB$FIELDS) after the integrate, they will all be empty.

So these links can be reestablished by INTEGRATE when you CREATE DATABASE
PATHNAME, or use ATTACH PATHNAME and reference the CDD using CREATE TABLE ...
PATHNAME or CREATE DOMAIN ... PATHNAME.

Ian
1059.2M5::JHAYTERMon Mar 03 1997 14:4666
Ian,  thanks

>when you CREATE DATABASE PATHNAME, the CDD paths are stored in the
>RDB$RELATIONS and RDB$FIELDS table in the database itself.
>
>when you INTEGRATE then only the target is updated.  i.e.
>in this case
>SQL> integrate database file x create pathname cdd$default.x
>the target is the CDD.
>
>Take a look at the RDB$CDD_PATH (RDB$DATABASE) and RDB$CDD_NAME
>(RDB$RELATIONS
>and RDB$FIELDS) after the integrate, they will all be empty.

This knowledge adds some light, still to dim (dense) to see.
I looked at RDB$CDD_PATH and RDB$CDD_NAME, all null after
create database FILENAME and then integrating.

>So these links can be reestablished by INTEGRATE when you CREATE DATABASE
>PATHNAME, or use ATTACH PATHNAME and reference the CDD using CREATE TABLE
>...
>PATHNAME or CREATE DOMAIN ... PATHNAME.
                                                             
Still confused.  Example why.

Have already created DB via filename, integrated, entered fields/records. 

CDO> define field f datatype is real.
CDO> defin record r. id_dom.  f. end.


SQL> att 'path cdd$default.mf_personnel';
SQL> create table from cdd$default.r;  ! *** works.
SQL> roll;
SQL> disconn all;

CDO delete generic cdd$database mf_personnel;

SQL> integrate datab file pers create path cdd$default.mf_personnel;
SQL> commit;
SQL> disconn all;
SQL> att 'path cdd$default.mf_personnel';
SQL> create table from cdd$default.r;
%CDD-E-DUPGLOBAL, global field with name !AS already exists
-CDD-E-DUPGLOBAL, global field with name ID_DOM already exists

So "some" link does not appear to get reestablished by using
ATTACH PATHNAME and reference the CDD using CREATE TABLE PATHNAME

That missing link appears to be in CDD since after the second integrate
a CDO show field/record does not show a link to the cdd$database entry.

Bottom line, to me anyway.  If a DB is not created via PATHNAME and then
integrated and fields/records are cdd "entered" - then if the cdd
cdd$database entry is deleted, then one must delete the records/fields and
re-"enter" them after re-integrating.  Too many thens :-)

Maybe that is caused by the fact that as you said:
>when you CREATE DATABASE PATHNAME, the CDD paths are stored in the
>RDB$RELATIONS and RDB$FIELDS table in the database itself.

and those paths are missing due to creating the db via filename and the
integrate can't update some link.

Jerry