Fragmentation in tablespace
can anyone say me how to find that the tablespace is undergoing fragmentation.please say me the ways o find out whether the tablespace is undergoing fragmentation
Tablespace fragmentation query:
select total.tablespace_name tsname,
count(free.bytes) nfrags,
nvl(max(free.bytes)/1024,0) mxfrag,
total.bytes/1024 totsiz,
nvl(sum(free.bytes)/1024,0) avasiz,
(1-nvl(sum(free.bytes),0)/total.bytes)*100 pctusd
from dba_data_files total,
dba_free_space free
where total.tablespace_name = free.tablespace_name(+)
and total.file_id=free.file_id(+)
group by total.tablespace_name,
total.bytes;
NFRAGS: number of fragmentation in tablespace where there are BYTES amount of free space between extents.
MXFRAG: the maximum size of free space between extents
This only gives you an overall info on space allocation. If you want to know about read/write and throughput of your tablespace use v$filestat. So the higher number in NFRAGS means more frangmenations.
HTH
Girish Sharma
Similar Messages
-
Fragmentation in tablespace in oracle 9i
Hi All,
We have oracle 9.2.0.8 installed in solaris 9, database size is 1.5 TB, we are looking for the tablespaces which are suffering from the fragmentation.
We have locally manged tablesapaces in the database. so can you please tell me, is there any tablespace fragmentation in the locally managed tablespace in oracle 9i, and if it is there than how to relove the situation.?
thanks in advanceIf you mean by fragmentation, a number of free space areas in the data files - sometimes called honeycombing, this script will show them to you.
SELECT 'free space' owner,
' ' object,
' ' obj_type,
f.file_name,
s.file_id,
s.block_id,
s.blocks,
s.bytes/1048576 mbytes
FROM dba_free_space s,
dba_data_files f
WHERE s.file_id = &file_id
AND s.file_id = f.file_id
UNION
SELECT owner,
segment_name,
DECODE(segment_type, 'TABLE', 'T',
'INDEX', 'I',
'ROLLBACK', 'RB',
'CACHE', 'CH',
'CLUSTER', 'CL',
'LOBINDEX', 'LI',
'LOBSEGMENT', 'LS',
'TEMPORARY', 'TY',
'NESTED TABLE', 'NT',
'TYPE2 UNDO', 'U2',
'TABLE PARTITION','TP',
'INDEX PARTITION','IP', '?'),
f.file_name,
s.file_id,
s.block_id,
s.blocks,
s.bytes/1048576
FROM dba_extents s,
dba_data_files f
WHERE s.file_id = &file_id
AND s.file_id = f.file_id
ORDER
BY file_id,
block_id
However, when you look at the report you will see that in a locally managed tablespace, all of the free space 'chunks' are all 8 blocks, or a multiple of 8 blocks. This means that all of these free space chunks are able to be (re)used. And, they will be used. There is no need to do anything unless there is a pressing need to give disk back to the OS. -
Fragmentation of Tablespace - Help
We are dealing with a database of size 30 GB, which
has become very much fragmented. The Fragmentation
Report of the tablespace indicates that the largest single
extent that can be allocated is 116,000 with the other
segments mostly much smaller. Where-as the total blocks
available in the User tablespace is 3,301,373.
On querying V$SGASTAT, we find the free memory size
to be more than 90,000,000 Bytes.
We shall be pleased if any one may suggest a process
to defragment this tablespace.
Thank you -
Prabir Sen.93469, to answer some of your questions:
1- You need to determine if the new tablespace should be locally managed using uniform extents or autoallocate. The answer should probably be based on how much variation exists between the current object sizes (used allocation). If you have a lot of very small tables and a few large one then autoallocate may be a better choice that uniform extents.
2- Why use three files if one will do? You should have a file management policy about file sizes and allocations so you should follow it.
3- The best way to answer this question is to try the import and find out. There are some imp/exp bugs in 8.1 but since your tablespace names will match you will avoid the only one that comes to mind. Tables with LOB objects imported into a db where the target tablespace does not exist so that the table defaults to the owner default tablespace will fair if the LOB segment tablespace points to a non-existing tablespace since Oracle development failed to default it also. But if you do not have LOB segments this is not an issue. Come to think of it I do not think you can import a table with a LOB table into an autoallocate tablespace in version 8.1.
HTH -- Mark D Powell -- -
Hi all experts,
I want to know if found fragmentation in undo tablespace.
Is it recommaned to treat it the same way as usual permanent non system fragmented TBSs.
i.e. do fragmentation
I wonder if temp/undo tbs needs to be defragmented.
Looking for your kind and professional advices and references.
ThanksBeing Locally Managed, TEMP and UNDO are self-managed by Oracle.
I also wonder if you are "de-fragmenting" other tablespaces. If they are Locally Managed and Allocation_Type is either UNIFORM or AUTO, you do not need to "de-fragment" them. If using UNIFORM, set the appropriate Extent Size when you create the Tablespace.
If your Tablespace has been converted from Dictionary Managed to Locally Managed, the Extent Management may appear as "USER" -- in which case you have odd-sized extents brought forward from DMT. Again, "fragmentation" is not an issue once they are Locally Managed.
You could consider rebuilding the tablespaces as LMT with UNIFORM or AUTO when you get an opportunity. (Obviously : TEST, TEST , TEST and measure the effort and downtime -- it may not be justifiable to even expend that effort).
Hemant K Chitale -
Tablespace Datafile Resize ORA-03297
Hi,
In one of our tablespace constituting 4 datafiles, has got some data which is
as follows :
SEGMENT_NAME SEGMENT_TYPE
SYS_C004044 INDEX
SYS_C004315 INDEX
PROJECTRELEASE_INDEX1 INDEX
SYS_C0019289 INDEX
XAK1WBSHIERARCHY INDEX
SYS_IL0000033038C00047$$ LOBINDEX
SYS_IL0000033086C00013$$ LOBINDEX
SYS_IL0000033305C00013$$ LOBINDEX
SYS_IL0000033431C00005$$ LOBINDEX
SYS_IL0000033487C00006$$ LOBINDEX
SYS_IL0000033492C00002$$ LOBINDEX
SYS_IL0000033065C00009$$ LOBINDEX
SYS_IL0000033427C00006$$ LOBINDEX
SYS_IL0000033305C00014$$ LOBINDEX
SYS_IL0000033110C00015$$ LOBINDEX
SYS_IL0000033104C00014$$ LOBINDEX
SYS_LOB0000033038C00047$$ LOBSEGMENT
SYS_LOB0000033427C00006$$ LOBSEGMENT
SYS_LOB0000033065C00009$$ LOBSEGMENT
SYS_LOB0000033492C00002$$ LOBSEGMENT
SYS_LOB0000033487C00006$$ LOBSEGMENT
SYS_LOB0000033431C00005$$ LOBSEGMENT
SYS_LOB0000033305C00014$$ LOBSEGMENT
SYS_LOB0000033086C00013$$ LOBSEGMENT
SYS_LOB0000033104C00014$$ LOBSEGMENT
SYS_LOB0000033110C00015$$ LOBSEGMENT
SYS_LOB0000033305C00013$$ LOBSEGMENT
FORUMMESSAGE_H TABLE
SITEADMIN TABLE
We can move these indexes to different tablespaces, but since these tables have columns with LONG datatypes, we can't move these tables. But we can export the data, drop these tables and import the data in different tabelspaces. But for these lobsegment, how can I move these segments. I believe these got created as a result of indexing of LOB columns. The sizes of these datafiles of this tablespace is in terms of GBs, and I want to reduce the sizes of the same, therefore I tried to use resize command of alter database datafile '***' resize **m, but it thrown ora-03297 error message. I thought it has raised may because of fragmentation of tablespace. I found the blocks were free_space is available using dba_free_space. But after coalescing the tablespace, still I got same no of records in free space. That means the tablespace is not getting coalesced. What is the reason for this. Plz let me know why tablespace data is not getting moved so as to enable me to resize the datafiles.
Thanx,
Kamlesh CIn older versions of Oracle on Windows platforms if you accepted the default names for your datafiles .ora was used. I think beginning in 8.1.x .dbf became the default, which was more like the standards used on other operating systems.
As already pointed out .ora is most commonly used for configuration files like init.ora. -
ORA-01659: unable to allocate MINEXTENTS beyond 13 in tablespace TBSP1
Hi,
I am getting crazy on how to solve this error. :(
I still have 4Gb space in my TBSP1, what does "13" in the keyword "beyond" stands for? is it in bytes or blocks? which parameter can I see this number 13? Is it in tablespace/datafiles storage params or is it in create table parameter?
ThanksPossible solutions:
**On the command prompt**
1.Make sure data file is not filled up and auto extend is on.
2.Try to add a data file or alter existing data file with auto extend capability and max extents unlimited.
alter database datafile '/..../fiilename.dbf' autoextend on maxsize unlimited;
3.Try de-fragmentation of tablespace that caused the problem.
alter tablespace TBSP1 coalesce;
**If you have TOAD, here is the best possible solution**
1. Go to database icon, click schema browser, set your schema as SYSTEM or SYS, then look for tablespaces tab below.
2. Click on the tablespaces tab, look for the tablespace that caused the problem,click the tablespace.
3. Click Basic Info tab, beneath that find extent management.
4. Click on auto allocate extent sizes.
5. Click OK button.
That`s it Problem is resolved.
-Regards
Rah -
Greetings listers,
I've some performance metrics reported as critical on my system. Can you help me understand how to fix these issues? I've the performance tuning guide , which am going through. would like to know the experts comments here about these and any quick pointers ?
# invalid objects - critical 481 invalid objects
enque contention - enque RO Object Reuse 11.11% of the requests must wait
latch-contention SGA latch parallel query stats (#274) contention 50%
roll-block-contention Roolback segment block contention is 9.29%
roll-header-contention rollback segment header contention is 2.39%
seg-top10-physical-reads 10 user processes among the top10 physical reads
sga-library-cache-hit-ratio sga library cache hit ratio 87.80%
sga-shared-pool-free sga shared pool free 3.13%
sysstat - 5591.972 session uga memory/sec
tablespace fragmentation - tbs <TABLESPACE> fsfi is 1.15
Thanks in advanceWhat version of Oracle?
Describe the environment, datbase configuration, concurrent user load, etc ...
Possible answers include
1 - use undo tablespace
2 - reduce degree of parallelism in use
3 - fsfi may not be appropriate tool for use with a tablespace defined to use local extent management
HTH -- Mark D Powell --
Message was edited by: mdp fix lang item 3
mpowel01 -
ORA-1653: unable to extend table PERFSTAT.STATS
Hi there,
I know it's Friday and by the end of the week we normally are not that alert anymore.
However now we have a very puzzling problem, one that leaves two DBA's very amazed.
This morning our alert-log of a 9.2.0.8 database on AIX 5.3 showed:
ORA-1653: unable to extend table PERFSTAT.STATS in tablespace TOOLSEasy, one would say. Extend the tablespace and you're done.
However the tablespace is on autoextend, not even mentioned that it has 2.5Gb of free space.
It is also "Locally Managed", with uniform extent size of 16Kb and manual "segment space management"
The index of this table is in the same tablespace.
The storage parameters are set to "unlimited" possibilities.
A manual
exec statspack.snapresults in the same error where as a
create table statstest as select * from stats$sqltext ; works fine. The mentioned source table here is the one which seems unable to extend due to the "tablespace restrictions"
Some storage parameters:
CREATE TABLE "PERFSTAT"."STATS$SQLTEXT" (
"HASH_VALUE" NUMBER NOT NULL ENABLE,
"TEXT_SUBSET" VARCHAR2 (31) NOT NULL ENABLE,
"PIECE" NUMBER NOT NULL ENABLE,
"SQL_TEXT" VARCHAR2 (64),
"ADDRESS" RAW (8),
"COMMAND_TYPE" NUMBER,
"LAST_SNAP_ID" NUMBER,
CONSTRAINT "STATS$SQLTEXT_PK" PRIMARY KEY
("HASH_VALUE", "TEXT_SUBSET", "PIECE
USING INDEX
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE
INITIAL 1048576
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
) TABLESPACE "TOOLS"
ENABLE
PCTFREE 5
PCTUSED 40
INITRANS 1
MAXTRANS 255
NOCOMPRESS
LOGGING
STORAGE (INITIAL 5242880
NEXT 5242880
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT)
TABLESPACE "TOOLS"Can this be some kind of Data Dictionairy corruption ??virendra.k wrote:
The next extent clause in creation script says that it is required to have at least 1G of contiguous memory. But the satement fails which means that a chunk of this size cannot be allocated. The situation may arise due to fragmentation of tablespace. See metalink doc id [1020182.6|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:9000433346754441541::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,1020182.6,1,0,1,helvetica] if the largest free chunk >= 1G. Other wise increase the size of tablespace. It may help you.
I don't understand the result of 1G you calculated.
I only see: NEXT 1048576 of the primary key, which is 1M and NEXT 5242880 ( 5M) of the table itself.
However it the Note lead me to the solution.
The largest piece of contiguous free space in the tablespace is, according to this Note:
TABLESPACE NAME CONTIGUOUS BYTES
TOOLS 3,407,872 ==> 3Mb
TOOLS 3,407,872
TOOLS 3,407,872
TOOLS 3,301,376
TOOLS 3,194,880
TOOLS 3,194,880
TOOLS 3,194,880
TOOLS 3,194,880
TOOLS 3,088,384
So I executed the following:
SQL> alter table stats$sqltext storage (next 1m);And subsequently:
SQL> exec statspack.snap;Which now succeeds !!
Conclusion: Tablespace REORG needs to be planned.
One more strange thing however:
I altered the NEXT_EXTENT size back to 5M, and again the statspack.snap now works OK.
It must be the either a background COALESCE that solved the problem, or the (maybe existing) corruption in the dictionary is now fixed/gone
Thanks for the assistance -
Hi,
I am trying to build yet an other database audit script. Actually my db target are 9i/10g. The goal is to tell if the database respect some standard and good basics practice. I want to be able to parse the result because it have to run on many databases.
- Any suggestions or remarks are welcome
- your scripts (or link to some url) will be tested and welcome
- I may provide you the source script when it will be advanced.
- You may note that i was inspired for the beginning on a script in www.dba-village.com
The actual defined rules are following :
Instance hiddens parameters
Events valuated in init.ora
Spfile unused
Having no Jvm and Java Pool not set to 0
Difference with v$parameter and spfile
Database Control file name not following rule name
Datafile not folliowing rule name
Redo logs file name not following rule name
Archivelog file name not following rule name
Spfile file name not following rule name
Directories udump, bdump, cdump not following rule name
Tablespace Tablespace having extents no multiple of db_bloxk_size *db_file_multiblock_read_count
Tablespace having data and index
Tablespacfe dictionnary managed
Tablespace not having uniform extent
Tablespace empty
None temporary segment in temporary tablespace
MaxExtent of system tablespace
Role Dangerous Role granted
Privilege Dangerous Privilege Granted
System user granted on object to application user
non system user granted to system schema
Schema Samples schema installed
Segment Non system segment in tablespace sysaux
Non system segment in tablespace system
Lob not in specific tablespace
Objects Objects having blank in name
Columns having blank in name
Datafile Datafile in autoextend mode
Datafile in autoextend mode without maximum
Schema Samples schema installed
User having objects with name like "SYS%'
User having not default tablespace
User having not temporay tablespace
Statistics Statistics with different date on same schema
Schema without Statistics
Table Big table, with statistic without index
Big table, without statistics without index
Table > 10 go with statistic unpartionned
Table > 10 go without statistic unpartionned
Table having more than two unique index
Little table with statistic having index
Little table without statistic having index
Index Index having constraint disabled
Little table with statistic having index
Analyzed table but not analyzed index
synonym Phantom synonym
Data Type used long, long raw, and char
The actual Draft (1st result) is following :
-- Instance Information --
Cpu_Count 2 | Host_Name CBID5000133
Instance_Name puma | Database_Status ACTIVE
Status OPEN | Startup_Time 02-08-2007 10:14
Version 10.2.0.3.0 | Instance_Role PRIMARY_INSTANCE
Database log mode ARCHIVELOG
Background Dump Dest C:\ORACLE\ADMIN\PUMA\BDUMP
Spfile C:\ORACLE\10.2.0\DATABASE\SPFILEPUMA.ORA
-- Database Space (Mb) 1073 | SGA (Mb) 276 --
-- Nb. Datafiles 5 | Nb. Tempfiles 1 --
Data Buffer Hit ratio 96,0 | Library Buffer Hit ratio 99,9
Dict. Buffer Hit ratio 81,0 | Switch number (last hour) 0
Session number 4 | Active session number 4
Redo size (Kb) 51200
Dba_Tablespaces Status OK | V$Log Status OK
V$Datafile Status OK | V$Tempfile Status OK
V$Recover_File OK | V$Recovery_Log OK
Lock number 0 | Indexes unusable 0
Tablespace in Backup Mode 0 | Tablespace > 90% 3
Jobs Broken 0 | Objects Invalid 0
Shared_Pool Failure 0 | Latch > 1% 5
Trigger Disabled 16 | Constraint Disabled 27
-- More Instance Information --
07_dictionnary_accessibility FALSE Db_Keep_Cache_Size 0
Compatible 10.2.0.3.0 Db_Block_Size 8192
Created 31-07-2007 14:03 Logins ALLOWED
Cursor_Sharing EXACT Sort_Area_Size 65536
Db Name PUMA Dbid 3523213029
Db_Cache_Advice ON Db_File_Multiblock_Read_Count 8
Db_Cache_Size 0 Open_Cursor 300
Db_Domain Null Db_Unique_Name puma
Log_Archive_Format ARC%S_%R.%T Remote_Login_PasswordFile EXCLUSIVE
Open_Mode READ WRITE Logins ALLOWED
Processes 150 Pga_Aggregate_Target 95420416
Sga_Target 289406976 Sga_Max_Size 289406976
Shared_Pool 0 Java_Pool_Size 0
Statistics_Level TYPICAL Job_Queue_Processes 10
Undo_Management AUTO Undo_Retention 900
Undo_Tablespace UNDOTBS1 Nls_Character_Set WE8MSWIN1252
-- Tablespaces --
% Largest
Alloc Used Free Used Nb Free % Ext. Ext. Auto
Content Tablespace Name (Mb) (Mb) (Mb) Space frag Ext.(Mb) Coal. M. Ext.
PERMANENT SYSTEM 480 472 8 98.3 2 7.9 100 LOCAL Yes
SYSAUX 240 234 6 97.7 14 4.8 100 LOCAL Yes
EXAMPLE 100 77 23 77.4 3 19.8 100 LOCAL Yes
USERS 5 3 2 65.0 1 1.8 100 LOCAL Yes
sum 825 787 38 20
TEMPORARY TEMP 20 20 0 100.0 LOCAL Yes
sum 20 20 0
UNDO UNDOTBS1 30 30 0 99.4 3 .1 100 LOCAL Yes
sum 30 30 0 3
Tablespace Fragmentation Details
Tablespace FRAGMENTATION_STATUS
EXAMPLE Bubble Frag
SYSAUX Bubble Frag
SYSTEM Bubble Frag
UNDOTBS1 Bubble Frag
USERS No Frag
* Fragmentation Summary
Database total size: 855MB
Fragmentation total size: 0MB,
that is 0% of total
Table fragmentation size: 0MB,
that is 0% of total
Index fragmentation size: 0MB,
that is 0% of total
* Table Fragmentation Summary by Tablespaces
aucune ligne sélectionnée
* Index Fragmentation Summary by Tablespaces
aucune ligne sélectionnée
============================================================================================
OBJECTS FOR REORGANISATION
============================================================================================
* This script reports the table that is highly fragmented
============================================================================================
ALL OBJECTS WITH NUMBER OF EXTENTS > 500 (except temporary and rollback segments)
============================================================================================
============================================================================================
ALL TABLES WITH PERCENTAGE OF CHAINED ROWS > 0.1% (acceptable < 3%)
============================================================================================
============================================================================================
ALL TABLES WITH FREESPACE/BLOCK > 2*PCTFREE
============================================================================================
============================================================================================
ALL TABLES WITH PERCENTAGE OF EMPTY BLOCKS (ABOVE HWM) > 50% (waisted space)
============================================================================================
============================================================================================
display the table name and column name of the tables that need to be indexed
============================================================================================
TABLE_NAME CONSTRAINT_NAME TABLE_TO_BE_INDEXED COLUMN_TO_BE_INDEXED
CHANNELS COSTS_CHANNEL_FK COSTS CHANNEL_ID
PROMOTIONS COSTS_PROMO_FK COSTS PROMO_ID
REGIONS COUNTR_REG_FK COUNTRIES REGION_ID
COUNTRIES CUSTOMERS_COUNTRY_FK CUSTOMERS COUNTRY_ID
EMPLOYEES DEPT_MGR_FK DEPARTMENTS MANAGER_ID
============================================================================================
lists foreign keys that are missing indexes
on the foreign key columns in the child table. If the index is not in place
share lock problems may occur on the parent table
============================================================================================
Missing Index
HR-> COUNTR_REG_FK(REGION_ID[1]) ***** Missing Index
HR-> DEPT_MGR_FK(MANAGER_ID[1]) ***** Missing Index
SH-> COSTS_CHANNEL_FK(CHANNEL_ID[1]) ***** Missing Index
SH-> COSTS_PROMO_FK(PROMO_ID[1]) ***** Missing Index
SH-> CUSTOMERS_COUNTRY_FK(COUNTRY_ID[1]) ***** Missing Index
-- xx. Objects having blank in name --
Rule xx - MICKY TABLE "test blank"
-- xx. Empty tablespaces
Rule xx - Tablespace MICKY_02 vide
Rule xx - Tablespace MICKY_03 vide
Rule xx - Tablespace MICKY_04 vide
Rule xx - Tablespace MICKY_05 vide
-- xx. Analyzed index but not analyzed table
Rule xx Index SYS_IL0000052024C00022$$ not analyzed but table CUSTOMERS is.
Rule xx Index SYS_IL0000052024C00023$$ not analyzed but table CUSTOMERS is.
Rule xx Index SYS_IL0000052024C00022$$ not analyzed but table CUSTOMERS is.
Rule xx Index SYS_IL0000052024C00023$$ not analyzed but table CUSTOMERS is.
-- xx. Dangerous Privilege Granted
Rule xx -> Grantee PRIVILEGE ADM
Rule xx SCHEDULER_ADMIN CREATE ANY JOB YES
Rule xx WMSYS UNLIMITED TABLESPACE NO
Rule xx XDB UNLIMITED TABLESPACE NO
Rule xx OLAP_DBA CREATE ANY TABLE NO
Rule xx OLAP_DBA LOCK ANY TABLE NO
Rule xx OLAP_DBA ALTER ANY DIMENSION NO
-- xx. Table name and column name of the tables that need to be indexed
Rule xx -> TABLE_NAME CONSTRAINT_NAME TABLE_TO_BE_INDEXED COLUMN_TO_BE_INDEXED
!Rule xx CHANNELS COSTS_CHANNEL_FK COSTS CHANNEL_ID
!Rule xx PROMOTIONS COSTS_PROMO_FK COSTS PROMO_ID
!Rule xx REGIONS COUNTR_REG_FK COUNTRIES REGION_ID
!Rule xx COUNTRIES CUSTOMERS_COUNTRY_FK CUSTOMERS COUNTRY_ID
!Rule xx EMPLOYEES DEPT_MGR_FK DEPARTMENTS MANAGER_IDHi, for Oracle 10g you can use the Oracle Policy for custom alerts, then you can monitoring the database from Oracle Database Control.
Regards. -
I get the following errors when clicking on an object in the diff report:
Unable to compare objects.
Ensure that you have the required permissions.
You must own the objects or have select_catalog_role.
But the user of the specified connections in the first window of the database diff tool is the owner so I'm unsure why I'm getting this. As a side note, the specified user does not have select_catalog_role; if this is required then the given error is misleading (because it says one or the other)...
SQL Developer version 3.2.10.09 Build MAIN-09.57Hi,
1) You can schedule job for cleanup logs
<b>http://help.sap.com/saphelp_nw2004s/helpdata/en/15/01df3a1fd91974e10000000a11402f/frameset.htm</b>
2) Tablespace reorganization sapdba
3) DE-FRAGMENTING OF TABLESPACE
Example: <b>PSAPTEMP</b>
sqlplus> <b>alter tablespace psaptemp COALESCE;</b>
regards,
kanthi -
Better to have temp tables or create/drop
Greetings:
This is a question more for the DBA types out there. Generally speaking, if you need a place to store temp. data from a forms application, is it better to have a temp table sitting out there all the time and just truncate it, or create/drop the table as needed? I wondering from a performance standpoint but also, which is worse as far as fragmenting my tablespaces?
Thanks
[email protected]It's better to have it sitting there. Moreover, that table would better have a column (say sesssid) that would be populated with the return of userenv('sessionid') which corresponds to audsid from sys.v_$session.
So, you may periodically run a stored proc that deletes the rows having sessid values that does
delete from temp_table where sessid
not in (select audsid from sys.v_$session).
So, you won't be deleting the data needed by the currently running sessions.
Creating and dropping temp tables gives much fragmentation and degrades performance.
null -
Hello Gurus
I want to migrate some of my databases to another server at one client.The client is asking for minimum downtime.
Like i have a database with 200GB.Now i have below options to migrate.
1)USE rman as downtime would be less.I need to take backup,restore to another server and then down prod,copy archives and apply to new location and make database up.
(this may not take more than 1 hour of downtime)
2)use expdp.downtime would be much but fragmentation in tablespace would be removed.If say i have a file with larger size then its actually using..could be re-organised.
(may take 10-15hrs of downtime)
So guys what are more advantages of using rman n expdp.
Whta you suggest for migration.is it necessary to remove fragmentation so performance would be good in future.
OS-AIX
oracle=10g
Regardsuser11221081 wrote:
Hello Gurus
I want to migrate some of my databases to another server at one client.The client is asking for minimum downtime.
Like i have a database with 200GB.Now i have below options to migrate.
1)USE rman as downtime would be less.I need to take backup,restore to another server and then down prod,copy archives and apply to new location and make database up.
(this may not take more than 1 hour of downtime)
2)use expdp.downtime would be much but fragmentation in tablespace would be removed.If say i have a file with larger size then its actually using..could be re-organised.
(may take 10-15hrs of downtime)
So guys what are more advantages of using rman n expdp.
Whta you suggest for migration.is it necessary to remove fragmentation so performance would be good in future.
OS-AIX
oracle=10g
Regards
There are various ways you can do the migration and it depends upon the lot of factors.
1) About RMAN you mentioned, You can do the restore of the database on the other server( while your original database is up and running on old server) and start recovery(just do not open the database, keep your database in recovery mode and keep applying archive log). At the time of cutover just shutdown the old database apply last few archives on the new server. In this case your recovery time will be in few minutes instead of hours.
2) If you are using SAN, You can just move the LUNS to the new server if you are migrating to like servers. If you are little concern, just to the SAN copy at storage level and mount the copied LUN to the new server. This method will be faster than the methods you mentioned in your thread.
3) RMAN will not get rid of fragmentation. There are different ways to get rid of fragmentation. Google it. -
Hi,
In the Oracle Database Server, which are the files other than Archive file can be deleted.
Regards,
Jigar Panchal.Hi,
1) You can schedule job for cleanup logs
<b>http://help.sap.com/saphelp_nw2004s/helpdata/en/15/01df3a1fd91974e10000000a11402f/frameset.htm</b>
2) Tablespace reorganization sapdba
3) DE-FRAGMENTING OF TABLESPACE
Example: <b>PSAPTEMP</b>
sqlplus> <b>alter tablespace psaptemp COALESCE;</b>
regards,
kanthi -
How to find Fragmentation of tables and tablespaces in oracle 8i
Hi,
How can i measure the fragmentation of Tables and Tablespaces in oracle 8i.
Do any one have any handy script to find the same.
What are the attributes to be determined to do health checkup of a database.how many such empty blocks are there in the table and of what size.Again Tom Kyte reference :
http://asktom.oracle.com/pls/ask/f?p=4950:8:7760471022221195640::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:231414051079
For tablespace, fragmentation is the regular termAbout tablespace, the link from post above can help.
Nicolas. -
Removing Tablespace fragmentation in 10g
i have a problem with a tablespace space that is highly fragmented . It's locally managed with PCT_INCREASE set to 0. How can i reduce the fragmentation in this tablepsace
Free/Used Space Report :
Tablespace Used MB Free MB Total MB Pct. Free
FRP_I01 158556 44625 203181 22
select PCT_INCREASE,EXTENT_MANAGEMENT,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces where TABLESPACE_NAME='FRP_I01';
PCT_INCREASE EXTENT_MAN SEGMEN
0 LOCAL AUTO
fragmentation report :
select
2 tablespace_name,
3 count(*) free_chunks,
decode(
4 5 round((max(bytes) / 1024000),2),
6 null,0,
7 round((max(bytes) / 1024000),2)) largest_chunk,
8 nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
9 0) fragmentation_index
10 from
11 sys.dba_free_space
12 group by tablespace_name
13 having tablespace_name='FRP_I01'
14 order by
15 2 desc, 1;
TABLESPACE_NAME FREE_CHUNKS LARGEST_CHUNK FRAGMENTATION_INDEX
FRP_I01 201 11904 13.56
SELECT dfsc.tablespace_name tablespace_name,
2 DECODE (
3 dfsc.percent_extents_coalesced,
100,
4 5 (DECODE (
6 GREATEST ((SELECT COUNT (1)
7 FROM dba_free_space dfs
8 WHERE dfs.tablespace_name = dfsc.tablespace_name), 1),
9 1,
10 'No Frag',
11 'Bubble Frag'
12 )
13 ),
14 'Possible Honey Comb Frag'
15 )
16 fragmentation_status
17 FROM dba_free_space_coalesced dfsc
18 where dfsc.tablespace_name='FRP_I01'
19 ORDER BY dfsc.tablespace_name;
TABLESPACE_NAME FRAGMENTATION_STATUS
FRP_I01 Bubble Fragyes, i know that. But as per my script this particular tablespace is fragmented and i want to know if some1 can help me out how to defragment it ?
A 100% score indicates no fragmentation at all. Lesser scores verify the presence of fragmentation.The free chunks count column will tell you how many segments of free space are scattered throughout the tablespace.
thanks in advance
Maybe you are looking for
-
SAP BPC 7.5 - Loading Directly from r/3.
Hi, anyone which has experience in loading directly from R/3 into SAP BPC ? are there any starterkits for this ? Only I can find are IFRS, but there are of course many starterkits which can be purchased from 3rd part. Pro/Cons using this direcly load
-
Hi, When I subscribed to iTunes match, it moved all my imported songs (i.e. songs from cds that I owned) into the cloud. I finally got fed up of this, and cancelled my iTunes match subscription, and now all my imported songs have disappeared !! Can s
-
Creating a report containing Report Names and associated Groups in XIr3.2
Hi -- Does anyone know if we have the ability to create a report that contains Report Names and their associated Groups (like LDAP groups)? We actually have Groups associated at the Report Level as well as the Folder level. This functionality did n
-
how do i open .sit files? its a star wars galactic battles demo and its in an .sit format please help soon
-
Hi, I am using DC and want to export Table data to PDF. Please give me sol step by step. regards Anumit