Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Delete status of DB2 Views

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kespra
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 24
Location: bangalore

PostPosted: Fri Aug 15, 2008 9:03 pm    Post subject: Delete status of DB2 Views
Reply with quote

If Master table gets deleted then view also will be deleted or not?
Back to top
View user's profile Send private message

Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Fri Aug 15, 2008 9:29 pm    Post subject:
Reply with quote

Hi

If the Master Table is deleted, then VIEW definition will not be deleted but when you try to access the view, you will get -206 error code stating that the object is not found.
Back to top
View user's profile Send private message
kespra
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 24
Location: bangalore

PostPosted: Fri Aug 15, 2008 10:37 pm    Post subject:
Reply with quote

Thanks for for the answer but one doubt whether View table is present or not
Back to top
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Fri Aug 15, 2008 11:28 pm    Post subject:
Reply with quote

View is not a physical stuff. It is a logical one. A view is an alternative way of representing data that exists in one or more tables.

No records will be stored inside the view. Whenever we access the view, it will in turn read the table based on the View definition and display the data.

Only the definition will be present. Logically speaking VIEW will not be present in other words, we cannot access if the base table is dropped.

Please refer the below link

http://msdn.microsoft.com/en-us/library/aa258841(SQL.80).aspx

Hope this helps.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Sat Aug 16, 2008 6:03 am    Post subject:
Reply with quote

Suresh Ponnusamy wrote:

Please refer the below link

http://msdn.microsoft.com/en-us/library/aa258841(SQL.80).aspx



Actually View will be dropped with the table in DB2. There won't be anything left of the view. DB2 and SQL Server don't always follow same rules!
Back to top
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Tue Aug 19, 2008 7:53 pm    Post subject:
Reply with quote

Hi

View will not be automatically dropped when we drop the table. Yes, we cannot perform any operations using Views without the table existence but View definition will be reside in SYSIBM.SYSVIEWS until it expliciltly dropped.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Thu Aug 21, 2008 1:22 am    Post subject:
Reply with quote

Suresh Ponnusamy wrote:
Hi

View will not be automatically dropped when we drop the table. Yes, we cannot perform any operations using Views without the table existence but View definition will be reside in SYSIBM.SYSVIEWS until it expliciltly dropped.


Actually this is incorrect. As per DB2 V7 in z/OS, views is gone along with table. I am not sure of V8, but probably same in there as well. Perhaps you can point to some IBM manual that confirms your conclusion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us