- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: schema object
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-10-2002 03:08 AM
тАО12-10-2002 03:08 AM
I tried to create a schema object for ANDREA user with a object ( TABLE):
Is it right?
SQL> create user "ANDREA"profile "DEFAULT" identified by "lazio"
2 default tablespace "PROVA_LOCAL" temporary tablespace "TEMP";
SQL> grant create session to "ANDREA";
Grant succeeded.
SQL> grant connect to "ANDREA";
Grant succeeded.
SQL> grant unlimited tablespace to "ANDREA";
Grant succeeded.
SQL> grant resource to "ANDREA";
Grant succeeded.
SQL> grant create any view to "ANDREA";
Grant succeeded.
Creazione tabella:
SQL> create table STRANO(
2 citta varchar2(13) not null,
3 datacampione date not null,
4 precipitazione number
5 );
Table created.
SQL> commit;
Commit complete.
SQL> select object_name, object_type from all_objects where owner = 'ANDREA';
OBJECT_NAME OBJECT_TYPE
------------------------------ ------------------
STRANO TABLE
I created the TABLE STRANO in the PROVA_LOCAL tablespace, how can I see the free space in that tablespace?
thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 03:20 AM
тАО12-10-2002 03:20 AM
Re: schema object
select sum(bytes) from dba_free_Space where tablespace_name = 'PROVA_LOCAL';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 03:26 AM
тАО12-10-2002 03:26 AM
Re: schema object
where tablespace_name = 'PROVA_LOCAL';
will give you the total number of free bytes in that tablespace.
select bytes from user_free_space
where tablespace_name = 'PROVA_LOCAL';
will give you a list of the size of each free extent.
Is this what you want?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 03:40 AM
тАО12-10-2002 03:40 AM
SolutionTABLESPACE USAGE NOTES:
Tablespace Name - Name of the tablespace
Bytes Used - Size of the file in bytes
Bytes Free - Size of free space in bytes
Largest - Largest free space in bytes
Percent Used - Percentage of tablespace that is being used - Careful if it is more than 85%
select a.TABLESPACE_NAME,
a.BYTES bytes_used,
b.BYTES bytes_free,
b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
(
select TABLESPACE_NAME,
sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
)
a,
(
select TABLESPACE_NAME,
sum(BYTES) BYTES ,
max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
)
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 03:44 AM
тАО12-10-2002 03:44 AM
Re: schema object
Yes, the following piece of SQL will give you the information desired (in MB):
select sum(bytes)/1024/1024 "Free in MB" from user_free_space
where tablespace_name = 'PROVA_LOCAL';
You may also wish to get all the free space available in all tablespaces. Run the attached script using an oracle account having "select all tables" role or dba.
Hope this helps!
Regards
Yogeeraj