MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Few DB2 questions for which answers required

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
vikramdr
Beginner


Joined: 15 Feb 2003
Posts: 15
Topics: 11

PostPosted: Sat Dec 09, 2006 2:31 pm    Post subject: Few DB2 questions for which answers required Reply with quote

1. SQL Syntax errors are checked in which stage
a) Precompile
b) Bind
c) Both stages
d) Depends on the DB2 installation

My guess is it is done only in Precompile. But I am not sure if it is done in Bind step also. Please clarify.

2. When the table is dropped, does all the views which were defined on that tables also gets dropped automatically ?
_________________
Vikram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Dec 09, 2006 6:37 pm    Post subject: Reply with quote

vikramdr,

1.When you precompile your program, the precompiler does not validate the names of tables and columns that are used in SQL statements. However, the precompiler checks table and column references against SQL DECLARE TABLE statements in the program. Therefore, you should use DCLGEN to obtain accurate SQL DECLARE TABLE statements.

You might need to precompile and compile program source statements several times before they are error-free and ready to link-edit. During that time, you can get complete diagnostic output from the DB2 precompiler by specifying the SOURCE and XREF precompiler options.

A bind uses the Database Request module(s) from the DB2 precompile step as input and produces an application plan. It also checks the user's authority and validates the SQL Statements in the DBRM.

2. Whenever a table is dropped, all privileges on the table, all referential constraints in which the table is a parent or dependent, and all synonyms, views, and indexes defined on the table are also dropped. If the table space for the table was implicitly created, it is also dropped.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group