473,395 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

db2look not showing not null characterstics for columns in hierarchy tables definitio

Hi all,

I don't know i would able to explain my problem or not. I have a hierarchy tables and i want to duplicate those hierarchy tables into other database. I tried loading data with export and import. but what i have seen after importing the data is the nullability characteristics of some columns are lost..i.e in original tables they were not null and now they are null(i did "describe table" both the sides). then i used db2look to generate the DDL for the original table but i couldn't find anywhere in the table definition or structured data type definition that there is a not null defined. but I can see in the "describe table" output that the columns have not null characteristics. I don't know where to look now.

Any suggestion or any help. Thanks in advance
Feb 25 '08 #1
1 1625
sakumar9
127 Expert 100+
If your original tables has NOT NULL constraint set, then this will be present in db2look output, against the name of column.


You can try following:
Expand|Select|Wrap|Line Numbers
  1. 1. CREATE DB TEST;
  2. 2. CONNECT TO TEST;
  3. 3. CREATE TABLE TEST  ("IP_ID" INTEGER NOT NULL);
  4. 4. CONNECT RESET;
  5. 5. db2look -d test -z administrator -e -o test.out
  6.  
  7.  
The db2look output is as follows:
Expand|Select|Wrap|Line Numbers
  1. -- This CLP file was created using DB2LOOK Version 9.5
  2. -- Timestamp: 26/02/2008 10:31:18
  3. -- Database Name: TEST           
  4. -- Database Manager Version: DB2/NT Version 9.5.0          
  5. -- Database Codepage: 1208
  6. -- Database Collating Sequence is: SYSTEM_1252
  7.  
  8.  
  9. CONNECT TO TEST;
  10.  
  11.  
  12.  
  13. ------------------------------------------------
  14. -- DDL Statements for table "ADMINISTRATOR"."TEST"
  15. ------------------------------------------------
  16.  
  17.  
  18. CREATE TABLE "ADMINISTRATOR"."TEST"  (
  19.           "IP_ID" INTEGER NOT NULL )   
  20.          IN "USERSPACE1" ; 
  21.  
  22.  
  23.  
  24.  
  25.  
Feb 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Bodza Bodza | last post by:
I'm having an argument with an incumbent self-taught programmer that it is OK to use null foreign keys in database design. My take is the whole point of a foreign key is that it's not supposed...
2
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups...
3
by: dbtoo_dbtoo | last post by:
One of the databases has 50 views and when I do a db2look I only get schema for 40 of them. If I select from the sysviews, I can see all 50 (the text column contains schema for all 10 (missing)...
0
by: Lennart Jonsson | last post by:
Hi, I'm using db2 udb linux v7.2 fixpak 9 and came across a problem. I didnt find it in any apar nor mentioned in this newsgroup, so I'm curios if anyone else experienced it, and how they solved...
6
by: sriram | last post by:
Hi, I have been seing a weird problem with db2look tool in db2 8.2 on Windows 2000 platform. When i spool the DDL using db2look, it spools the DDL in the ascending order of database objects...
2
by: BF | last post by:
Hi, I have some tables where I import data in, lots of field have gotten a NULL value which the application can not handle. Now can I replace each NULL value with '' in a columns with: update...
2
by: Justin | last post by:
Is there a way to get the ddl for a subset of tables? In this case, get all the tables beginning with emp from the sample db? Example db2look -e -tw emp* -d sample
4
by: Sep410 | last post by:
Hi All, I have problem with combo box. It is funny but I don't know what to do. When I load my form I load my combos with this Sub: Private Sub CityLoad() Dim sql As String ...
1
by: blaisestephen | last post by:
I have a dilema where I want to run DB2LOOK to keep copies of our table DDL's and procedures for our schema. the problem is that we do not even have select privilege for the SYSCAT schema, which...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.