How to ID I/O to a tablespace?
Hey;
More on this 11g performance issue: I was told on the most recent (of very very many) teleconferences that the database is all but idle yet I'm seeing a significant amount of disk activity going to a specific filesystem. The I/O activity followed a tablespace move from one filesystem to another. This I/O activity is going on 24x7
So, while the dbas are playing around with the SGA, I'm interested in finding out what's hitting this tablespace when no one is supposed to be on the box...
Thanks for any hints/tips/suggestions.
Doug O'Leary
Hi,
you can see this link for more details about I/O in datafiles
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7350114448818
Also use these statements to determine the physical Disk I/O performed on Tablespaces or Data Files
set pages 500 lines 110
clear col bre buffer
col tablespace_name format a15 hea 'TABLESPACE'
col file_name format a24 hea 'DATAFILE'
break on tablespace_name skip
select tablespace_name, regexp_replace(file_name,'^.*.\/.*.\/', '') file_name,
sum(phyrds) reads, sum(phywrts) writes, sum(phyrds)+sum(phywrts) total
from dba_data_files, v$filestat
where file_id=file# group by tablespace_name, file_name
order by tablespace_name, file_name;
:)
Similar Messages
-
How to drop the datafile in a tablespace
hi,
I need to drop the datafile in a tablespace.How to drop the datafile in the tablespace.If iam able to drop the datafile and is it possible to create the datafiles with the same name.could u pls help me out..
Thanks in advance,
R.Ratheeshsql > alter database <datafile> offline drop ;
sql > alter database open ;What if the datafile have the segments in it, I believe users will not be able to access them. And system will put the datafile to Recovry mode not drop it.
Dropping a datafle is possible only in 10G. In 9i you can reduce the size of file below the size of your min extents so that the space wont be allocated from that datafile or you may need to recreate a new tablespace copy all the segments from old tablespace and drop old one.
Cheers -
How Can i Use /db2/ DBSID /saptemp* tablespace in DB2 9.5
Hi Guys,
I have installed a new system DB2 and at the time of installation i defined 1 mount point as /db2/SID/saptemp1 but it is not being used. I have two queries ?
1. How can i use /db2/SID/saptemp1 tablespace in DB2 at the time of installation ?
2. How can i use /db2/SID/saptemp1 tablespace in DB2 after the installation?
Please mention the note number if available for same solution.
Thanks in Advance....!!!
Regards,Hello,
with newer SAPINST versions, tempoary tablespaces are created in the /db2/SID/sapdata(n) filesystems.
To answer your questions:
1) This depends on the SAPINST version, but usually there is an option that lets you create the tablespaces manually. Check if there is an Option in the SAPINST dialog "Create Tablespaces with SAPinst.". If you deselect it, you can create them manually.
2) The procedure would be to create a new temparay tablespace in your preferred filesystem(s), to drop the old one and optionally to rename the new one to the old name.
Regards, Hans-Juergen -
How to calculate AUTOEXTEND ON NEXT in tablespace clause
hi
Please explain How to calculate AUTOEXTEND ON NEXT in tablespace clause.
whether AUTOEXTEND ON NEXT 50M or 100M or 500M
Thanks174313 wrote:
hi
Please explain How to calculate AUTOEXTEND ON NEXT in tablespace clause.
whether AUTOEXTEND ON NEXT 50M or 100M or 500M
ThanksThe autoextend size depends on the following :-
1) Tablespace type Dictionary managed (DMT) or Locally managed (LMT)
2) Segment space management manual or Auto.
3) Extent allocation management Autoallocate or uniform.
If your tablespace is Locally managed with segment management Auto (ASSM) and with extent management is uniform , the autoextend size will be uniform for all the extents , initial and next extents all will be uniform size .
If your tablespace is Locally managed with segment management Auto (ASSM) and with extent management is autoallocate, Oracle will size the extents automatically starts with 64KB and can go upto 64MB.
If you have dictionary managed tablespace you will specify the next size at tablespace creation.
Hope this helps. -
How to know how much size we need in a tablespace to create index
Hi,
can anybody plz let me know,
how to know how much space i need in a tablespace to create an index.
thanks in advanceEstimate Index Size and Set Storage Parameters
http://www.camden.rutgers.edu/HELP/Documentation/Oracle/server.815/a67772/indexa.htm#388
Estimating Bitmap Index Size
http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76992/ch6_acce.htm#3625
HTH
Girish Sharma -
How to move a schema from one tablespace to another
I created a new user in a new Tablespace, Then export current user and import to new user(in new tablespace), but I found out that it was stored in previous Tablespace.
How can I move data to new tablespace?
Thanks
SoheilI created a new user in a new Tablespace, Then export current user and import to new user(in new tablespace), but I found out that it was stored in previous Tablespace.
How can I move data to new tablespace?
Thanks
Soheil Soheil,
Did the data make the transfer to the new tablespace or was it reimported vack into the old tablespace and never made it ot the new tablespace? Are the two users identified by the same name or different names? Did you try to specify which tablespace to import into or did you just use the fromuser and touser parameters? You can try this too:
1. revoke access by the 'old' user to the 'old' tablespace (alter user <user> quota 0 on <old tablespace>
2. grant access to the 'new' user on the 'new' tablespace (alter user <user> quota unlimited on <new tablespace>)
3. point the 'new' user to the 'new' tablespace (alter user <user> default tablespace <new tablespace>.
Then do the import. Then alter the default tablespace back to USERS or whatever if necessary. (thanks to Rita Kirby for this one) -
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. -
How to create temp files in temp tablespace
Dear all,
Due to outage of our SAN, we our out of production for the
last 3 days. By the grace of Almighty we have restored production by
database recovery from our standby backup. Since temp tablespace and
temp data files do not taken as backup for standby, now after recovery
we are getting abap dumps asking for temp_1 and temp_2 datafiles.
Please guide us how to create temp files. v$tablespace is showing tablespace PSAPTEMP but datafile are not there
Abap dumps are giving these errors as mentioned below
====================================================
The exception must either be prevented, caught within the procedure
"DATA_SELECTION"
"(FORM)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
Database error text........: "ORA-01157: cannot identify/lock data file 256 -
see DBWR trace file#ORA-01110: data file 256:
'/oracle/SD1/sapdata4/temp_2/temp.data2'"
Internal call code.........: "[RSQL/FTCH/MARA ]"
===================================================
another one asking for
'/oracle/SD1/sapdata3/temp_1/temp.data1'"
Best Regards
Waqasif you want to add a new tempfile to your TEMP Tablespace,you can do like that.
<i>ALTER TABLESPACE</i> <<b><u>name of TEMP Tablespace</u></b>> ADD TEMPFILE <<b><u><b><u>pfad to the file_and_file name</u></b></u></b>> <b>SIZE</b> <size>;
You can use also the options <i>REUS</i>E <i>autoextend off</i> or <i>on</i> .
e.g:
<i>alter tablespace</i> <u><b>PSAPTEMP</b></u> add <i>tempfile</i> <b><u>'/oracle/SD1/sapdata4/temp_2/temp.data2'</u></b> <i>SIZE 1000K</i> <i>REUSE</i>;
The directory <b><u>temp_2</u></b> should exist.
Or you can use the BR*Tools to create a new datafile. Enter brtools and follow the instructions or menu.
More to TEMP Tablespaces see please following SAP notes:
<u><b>659946</b></u> - FAQ: Temporary tablespaces
<u><b>600513</b></u> - ORA-25153 after recovery due to missing tempfiles
and the Oracle Note:
<u><b>160426.1</b></u>: TEMPORARY Tablespaces : Tempfiles or Datafiles ?
I hope it helps. -
How to import partitioned tables in different tablespace
Hi everyone,
I try to import the partitioned tables in different tablespace.
Consider the following situation:
I have a dump file which is created by using "Export" utility. Some data are in partitioned tables, some of them are in non-partitioned tables. Also, all tables are located in "MYTBS" tablesapce. I try to import all data from this dump file to another database. I didn't get error messages when importing the data from non-partitioned tables. However, I got error message when importing the data from partitioned tables. The error message is: tablespace 'MYTBS' does not exist.
I just want to how I can solve this problem other than create 'MYTBS' tablespace for my new database.
Thanks in advance.
AngelHi,
I got the following error message:
IMP-00017: following statement failed with ORACLE error 959:
"CREATE TABLE "FACILITYCONNECTION",....., "CONNECTIONTYPE" "
"NUMBER(1, 0) NOT NULL ENABLE) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 25"
"5 PARALLEL ( DEGREE DEFAULT INSTANCES 1) NOLOGGING STORAGE( PCTINCREASE 0) "
"TABLESPACE "MYTBS" PARTITION BY RANGE ("CONNECTIONTYPE" ) (PARTITION "
""EXT" VALUES LESS THAN (1) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 S"
"TORAGE(INITIAL 65536) TABLESPACE "MYTBS" NOLOGGING, PARTITION "FAC" VA"
"LUES LESS THAN (2) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(I"
"NITIAL 65536) TABLESPACE "MYTBS" NOLOGGING )"
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'MYTBS' does not exist
Thanks.
Angel -
How to determine the object in the tablespace
Hi
I have a problem with my database, How can i determine the object in the tablespace
and how do move old tablespace into new tablespace and how to drop existing tablespace.
ThanksHi,
If you want to find for all objects information, you can use dba_segments and filter this against the tablespace name. Once done you can create another tablespace and move the objects from old tablespace to new tablespace. Later you can drop the old tablepspace. You can use the below mention commands also:
SELECT 'ALTER TABLE '|| table_name ||' MOVE TABLESPACE USERS;'
FROM user_tables WHERE tablespace_name='MY_TableSpace';
SELECT 'ALTER INDEX '|| index_name ||' REBUILD TABLESPACE USERS;'
FROM user_indexes WHERE tablespace_name='MY_TableSpace';
SELECT 'ALTER TABLE '|| table_name ||' MOVE LOB ('
|| column_name ||') STORE AS (TABLESPACE USERS);'
FROM user_lobs WHERE tablespace_name='MY_TableSpace';
On the other hand,
You can also export a backup of the source tablespace and import into the target tablespace.
Regards,
XIC -
How to define a quota for a tablespace?
I am having a problem creating users with Data Modeler. I can specify the user's default tablespace, but I can't figure out how to add the "QUOTA ... ON ..." clause. Yes, I can edit the DDL exported manually, but I would like to no need to remember to do that...
Mike...
Edited by: 896516 on Nov 10, 2011 1:05 PMHi Mike,
If you expand the node in the Browser tree for the User, a Quotas node appears. Adding Quota objects here allow you to define quotas for specific Tablespaces, which will be generated as QUOTA ... ON clauses in the generated DDL.
David -
How to find free space in a Tablespace?
Hi,
I have a limited access to objects in my database ( do not have access to many tables).
I have been allocated 300GB of size in my tablespace which allows me to create my objects.
Now, I want to find out how much of this tablespace size allocated to me have been used up. I do not have access to dba_data_files or dba_segments.
Is there a way out for me? Could anyone show me a way please?This query will give you the required information but it makes use of DBA tables.
SELECT B.TABLESPACE_NAME, TBS_SIZE SIZEGB, A.FREE_SPACE FREEGB
from (select tablespace_name, round(sum(bytes)/1024/1024/1024 ,2) as free_space
from dba_free_space
GROUP BY TABLESPACE_NAME) A,
(select tablespace_name, sum(bytes)/1024/1024/1024 as tbs_size
from dba_data_files
group by tablespace_name) b
where a.tablespace_name(+)=b.tablespace_name;
However, you said that you are aware of your tablespace details so the above query can be modified to get the free space in your tablespace. Now I am using user_frees_space and not dba_free_space. Generally user* tables are and should be made accessible to the users.
select tablespace_name, round(sum(bytes)/1024/1024/1024 ,2) as free_space
from user_free_space
where tablespace_name = 'Your tablespace name'
GROUP BY TABLESPACE_NAME;
Ishan -
How do you list tables within the tablespace?
Does anyone know how to list and view the tables within the tablespace. I am new to Oracle and I would like to view the tables, but my documentation is telling me how to create everything, but not to view it. Please advise, and thanks again.
select owner, table_name
from user_tables -- or all_tables, or dba_tables
where tablespace_name = :ts_name; -
How to reduce the size of SYSTEM tablespace?
* Solaris
* Oracle 9.2.0.4.0
* Locally managed database (since SYSTEM is locally managed TS)
I have a Oracle 9i database with is around 7 months old. Over the 7 months it had around 400 schemas at most and SYSTEM tablespace was increased to 850MB. Now it only has around 120 schemas and size of the SYSTEM tablespace still 850MB and its 99% used.
How can I get more free space on system tablespace?
* I have made sure that non-sys(tem) user dont have objects on SYSTEM tablespace.
* I understand that dropping schema does not give you all the space back, since objects are store as row in System tables etc.
Increasing disk is not an option for me. Any tips to free space on system welcome.
Thanks,
Nazrul IslamThanks Joel Pérez for trying to help.
SQL> select segment_name, owner from
dba_segments
where owner not in
('SYS','SYSTEM','OUTLN','MDSYS','ORDSYS','WMSYS')
and
TABLESPACE_NAME='SYSTEM';
SEGMENT_NAME OWNER
TOAD_PLAN_SQL TOAD
TOAD_PLAN_TABLE TOAD
PLSQL_PROFILER_RUNS TOAD
PLSQL_PROFILER_UNITS TOAD
PLSQL_PROFILER_DATA TOAD
TPSQL_IDX TOAD
TPTBL_IDX TOAD
SYS_C006895561 TOAD
SYS_C006895563 TOAD
SYS_C006895566 TOAD
10 rows selected.
SQL> select owner from dba_segments where
tablespace_name='SYSTEM'
group by owner;
OWNER
OUTLN
SYS
SYSTEM
TOAD
WMSYSHere is my query (to show TOAD is taking very little
space):r.- That is true, the space used by TOAD is little
>
SQL> select owner, SUM(bytes)/1048576 AS "TOTAL
(MB)"
from dba_segments
where tablespace_name = 'SYSTEM'
group by owner order by "TOTAL (MB)" desc;
OWNER TOTAL (MB)
SYS 820.4375
SYSTEM 20.5
WMSYS 3.6875
TOAD .6875
OUTLN .375Looks like, I have to grow system. Or since I have a
fixed number of schema now, I think I will have to
recreate a DB to reduce SYSTEM size.
Joel one other info that might explain why
this happening. Part of our build process is to drop
4 schemas and roles and recreate them.
e.g.
drop user nislam cascade;
create user nislam ....And we do many builds a day. Maybe Oracle uses more
space in doing that since new userid, better might be
drop objects from the schema. WHAT do you
say?
r.- In theorical lines. Both must give the same results but... I would recommend you to carry out some intensive test about it in a test enviroment testing both methods to monitor the behavior of the growth of the tablespace system. As you said, perhaps dropping the user objects will get better results.
>
Regards,
Nazrul IslamJoel Pérez
http://otn.oracle.com/experts -
How to reduce the size of exising tablespace?
Hi,
I assigned 2GB dbsize to a tablespace.
Now I would like to reduce the table space to 1GB.
The tablespace used is 60MB.
When I try to reduce the size to 1GB its showing a message as follows.
"ORA-03297: file contains used data beyond requested RESIZE value".
Even I truncated all the data from all tables to which this table space is allocated. However, its not allowing me to resize it.
How can I do this? Is there any other way to do this?
Thank you,
Regards,
Gowtham Sen.You may not be able to reduce the size of your datafile just by truncating tables. It does not matter if it is 9i or 10g. TRUNCATE just resets the high watermark of your tables, it leaves the first extent in place. So if you have tables whose first extents reside in the last part of a datafile you cannot resize it below that level.
See this:
SQL> create tablespace test2 datafile size 10m autoextend off;
Tablespace created.
SQL> create table t1 tablespace test2 as select * from all_objects;
Table created.
SQL> insert into t1 select * from t1;
insert into t1 select * from t1
ERROR at line 1:
ORA-01653: unable to extend table YAS.T1 by 128 in tablespace TEST2
SQL> create table t2(a number) tablespace test2;
Table created.
SQL> r
1 select segment_name,file_id,block_id,blocks from dba_Extents
2* where TABLESPACE_NAME='TEST2'
SEGMENT_NA FILE_ID BLOCK_ID BLOCKS
T1 9 9 8
T1 9 17 8
T1 9 25 8
T1 9 33 8
T1 9 41 8
T1 9 49 8
T1 9 57 8
T1 9 65 8
T1 9 73 8
T1 9 81 8
T1 9 89 8
SEGMENT_NA FILE_ID BLOCK_ID BLOCKS
T1 9 97 8
T1 9 105 8
T1 9 113 8
T1 9 121 8
T1 9 129 8
T1 9 137 128
T1 9 265 128
T1 9 393 128
T1 9 521 128
T1 9 649 128
T1 9 777 128
SEGMENT_NA FILE_ID BLOCK_ID BLOCKS
T1 9 905 128
T1 9 1033 128
T2 9 1161 8As you can see we now have an extent in block 1161 of this datafile.
Let's try to resize it to half.
SQL> select file_name from dba_data_files
2 where TABLESPACE_NAME='TEST2';
FILE_NAME
/disk1/oradata/10G/datafile/o1_mf_test2_3qpzcz0z_.dbf
SQL> alter database datafile '/disk1/oradata/10G/datafile/o1_mf_test2_3qpzcz0z_.dbf' resize 5m;
alter database datafile '/disk1/oradata/10G/datafile/o1_mf_test2_3qpzcz0z_.dbf' resize 5m
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE valueTruncate the tables and try again.
SQL> truncate table t1;
Table truncated.
SQL> truncate table t2;
Table truncated.
SQL> alter database datafile '/disk1/oradata/10G/datafile/o1_mf_test2_3qpzcz0z_.dbf' resize 5m;
alter database datafile '/disk1/oradata/10G/datafile/o1_mf_test2_3qpzcz0z_.dbf' resize 5m
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE valueThe reason is:
SQL> r
1 select segment_name,file_id,block_id,blocks from dba_Extents
2* where TABLESPACE_NAME='TEST2'
SEGMENT_NA FILE_ID BLOCK_ID BLOCKS
T1 9 9 8
T2 9 1161 8We have an extent at block 1161. Because of that we cannot reduce the size to 5M.
Let's move the table and try again.
SQL> alter table t2 move tablespace test2;
Table altered.
SQL> r
1 select segment_name,file_id,block_id,blocks from dba_Extents
2* where TABLESPACE_NAME='TEST2'
SEGMENT_NA FILE_ID BLOCK_ID BLOCKS
T1 9 9 8
T2 9 17 8
SQL> alter database datafile '/disk1/oradata/10G/datafile/o1_mf_test2_3qpzcz0z_.dbf' resize 5m;
Database altered.Message was edited by:
Yas -
How to import the data into another Tablespace?
I have a Oracle user USER1 with default tablespace on "SYSTEM" tablespace.
I export utility to export user1's object with "exp" utility:
c:\orawin95\bin> exp userid=USER1/pwd file=DATA.dmp owner=user1
Now I upgrade my Hardware Server and reinstall Oracle, I created USER1 again but change default tablespace to "NewTS".
I use import utility to import data.dmp into user1 :
c:\orant\bin> imp userid=USER1/pwd file=DATA.dmp fromuser=USER1 touser=USER1
Question: Although I created USER1 with default tablespace "NewTS", but the imported data will still occupied on "SYSTEM" tablespace, How can I "move" the imported data to "NewTS"?See
Considering user = USER1 and default tablespace for user1 is SYSTEM.
1. login to USER1
2. create script for all the tables with dynamic statement.
spool cr.sql
Select 'Create Table '||Table_name||' As Select * from '||user||'.'||table_name||';' from user_tables;
spool off
remove garbage lines from cr.sql
3. login in User2 ( where default table space is NEWTS )
SQL> @cr.sql
4. login to user1 drop all the tables from user1
login to system alter user user1 make default tablespace NEWTS
login to user2 run script in step 2 again.
login to user1 run cr.sql
login to user2 drop all the tables;
login to system drop user user2.
Hope this will solve your purpose
Thanks and Regards
Ripudaman
Maybe you are looking for
-
How Do I Remove Album Artwork from Apple TV (2nd gen) Screen Saver
I can't stand looking at pixelated album artwork of, say, Dr. Dre's "The Chronic" when I'm listening to "Le nozze di Figaro." How can I get the album artwork off the Apple TV without losing the artwork on my iPod Touch. I've selected Settings > Scree
-
In what world is this update beautiful? ugly. some good additions are great, but the interface is far from beautiful, hard to read, annoying and with a very childlike look. Can you give us options to put it back to look like it did prior to 7 updat
-
How long does it take to get my money back
Okay...I bought an app which I didn't liked...it cost 3.99 ... Then I reported the app and they send me an email saying ::::Recently you indicated a problem with Photo Director-HD Pro -make picture slide show music video .......by using the report a
-
I'm getting an error when my msg hits the outgoing EDI assembler that really has me scratching my head. I drop a flat file that is mapped to an 835. The map seems to run well, but the msg gets suspended with the following error: "During serialization
-
So totally lost here....
I am writing a poker program for a college programming class. I don't want anyone to "do my homework for me" but, I am totally at a loss as to where I have gone wrong. When I instantiate the class and execute the printCard method (code below) it alwa