0

I am facing a problem with oracles users tablespace. It automatically grows really fast. What kind of data is stored there? And what happens when it hits 100% of space used? Is there a solution to reduce the amount of data in this tablespace? At the moment we have 11 MB free of total 33 GB. Is it a good idea to delete it and how to do it? Thanks.

  • 1
    "What kind of data is stored there" - anything you insert into tables which are using that tablespace. "Is there a solution to reduce the amount of data in this tablespace?" - yes, don't insert that many rows – a_horse_with_no_name Feb 21 at 13:45
  • Scary question. Do you have an Oracle DBA at work you can talk to? – Philᵀᴹ Feb 21 at 18:08
1

I would say that some or all of your application data is likely stored in the USERS tablespace. Don't do anything rash.

IIRC databases created by the dbca utility have USERS set as the default tablespace. This means that any new users created will store their tables etc. in USERS by default.

select * from dba_segments where tablespace_name = 'USERS' will give you a starting-point for seeing what is in the tablespace. (It could be a long list.)

select * from dba_users where default_tablespace = 'USERS' will show you the schema owners which will store their data in USERS by default.

I suggest that you don't see it as a problem to be solved, but accept that USERS is where the data is stored, and plan for controlled future growth of the tablespace. I have seen a couple of applications which had been installed like this.

HTH

|improve this answer|||||
0

You should really drill into who has data there and what kind of data is there. Using an aggregate query will yield better results. Rather than selecting every segment in dba_segments this will tell you how much data each user has in the USERS tablespace and which objects are the largest. You might want to take some of the larger objects and put them in a separate tablespace. You should also query the dba_tables view and see if pctincrease is not null and larger than 0. If it is then the object with pctincrease set higher than 0 are going to grow at a faster rate. For example if you have a table or tablespace with pctincrease set to 100, the segment size will double every time a new segment is created. That could be a problem.

SELECT owner, TO_CHAR( SUM( bytes )/1024/1024, '999,999,999' ) mb FROM dba_segments WHERE tablespace_name = 'USERS' GROUP BY owner ORDER BY SUM( bytes );

SELECT owner, object_type, TO_CHAR( SUM( bytes )/1024/1024, '999,999,999' ) mb FROM dba_segments WHERE tablespace_name = 'USERS' GROUP BY owner, object_type ORDER BY SUM( bytes );
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.