tonydba
asked on
error here
What is the error here
select
2 fs.tablespace_name "TABLESPACE_NAME",
3 (df.totalspace - fs.freespace) "USED MB",
4 fs.freespace "FREE MB",
5 df.totalspace "TOTAL MB",
6 round(100 * (fs.freespace / df.totalspace)) "PCT FREE"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
7 8 9 10 11 from dba_data_files
12 group by tablespace_name) df,
13 (select
14 tablespace_name,
15 round(sum(bytes) / 1048576) FreeSpace
16 from dba_free_space
17 group by tablespace_name) fs
18 where
19 df.tablespace_name = fs.tablespace_name
20 and df.tablespace_name IN ('SYSTEM','SYSAUX','UNDOTB S1','TEMP' ,'TOOLS',' AUDIT_DATA ','USERS', 'ITG_CLOB' ,'ITG_DATA ,'ITG_TEMP ','CWMLITE ')
21 order by fs.tablespace_name;
ERROR:
ORA-01756: quoted string not properly terminated
select
2 fs.tablespace_name "TABLESPACE_NAME",
3 (df.totalspace - fs.freespace) "USED MB",
4 fs.freespace "FREE MB",
5 df.totalspace "TOTAL MB",
6 round(100 * (fs.freespace / df.totalspace)) "PCT FREE"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
7 8 9 10 11 from dba_data_files
12 group by tablespace_name) df,
13 (select
14 tablespace_name,
15 round(sum(bytes) / 1048576) FreeSpace
16 from dba_free_space
17 group by tablespace_name) fs
18 where
19 df.tablespace_name = fs.tablespace_name
20 and df.tablespace_name IN ('SYSTEM','SYSAUX','UNDOTB
21 order by fs.tablespace_name;
ERROR:
ORA-01756: quoted string not properly terminated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
indeed, you omitted a closing quote here:
...,'ITG_DATA,'I...
it should be:
...,'ITG_DATA','I...
...,'ITG_DATA,'I...
it should be:
...,'ITG_DATA','I...
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
20* and df.tablespace_name IN ('SYSTEM')
SQL> /
TABLESPACE_NAME USED MB FREE MB TOTAL MB PCT FREE
--------------------------
SYSTEM 517 1283 1800 71