Hi Amit,
There are several ways to make a drop statement.
Below is an example of creating a drop statement with reference to the sysmaster:systabnames table.
$ echo "unload to drop_tables.sql delimiter ';' select 'drop table '|| trim(tabname) from systabnames where dbinfo('dbspace', partnum) = 'dbs1' and tabname not like 'sys%' and tabname <> 'TBLSpace' and tabname <> '_temptable'" | dbaccess sysmaster
Database selected.
1 row(s) unloaded.
Database closed.
$ cat drop_tables.sql
drop table tab1;
------------------------------
SangGyu Jeong
Software Engineer
Infrasoft
Seoul Korea, Republic of
------------------------------
Original Message:
Sent: Wed June 10, 2020 06:42 AM
From: AMIT PATEL
Subject: Non Critical DbSpace drop
Hi Team,
If I need to drop a non critical dbspace , do I need to drop all its tables first?
If yes , how to see how many database and table inside particular dbspace and how to delete all tables at once from that dbspace?
Please suggest.
Thanks
Amit Patel
------------------------------
AMIT PATEL
------------------------------
#Informix