470,636 Members | 1,462 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

Droping an index

Hi Everybody,
I have a view created based on two base tables..now when i drop one of
the tables on which the view is dependent ..what would happen when i
try to select some records from that view ..? Does the view becomes not
usable or autmatically that will get droped as soon as one of the base
table on which it depends get dropped...?
Thanks in advance
Bye

Dec 29 '05 #1
2 1091
Raja Shekar wrote:
Hi Everybody,
I have a view created based on two base tables..now when i drop one of
the tables on which the view is dependent ..what would happen when i
try to select some records from that view ..? Does the view becomes not
usable or autmatically that will get droped as soon as one of the base
table on which it depends get dropped...?
Thanks in advance
Bye

The view will effectively be dropped.
DB2 will keep the defintion in SYSCAT.VIEWS however, marking the view as
invalid.
There is no automatic revalidation.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab
Dec 29 '05 #2
The other thing to remember is that DB/2 when invalidating a view will
also remove permissions from that view. If DB2 security is handled by
a group other than DBAs, this can cause some organizational headaches.

Here's a query to list views dependent on an table...
SELECT VIEWSCHEMA, VIEWNAME
FROM SYSCAT.VIEWDEP
WHERE BNAME = '<table name>'
AND BSCHEMA = ' <table schema>'

Dec 29 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jofio | last post: by
9 posts views Thread by kosh | last post: by
2 posts views Thread by skura | last post: by
8 posts views Thread by Andr? Queiroz | last post: by
14 posts views Thread by Sean C. | last post: by
85 posts views Thread by Russ | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.