Subject | 2.1: Strange dependencies when dropping objects |
---|---|
Author | Thomas Woinke |
Post date | 2008-04-25T12:39:37Z |
Hi there,
when trying to drop a view i get the following error on 2.1 SS:
SQL> drop view album_view;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-cannot delete
-COLUMN ALBUM_ID
-there are 1 dependencies
2.0 SS drops the view without complaining.
What's the matter here? Did I miss some new feature?
Regards,
Thomas
For the sake of completeness, here is what Tables and View look like:
The view consists of a simple JOIN:
select
a.album_id, interpret_id, title, genre, jahr, release_date,label,
inserted, nbr_reviews, newest_review from
album a
left join
album_stats s
on
a.album_id = s.album_id
;
SQL> show table album;
ALBUM_ID BIGINT Not Null
INTERPRET_ID INTEGER Not Null
TITLE VARCHAR(250) CHARACTER SET ISO8859_1 Not Null
COLLATE DE_DE
PIC_URL VARCHAR(250) Nullable
GENRE VARCHAR(250) Nullable
JAHR INTEGER Not Null
RELEASE_DATE DATE Nullable
LABEL VARCHAR(250) Nullable
INSERTED TIMESTAMP Not Null default current_timestamp
CONSTRAINT ALBUM_FK:
Foreign key (INTERPRET_ID) References INTERPRET (SEQ_ID) On
Update No Action On Delete No Action
CONSTRAINT ALBUM_PK:
Primary key (ALBUM_ID)
Triggers on Table ALBUM:
ALBUM_BI, Sequence: 0, Type: BEFORE INSERT, Active
ALBUM_AI, Sequence: 0, Type: AFTER INSERT, Active
SQL> show table album_stats;
ALBUM_ID BIGINT Not Null
NBR_REVIEWS INTEGER Not Null default 0
NEWEST_REVIEW TIMESTAMP Nullable
CONSTRAINT ALBUM_STATS_FK:
Foreign key (ALBUM_ID) References ALBUM (ALBUM_ID) On Update No
Action On Delete Cascade
CONSTRAINT ALBUM_STATS_PK:
Primary key (ALBUM_ID)
when trying to drop a view i get the following error on 2.1 SS:
SQL> drop view album_view;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-cannot delete
-COLUMN ALBUM_ID
-there are 1 dependencies
2.0 SS drops the view without complaining.
What's the matter here? Did I miss some new feature?
Regards,
Thomas
For the sake of completeness, here is what Tables and View look like:
The view consists of a simple JOIN:
select
a.album_id, interpret_id, title, genre, jahr, release_date,label,
inserted, nbr_reviews, newest_review from
album a
left join
album_stats s
on
a.album_id = s.album_id
;
SQL> show table album;
ALBUM_ID BIGINT Not Null
INTERPRET_ID INTEGER Not Null
TITLE VARCHAR(250) CHARACTER SET ISO8859_1 Not Null
COLLATE DE_DE
PIC_URL VARCHAR(250) Nullable
GENRE VARCHAR(250) Nullable
JAHR INTEGER Not Null
RELEASE_DATE DATE Nullable
LABEL VARCHAR(250) Nullable
INSERTED TIMESTAMP Not Null default current_timestamp
CONSTRAINT ALBUM_FK:
Foreign key (INTERPRET_ID) References INTERPRET (SEQ_ID) On
Update No Action On Delete No Action
CONSTRAINT ALBUM_PK:
Primary key (ALBUM_ID)
Triggers on Table ALBUM:
ALBUM_BI, Sequence: 0, Type: BEFORE INSERT, Active
ALBUM_AI, Sequence: 0, Type: AFTER INSERT, Active
SQL> show table album_stats;
ALBUM_ID BIGINT Not Null
NBR_REVIEWS INTEGER Not Null default 0
NEWEST_REVIEW TIMESTAMP Nullable
CONSTRAINT ALBUM_STATS_FK:
Foreign key (ALBUM_ID) References ALBUM (ALBUM_ID) On Update No
Action On Delete Cascade
CONSTRAINT ALBUM_STATS_PK:
Primary key (ALBUM_ID)