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 > How to drop tablespace...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-11-03, 16:59
nagasurir nagasurir is offline
Registered User
 
Join Date: Nov 2003
Location: California,USA
Posts: 71
How to drop tablespace...

I am getting the below error when I try to drop a tablespace. Can anyone help to resolve this error...

SQL0282N Table space "<tablespace-name>" cannot be dropped because at least one of the tables in it, "<table-name>", has one or more of its parts in another table space.

But the above mentioned "table-name" does not contain any any part in different tablespace.
Reply With Quote
  #2 (permalink)  
Old 11-11-03, 17:40
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: How to drop tablespace...

Quote:
Originally posted by nagasurir
I am getting the below error when I try to drop a tablespace. Can anyone help to resolve this error...

SQL0282N Table space "<tablespace-name>" cannot be dropped because at least one of the tables in it, "<table-name>", has one or more of its parts in another table space.

But the above mentioned "table-name" does not contain any any part in different tablespace.
The message reference states:

"The base table, indexes, or long data may be in another table space, so dropping the table space(s) will not completely drop the table. This would leave the table in an inconsistent state and therefore the table space(s) cannot be dropped".

Are you sure that no indexes or LOBs for that table are stored in other tablespaces?
Reply With Quote
  #3 (permalink)  
Old 11-11-03, 17:47
nagasurir nagasurir is offline
Registered User
 
Join Date: Nov 2003
Location: California,USA
Posts: 71
YES...

I am damn sure that no db objects are occupying the other table space...

Thanks
Reply With Quote
  #4 (permalink)  
Old 11-11-03, 19:00
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
If you are very confident, then ,

1) Check db2diag.log file ... There may be error messages. If there are none, set the diaglevel to 4 and issue the command again ... this time there shoud be messages.

2) If you are desperate to drop the tablespace, then contact IBM support with your problem . They should be able to help

If you want to check for dependencies once again, please read on ...


1) If you are comfortable with graphical tools, then in the control centre, tablespaces , right click on the tablespace name and select 'Show Related Objects'

2) If you are comfortable with the command line, then do

select * from syscat.tables where tbspace=<name> or index_tbspace=<name> or long_tbspace=<name>

Cheers
Sathyaram



Quote:
Originally posted by nagasurir
YES...

I am damn sure that no db objects are occupying the other table space...

Thanks
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 11-12-03, 11:35
mixxalot mixxalot is offline
Registered User
 
Join Date: May 2003
Posts: 369
DB2DART

You should use DB2DART to mark the tablespace as bad and put into drop pending mode to drop the tablespace. Be careful though and work with IBM support when using DB2DART.
Reply With Quote
  #6 (permalink)  
Old 11-12-03, 16:47
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,303
Why not select from the catalog to prove there aren't any other objects?
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
  #7 (permalink)  
Old 11-15-03, 15:44
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
If this is a dms tablespace it is possible that indexes are in another tablespace. Another way to check this out may be to extract the DDL for the table

db2look -e -p -d <dbname> -t <tabname> -x -z <schemaname> -o <outfile>

The other thing that may be the case is Foreign key relationships - this will prevent the drop - ie if you are trying to drop a parent while a child exists.
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