- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to monitoring tablespace usage
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 07:22 PM
тАО12-21-2003 07:22 PM
I write a sql statement to report tablespace usage, but oracle report a error message
ORA-00904: invalid column name
Instead I create temporary table, the same situation occurs. I don't know why it is.
Would somebody gives me any instruction.
Thank you very much
steven chang
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 07:33 PM
тАО12-21-2003 07:33 PM
SolutionCan you give the details of the script?
Is the column name being listed part of table/view definition?
Check the description with SQL
desc table_name;
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 07:57 PM
тАО12-21-2003 07:57 PM
Re: script to monitoring tablespace usage
(the script is already attached ;)
just add quotes and it will work:
select a.tablespace_name,a."Total",b."Used",b."Used"/a."Total" "%"
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 08:14 PM
тАО12-21-2003 08:14 PM
Re: script to monitoring tablespace usage
or remove the quotes:
select a.tablespace_name,a.total,b.used,b.used/a.total "%"
from (select tablespace_name, sum(bytes) total
from dba_data_files
group by tablespace_name) a ,
(select tablespace_name, sum(bytes) used
from dba_free_space
group by tablespace_name) b
where a.tablespace_name=b.tablespace_name
/
If you are using Quotes, the name of the columns are case sensitive.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 08:23 PM
тАО12-21-2003 08:23 PM
Re: script to monitoring tablespace usage
I would consider to create temporary table to store the data from dba_data_files,dba_free_space. And now there is no need to to such things.Thank you !!!
steven chang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2003 08:57 PM
тАО12-21-2003 08:57 PM
Re: script to monitoring tablespace usage
We use the attached SQL script to list freespace by tablespace.
Contains the following columns:
Tablespace Name
KBytes
Used
%Free
%Used
Largest
Max Poss Kbytes
...
We can order accoding the the above mentioned columns by passing the coulmn number as argument:
e.g. @free 1 ====> sorts by tablespace name first
hope this helps too!
regards
Yogeeraj