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.
Similar Messages
-
How to find out the tables effected information from oracle from
can any one tell me how to find out the tables effected information from oracle form
Hi,
Please refer to the following documents.
Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i
Note: 241628.1 - How to Find the Query That Succeeded Recently?
Regards,
Hussein -
How to Find what are tables and "Table Name" in particular "Data File"
hi Team,
I have one database that database 300 gb size , this database having 6 ndf files ,
here How to Find what are the tables and "Table Name" in particular "Data File"[.ndf]Hi,
In addition to Prashanth’s suggestion, you can also use the following Transact-SQL statements to get more detailed information including all objects and indexes per Filegroup / Partition and allocated data size of databases.
The script can work with Microsoft SQL Server 2005 and higher version in all Editions. For more details, please review this article:
List all Objects and Indexes per Filegroup / Partition.
-- List all Objects and Indexes
-- per Filegroup / Partition and Allocation Type
-- including the allocated data size
SELECT DS.name AS DataSpaceName
,AU.type_desc AS AllocationDesc
,AU.total_pages / 128 AS TotalSizeMB
,AU.used_pages / 128 AS UsedSizeMB
,AU.data_pages / 128 AS DataSizeMB
,SCH.name AS SchemaName
,OBJ.type_desc AS ObjectType
,OBJ.name AS ObjectName
,IDX.type_desc AS IndexType
,IDX.name AS IndexName
FROM sys.data_spaces AS DS
INNER JOIN sys.allocation_units AS AU
ON DS.data_space_id = AU.data_space_id
INNER JOIN sys.partitions AS PA
ON (AU.type IN (1, 3)
AND AU.container_id = PA.hobt_id)
OR
(AU.type = 2
AND AU.container_id = PA.partition_id)
INNER JOIN sys.objects AS OBJ
ON PA.object_id = OBJ.object_id
INNER JOIN sys.schemas AS SCH
ON OBJ.schema_id = SCH.schema_id
LEFT JOIN sys.indexes AS IDX
ON PA.object_id = IDX.object_id
AND PA.index_id = IDX.index_id
WHERE OBJ.type_desc='USER_TABLE'-- add this WHERE clause to display the information of user tables
ORDER BY DS.name
,SCH.name
,OBJ.name
,IDX.name
Thanks,
Lydia Zhang -
How to find the new tables and columns in a schema
hi..good morning to all...
I have a schema ABC which owns some objects.
Now some days before I have made another schema XYZ which was a replica of ABC schema.
between these days some new tables, new columns in the existing tables(with or without default value), comments on the columns are being added in the new schema i.e XYZ schema.
Now I have to find the extra things which are present in the new schema. I need to find the new tables, new columns in hte existing tables, their default values and descriptions of those.
Can u plss help me how can I find it?
I am guessing that I have to write a SQL query with a minus clause but I am not able to write it and also dont know where should I execute it.
plss help. thanks in advance.And moreover, when I am executing the query to get the desired result, then it is throwing "illegal use of long datatype" error and pointing to the b.data_default area of my query..
select a.table_name, a.column_name, b.data_default, a.comments from all_col_comments a, dba_tab_columns b
where a.TABLE_NAME=b.TABLE_NAME
and a.OWNER=b.OWNER
and a.OWNER=XYZ
minus
select c.table_name, c.column_name, d.data_default, c.comments from all_col_comments c, dba_tab_columns d
where c.TABLE_NAME=d.TABLE_NAME
and c.OWNER=d.OWNER
and c.OWNER='ABC'
order by 1, 2;
plss help... -
How to find out master tables and concern child tables
Hi,
my schema contains 219 tables. I got this result by using query "selct count(*) from user_tables".
Now i need to know about master tables and concern child tables from these 219 tables.
please guide me.
Thanks and Regards,
VenkatWhat about this one!!!
select a.owner,a.table_name,a.column_name,
'------------------>' as POINTS_TO,b.owner,b.table_name,b.column_name
from dba_constraints c
join dba_cons_columns a on ( c.constraint_name = a.constraint_name and c.owner = a.owner)
join dba_cons_columns b on ( c.r_constraint_name = b.constraint_name and c.r_owner = b.owner)
where (a.table_name = '&table' and (a.owner='&owner')) -- foreign key
-- and (b.table_name = '&table' and (b.owner='&owner') ) -- source key
and ( c.constraint_type='R' )
order by a.table_namecomment and uncomment one between theese two lines to choose the direction.
(a.table_name = '&table' and (a.owner='&owner')) -- foreign key
-- and (b.table_name = '&table' and (b.owner='&owner') ) -- source keyBye Alessandro
Edited by: Alessandro Rossi on 22-ott-2008 10.40 -
How to insert image into table and to in Oracle 9i intermedia?
Mr Lawrence,
I want to ask something:
I use Oracle 9i intermedia
If i use this script:
CREATE TABLE images (
file_name VARCHAR2(100) NOT NULL,
image ORDSYS.OrdImage
then
CREATE OR REPLACE DIRECTORY imgdir AS 'd:/data';
then
INSERT INTO images (file_name, image)
VALUES ('tree', ORDSYS.ORDImage.init('file','imgdir','tree.jpg' ));
I put tree.jpg in directory d:/data in my hard drive.
Is my tree.jpg file had already get in to my images table?
I'm little confuse, because when i check my table with this script:
select file_name, i.image.getWidth() from images i;
it's show that my i.image.getWidth() for file_name tree is empty.. that mean my tree.jpg doesn't get in to my table.. am i correct?
N also i want to ask how to display to screen all of my image from images table?
Is it posible Oracle 9i intermedia to support display image from table?
How?
thanks Mr Lawrence-- First step would be to create a directory in oracle and map it to the folder where your image resides.
create directory image_dir as *'c:\image_dir';*
Then you would have to use a procedure to insert the image in your table. SO first create a table to hold the image. Note that you have to use a BLOB to insert the image.
CREATE TABLE test_image
ID NUMBER,
image_filename VARCHAR2(50),
image BLOB
Now let's write the procedure to insert the image in the table above.
CREATE OR REPLACE PROCEDURE insert_image_file (p_id NUMBER, p_image_name IN VARCHAR2)
IS
src_file BFILE;
dst_file BLOB;
lgh_file BINARY_INTEGER;
BEGIN
src_file := BFILENAME ('image_DIR', p_image_name);
-- insert a NULL record to lock
INSERT INTO temp_image
(ID, image_name, image
VALUES (p_id, p_image_name, EMPTY_BLOB ()
RETURNING image
INTO dst_file;
-- lock record
SELECT image
INTO dst_file
FROM temp_image
WHERE ID = p_id AND image_name = p_image_name
FOR UPDATE;
-- open the file
DBMS_LOB.fileopen (src_file, DBMS_LOB.file_readonly);
-- determine length
lgh_file := DBMS_LOB.getlength (src_file);
-- read the file
DBMS_LOB.loadfromfile (dst_file, src_file, lgh_file);
-- update the blob field
UPDATE temp_image
SET image = dst_file
WHERE ID = p_id AND image_name = p_image_name;
-- close file
DBMS_LOB.fileclose (src_file);
END insert_image_file;
Now execute the procedure to insert the image.
EXECUTE insert_image_file(1,'test_image.jpg');
Thanks,
Aparna -
How to find/create SSO userid and password for oracle forms
hi all,
I have applied sso to one of my forms application by creating entries in the formsweb.cfg file.
ssoMode=true
ssoDynamicResourceCreate=true
now single-sign-n has been applied to the forms application.What will be the user-id password that must be entered at the sso-login page.
Do i need to create a separate sso user in metadata repository to login to this forms application?If so , please tell me how to do it.
Thanx:)There are two types of orcladmin accounts. The first (cn=orcladmin) which is typically used to login to Directory Manager, is the superuser. He has rights into all parts of OID. The second type is the realm orcladmin user (cn=orcladmin,cn=Users,<your_realm>). There will be one of these for each realm .
Login in to Oracle Diectory Manager as orcladmin , and :
Navigate to Entry Management > your_realm > cn=Users > cn=orcladmin
A sample realm would be dc=com > dc=oracle > dc=us
Scroll on the right side to "userpassword" and edit the value
Save changes and :
Retry logging in to OIDDAS as orcladmin -
Fragmentation in tables and indexes with 9.2.0.5
Hi guys ,
I need of query to identified fragmentation in tables and indexes using Oracle 9i,someone could help me send that's querys
tks
spaulonciFragmentation by itself at the tablespace level doesn't mean any thing from the performance point of view, only from the storage capacity perspective, and this just in case fragments are not necessarily the same size as in the case of dictionary manged tablespaces.
You may be concerned about block density, which actually could lead to performance degradation. I suggest you to consider using coalesce instead of rebuilding in the case of indexes, and in the case of tables you should perform a segment reorganization. In the case of 9iR2 the coalesce command for table segments is not available so you will have to perform another segment reorganization strategy. If there are meaningful differences with the high water mark, average number of rows per block and chained rows then you will notice performance differences.
I suggest you to take metrics for block usage prior to perform an index coalesce operation, as well as prior to perform a data segment reorganization to assess if the reorganization effort is useful.
~ Madrid
http://hrivera99.blogspot.com/ -
How to find the database table behind the xtags varibles?
if in xtags we find that some varibles are not having the right data coming from xml -> database tables so how can we find out the names of database table behind it .
<!-- <xtags:variable id="msds" context="<%=specs%>" select="//header/msds"/>
<a href="/MSDS/<%=msds%> target="#">MSDS</a>
-->
now how to find the database table and the column name of database table from which the value of id msds is coming
Here they have stored the name of pdf file . from this code pdf file is displayedHi,
Thanks for your response. It is PM related. When I run a T Code - IK18, the field Total Counter Reading field appears. I am looking for that particular fields actual table name and field name. I think I have found it in IMGR table. Now I want to get IMRG-READG in my report, but there is no common fields in neither MKPF or MSEG table. So what can I do to connect IMRG table with either of them ? -
How to find block free space and PCTUSED FOR THE TABLE
HI all,
Due to performance issues for my database , my management ask me to reset the PCTUSED and PCTFREE values , and my doubt is
1)How to find the current PCTUSED and PCTFREE values.
2)How to find block free space and PCTUSED FOR THE TABLE.
Please help me out regarding this.
Regards,
Vamsi.1)version is 10.2.0.4
2)output of query
tablespace extent_management allocation_type segment_space_management
SYSTEM LOCAL SYSTEM MANUAL
UNDOTBS1 LOCAL SYSTEM MANUAL
SYSAUX LOCAL SYSTEM AUTO
TEMP LOCAL UNIFORM MANUAL
USERS LOCAL SYSTEM AUTO
UNDOTBS2 LOCAL SYSTEM MANUAL
INS LOCAL SYSTEM AUTO
CONFTBS LOCAL SYSTEM AUTO
REINS LOCAL SYSTEM AUTO
ANALYST LOCAL SYSTEM AUTO
BI LOCAL SYSTEM AUTO
INTRFC LOCAL SYSTEM AUTO
COGNOS LOCAL SYSTEM AUTO
TS_INDX LOCAL SYSTEM AUTO
TS_CHOLAWEB LOCAL SYSTEM AUTO
TS_DASBOARD LOCAL SYSTEM AUTO -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to find function module's and tables used for the particulat screen or TCODE?
Hello Nation,
I would like to know how to find the function modules and tables used for the particular screen or TCODE or program.
Example : I would like know the function module used in the program RDBGFT?
How can i find that?
Thanks in advance ,Awaiting your reply.Make use of Find function with the keyword "CALL FUNCTION".
Make use of the same find function with the keyword "Select" to know the database tables used.
Regards,
Philip. -
How to find unsued Transfer Rules and Data Sources for a Master Table...?? My requirement is i need to delete those Transfer rules and Data Sources which are not in use
Hi
Go to manage of the Text or attirbute of the master data object, see what are being loaded daily from there and delete the remaining.
Cheer
Ans as expected, Please reward -
How to find out the object and tables that belong to it
Do you know how to find out which tables belong to which object in trans. BD66, I have a CABN table but i donot the object name so how i can find out that??
Hi,
Wht object u r taking about .if it's a transport object,
Go to Utilities -> Versions -> Version Mgt ->
The latest one which is active, is the one u have to transport .
Rgds ,
J
Do Award pts by cliking the left-hand side of this info. -
How to find fragmentation in INDEX segments
Dear All,
Please tell me the solution for how to find fragmentation in index segments.
Waiting for your reply.
Regards,
.......................To minimize tablespace fragmentation is to use Locally Managed Uniform Sized Tablespaces. With Oracle 10g, even your system tablespace can now be LMT.
The best way to remove fragmentation of a table or index is to re-create or rebuild it. The same can be accomplosihed this is to use the ALTER TABLE MOVE and ALTER INDEX REBUILD statements.
Alter Table Tab1 move tablespace NEW_LMT_TS;
Alter Index Ind1 rebuild tablespace NEW_LMT_TS;
Even with LMT, indexes can sometimes become fragmented over time due to inserts and deletes of rows in the index leaf pages.
Run an analyze index validate structure on your indexes.
Query the index_stats table. If the percentage of deleted leaf rows to total leaf rows (DEL_LF_ROWS/LF_ROWS) is greater than 20%; then, the index probably should be rebuilt. but sometimes these may be a wrong.
How to remove index fragmentation?
There are two way to remove fragmentation.
1. index coalesce
2. index rebuild
Maybe you are looking for
-
My iPhone has my old email set up throught iCloud. How do I reset my new username with the device without deleting everything. And if I have to delete my old account, will everything (contacts, pictures, games, apps, etc.) be erased from my phone.
-
Why does not USB flash card work?
MacBook Pro 13' (late 2011) OS X Yosemite 10.10 My USB hub does not see any flash card, but it works when I use my iPhone. What have I done: I tried to open my flash card. Then, I cleaned my flash card with Disk Utility and tried to connect to Mac ag
-
Which is fast either stored procedure or stored function in oracle 10g. Thanks in advance
-
[SOLVED]How to get a kicker panel like this?
I want my Arch/Chakra KDE to have a transparent kicker panel like http://pclinuxos.com/wp-content/uploads - minime.png I tried various permutation and combinations of existing themes i.e Air, Air Netbooks, Oxygen. Tried few themes like Glaze etc but
-
OVERHEATING ~ MAC BOOK PRO 17"
I know that this question may have already been answered within in this Forum but I could not find the answers. I recently purchased MBP 17" and noticed while using it on a hard surface it got very hot. I also noticed that the charging socket got ver