Hi all,
I'm trying to run the following code taken from
http://blogs.ittoolbox.com/database/...es/006045.asp#
select substr(tablespace_name,1,30) as "Tablespace Name",
case (tablespace_type)
when 0 then 'DMS'
else 'SMS'
end as "Type",
case (tablespace_state)
when 0 then 'Normal'
else 'Other ' || char(tablespace_state)
end as "State",
int((total_pages*page_size)/1024/1024) as "Size (Meg)",
smallint((float(free_pages) / float(total_pages))*100)
as "% Free Space",
int((free_pages*page_size) / 1024 / 1024)
as "Meg Free Space"
from db2$mon_tbs_cfg
It's suppose to find how much freespace is left for a tablespace. I
called the script freespace.sql. I tried to run it with the follownig
command:
db2batch -d SAMPLE -f freespace.sql
However, I recieved a strange error:
SQL0104N An unexpected token ")" was found following "ase
(tablespace_type".
Expected tokens may include: ")". SQLSTATE=42601
If it's expecting ")", why would it say ")" is unexpected?
Any idea is appreciated :)