- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: system tablespace fragmentation
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
Forums
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
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
тАО09-13-2001 06:29 AM
тАО09-13-2001 06:29 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2001 08:21 PM
тАО09-13-2001 08:21 PM
Re: system tablespace fragmentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2001 09:32 PM
тАО09-13-2001 09:32 PM
Re: system tablespace fragmentation
If you want to get rid of the fragmentation, you have to export your data, recreate the database and import the the data.
If you want to resize the objects for users SYS and SYSTEM, look at the file
/home/dba/oracle/product/${ORACLE_SID}/rdbms/admin/sql.bsq
.
If you run Oracle Applications, you should also check the adprepdb.sql script.
RGds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2001 11:01 PM
тАО09-13-2001 11:01 PM
Re: system tablespace fragmentation
ALTER TABLESPACE tablespace COALESCE;
To display statistics about coalesceable extents for tablespaces, you can view the
DBA_FREE_SPACE_COALESCED view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2001 11:27 PM
тАО09-13-2001 11:27 PM
Re: system tablespace fragmentation
Defragmentation of tablespaces is done using export / import rutine (remember compress=n if you want to retain extend sizes)
Unfortunately this is not possible with the system tablespace, here you have to recreate to database to get a fresh start.
When working with fragmntation problems I would like to recomend Oracles SAFE Whitepaper
SAFE (Simple Algorithm for Fragmentation Elimination) is a seet of rules to apply during object creation (ie tablespace creation) that sets uniform extent size for your tablespaces, and yor defragmentation problems will be over.
Second; from 8i of you have the possibility to create localy managed tablespaces (where datadictionary information is retained in the tablespaces itself instead of in the system tablespace) this feature is inplace due to the transportable tablespace feature of Oracle, but also includes an option that quite interesting and that is uniform allocation!
Last I might mention that the Oracle Enterpise Manager also has a tool called Reorg Wizard. This does the reallocation of objects locally without export /import.
BUT this also does not support defragmentation of the system tablespace.
So the end of it all is that you'll have to export your database, recreate it and to a full import.
And if you want to live a quiet life afterward, start looking into SAFE or the 8i localy managed tablespaces with the uniform allocation policy (wich infact is SAFE)
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2001 08:32 AM
тАО09-14-2001 08:32 AM
Re: system tablespace fragmentation
Could you tell me where I can find the Oracle "SAFE" whitepaper?
Thanks,
Tiffany
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2001 08:43 AM
тАО09-14-2001 08:43 AM
Re: system tablespace fragmentation
By recreating database, do you mean creating a brandnew empty database with a different instance name, then import the data to this new db?
Thanks,
Tiffany
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2001 11:46 AM
тАО09-14-2001 11:46 AM
Re: system tablespace fragmentation
Run something like the following while connected as SYS or SYSTEM or any user with DBA privileges:
alter tablespace system add datafile '...' size 128M;
Export/Import can be time-consuming procedure for any but small-to-medium size databases. And normally size of system tablespace is a small percentage of a total database size.
I'd check though what had caused the fragmentation otherwise even if you recreate the database pretty soon you will be back to where you have started.
Normally system tablespace will not get fragmented unless some users are using it as their temporary tablespace or created some tables/indexes in it (and dropped them later).
I'd run the following:
1)
select owner, segment_name
from dba_segments
where tablespace_name = 'SYSTEM' and
owner not in ('SYS', 'SYSTEM',
'MDSYS', 'OUTLN', 'ORDSYS',
'AURORA$JIS$UTILITY', 'OSE$HTTP$ADMIN');
/
2)
select username, default_tablespace,
temporary_tablespace
from dba_users
where
(default_tablespace = 'SYSTEM' or
temporary_tablespace = 'SYSTEM')
/
I normally switch temporary tablespace for all users (including sys and system) for TEMPORARY TABLESPACE other than system tablespace.
Normally only accounts created by oracle install will have system tablespace as their default: SYS, SYSTEM, ORDSYS, MDSYS, AURORA$JIS$UTILITY, OSE$HTTP$ADMIN, DBSNMP etc.
You can separate users that created during install from others by running:
select username, trunc(created)
from dba_users
order by 2
/
The ones created at the tablespace creation day will be listed first.
You can change user's default or temporary tablespace by using:
alter user
default tablespace
temporary tablespace
/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2001 10:53 AM
тАО09-15-2001 10:53 AM
SolutionBy export,recreating and importing I mean:
1. Do a full export (full=y compress=n)
2. Shutdown the database
3. Backup your databases datafiles (/u0?/oradata/
4. Scrap your datafiles
5. Create a new database with the SAME instance name.
6. Perform a full import with the dump file from 1. (use parameter commit=y to avoid rollback segment filling up)
2. + 3. isnt nescessary but always a good precaution.
The SAFE withepaper is infact not easy to find , at the moment all I have is a printout. I will gety back to you on this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2001 11:19 AM
тАО09-15-2001 11:19 AM
Re: system tablespace fragmentation
http://technet.oracle.com/deploy/availability/pdf/defrag.pdf
Oracle says:
---
This document is no longer available in the metalink database for customers.
Please refer to Oracle8i performance tuning manual for issues regarding defragmentation.
---
!!!
The new functionallity using UNIFORM allocation in tablespaces takes care of most issues regarding SAFE, the only thing you have to consider is the uniform extent size to use.
In the whitepaper the values;160K, 5120K, or 160M is used, but to make things confusing there are 2 versions of this Whitepaper out there, one stating 160K, 5120 ans 160M sizes and another stating 128K, 4M and 128M to use.
I use the latter, but the main point from a perfomance view to keep the number of extents under 1024 (this inspite the fact that there sin't any measurable degradation with several thousand extents!!)
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2001 05:44 AM
тАО09-18-2001 05:44 AM
Re: system tablespace fragmentation
Andreas,
I found the SAFE white paper. FYI, it says in the article that the extent sizes 160k, 5120k, and 160m are recommended for version 7, and 128k, 4m, and 128k are recommended for verion 8. Thanks for your extra input.
Tiffany