If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > error of creating db from DDL extracted in db2look

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-19-11, 03:44
tencien tencien is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
error of creating db from DDL extracted in db2look

I generate a DDL with db2look, and create a new db with this DDL file. most of view cannot created due to the view's dependency problem , the error like below, any idea for sloving this problem
any idea for generating db2look in the correct dependency order


DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0204N "FRRBF" is an undefined name. SQLSTATE=42704
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0204N "FRRBF" is an undefined name. SQLSTATE=42704

Last edited by tencien; 07-19-11 at 03:57.
Reply With Quote
  #2 (permalink)  
Old 07-19-11, 04:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Try upgrading to the latest fixpack, or rerun the db2look file (or may just portion with create views). If you rerun the db2look file (or just the create views), and objects that already exist will just give an error than can be ignored.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 07-19-11, 04:34
tencien tencien is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
error of creating db from DDL extracted in db2look

Quote:
Originally Posted by Marcus_A View Post
(or may just portion with create views)
sorry , I don't understand this idea , do you mind elaborate it ?
Reply With Quote
  #4 (permalink)  
Old 07-19-11, 06:48
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
he means : run db2look - errors for missing views = ok
re-execute the same file = errors for existing objects - missing objects from previous run are now created
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #5 (permalink)  
Old 07-19-11, 10:54
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by tencien View Post
sorry , I don't understand this idea , do you mind elaborate it ?
The views are all in one section of the db2look, so you could easily copy them to another file and rerun the views only, which should solve the dependency problem. It is possible that you may need to run them multiple times. You can ignore any errors regarding the views already existing.

Note: If you use this method, you don't want to generate the db2look file with "DROP" option to create drop statements for each object being created.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On