RE: drop tablespace

RE: drop tablespace

 

  

As far as tables and indexes are concerned, you don't need to drop them.
Not sure about procedures and views but functions do give a prob. You
cannot drop a table if a function referes it, and hence you cannot drop
the tablespace.

You can use the following query to generate function drop statements for
a particular tablespace

select distinct 'drop '||(case when substr(funcname,1,3)='SQL' then
'specific' else '' end) ||' function
'||rtrim(funcschema)||'.'||funcname||';' from syscat.funcdep
a,syscat.tables b where a.bname=b.tabname and b.tbspace = 'ENTER
TBSPACENAME HERE';

If this alone doesn't solve you're problem then you can construct
statements similar to the one above for whatever object types
dependencies still exist

Regards,

Anand


-----Original Message-----
From: Khan Nadeem
[mailto:db2udbdba-ezmlmshield-x48820882.[Email address protected]
Sent: Wednesday, February 28, 2007 11:30 AM
To: LazyDBA Discussion
Subject: drop tablespace


Hi gurus



Can someone tell me how to drop tablespace when we have related objects
in it, do get error when I try to drop

Cause I don't find any command specially for the same

First ,I need to drop tables then tablespace any command to force it



Do let me know



Nadeem



This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies of this message.


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




DB2 & UDB email list listserv db2-l LazyDBA home page