Tablespace autoextend on multiple datafiles
There is a tablespace with 3 data files, one of them having AUTOEXTEND option ON. I am trying to understand why space is not allocated on datafile with AUTOEXEND option ON.
Thanks in advance..
Please also have a look at those scripts. They may help you;
select a.TABLESPACE_NAME, round(total,1) Total_M, round(free) Free_M, round(100*(1-free/total),1) Usage
from (select TABLESPACE_NAME,sum(BYTES)/(1024*1024) total from dba_data_files group by TABLESPACE_NAME) a
,(select TABLESPACE_NAME,sum(BYTES)/(1024*1024) free from dba_free_space group by TABLESPACE_NAME) b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME(+) order by 4 DESC;
select df.tablespace_name ,
df.file_name ,
df.file_id ,
df.totalspace,
fs.freespace from
(select
tablespace_name,
file_name,
file_id,
round(sum(bytes)/1024/1024,2) as totalspace
from dba_data_files
group by tablespace_name,file_name,file_id) df,
(select
tablespace_name,
file_id,
round(sum(bytes)/1024/1024,2) as freespace
from dba_free_space
group by tablespace_name,file_id) fs
where df.file_id=fs.file_id
order by 5 desc;
Similar Messages
-
Command to add multiple datafiles in multiple tablespace in one time.
Send me command to
command to add multiple datafiles in multiple tablespace in one time.Just list the files separated by a comma.
SQL> alter tablespace example
2 add datafile 'e:\oradata\scratch\example02.dbf' size 100m,
3 'e:\oradata\scratch\example02.dbf' size 100m;
Tablespace altered.
SQL>
You will have to use more then one command to add datafiles to multiple tablespaces. -
Multiple datafiles per tablespace in 9i?
Is it recommended to have multiple datafiles per tablespace?
Is it recommended to have multiple datafiles per
tablespace?It all depends on your particular storage needs. You could have a single datafile at maximum capacity for your tablespace, just ensure you can store it and in case you have to move it, it could be affordable.
There are DBA's who use several datafiles for a single tablespaces, this reduces the single point of failure possibility and allows a more flexible datafile maintenance.
Performance is the same for, except for the checkpoint process, the more datafiles, the more effort to update datafile headers.
~ Madrid -
Tablespaces with Multiple Datafiles
I've got a Version 7.3.3.4 tablespace with multiple datafiles. There's a lot of object fragmentation. I want to be able to
drop and recreate many (but not all) of the objects in this tablespace but exercise some control on which objects go to
which datafiles in order to better utilize the available space on each datafile. I've been told that Oracle assigns objects
to datafiles in a "round robin" fashion. I'd like info on exactly how this process works and if I can have a more direct effect
on where objects are placed within the tablespace?
Thanks,
Paul Hargreaves
[email protected]Hi,
I am interested by having more information about tablespaces and how they are fragmented.
I could, perhaps help you first by telling you that there is a ALTER command for coelescing space in ORACLE 7.3.4 :
ALTER TABLESPACE tablespace COALESCE ;
Of course you should have the permissions (ALTER TABLESPACE)
This command is for the entirely tablespace ...
In fact, i need a query that gives me for each tablespaces, how are they fragmented (with segment_name ..).
Thanx
Steff -
Resize Tablespace having multiple datafiles...
Hi All,
Is there any way to resize the tablespace having multiple datafiles? Tablespace having multiple DBF can not be resized like we did with alter database datafile ...resize command.
Please let me know if anyone having any idea.
Thanks in advance.But as of now I have 4 DBF in a single Tablespace and all are having more than 25G in a size. And I can see many of the free blocks in all the files at the end If the free blocks are at the end, what prevents you from resizing the datafiles?
when data are inserting in the DBFs its not only spread to single file and once its reach to max size then only moved to second DBF, its scatter with the all the allocated DBFs of that particualr Tablespace. You can downgrade to 9i! The out-dated method you are after was deprecated with 10g. Why do you want to ignore parallelism and fill up one datafile sequentially until it reaches maximum size before putting data in another? -
Hi
In our R/3 landscape, the status of some of the tablespaces is "autoextend On" and some are "autoextend off" mode. We would like to turn the autoextnd mode OFF from ON.
What is the best way to turn the autoextend mode OFF. As per my understanding, if we turn off all the datafiles of the tablespace using SQLPLUS , it will automatically change the status of the autoextend mode from ON to OFF.
Pls confirm or suggest any other method to turn tablespace autoextend mode OFF.
Regards
AmarHi,
Use SQL. Don't know any other tool thats used for changing the mode.
Cheers,
Kedar -
Hello expert
we are using oracle 10.2.0.4 on HP-UX for SAP ECC6.0.
currently SAP Tablespace auto extend is ON but we want to OFF this coz when we try to backup Full+offline backup sometimes
its terminated unsuccessfully due to auto extend property & some times we felt slow response coz of this.
could you plz suggest me how can i OFF this autoextend, or in future how can i add DATAFILE on tablespace, how can i extend tablespace size or last what precaution should we have to make on DR server.
kindly help me, I am not DBA person and facing so much problem due to this.
plz could you suggest me any document to over come my oracle knowledge.
Best Regards
Deepak SinghHello Deepak,
You can turned off autoextend on all data files for more control of space.
But make sure to keep eye on the growth.
You can use the Oracle command:
alter tablespace ... autoextend off
SQL : you need to do this for all datafiles of the tablespace one by one which are auto extendable.
alter database datafile '/oracle/PRD/sapdata11/sr_11/data11.dbf' autoextend off
Or
Brtools
Space Mangement - Alter Data File - Alter Data File Action
Turn off autoextend
When adding datafile, you can use brtools
brtools -> space management -> extend tablespace -> enter the tablespace name.... etc
If you adding , new datafile to the primary server, make sure to set the DR or SB parameter to AUTO
STANDBY_FILE_MANAGEMENT = AUTO
Genus Power wrote:
> when we try to backup Full+offline backup sometimes its terminated unsuccessfully due to auto extend property
You may increase the extending amount, depending on the growth
If its a small value then, it may trying to extend in shorter periods. So after considering the workload , select a value to auto extend.
how you says , that backup fails due to auto-extending property. Whats the logs implies
regards,
Zerandib -
Is it necessary to set all tablespace autoextend?
Hello Everyone,
I am noticing some PeopleSoft tablespace is full after a period. For now, I just set those tablespace autoextend but it is not a solution for future. I am wondering if I can set all tablespace autoextend in one time? Is there a potential risk for this?
Thanks,
BobOn Oracle db, you cannot set all datafiles in autoextend mode in one shot, it should be done per datafiles.
The risk to put the datafiles in autoextend unlimited is to fulfill your filesystem. Most of the shop consider better to set alert through OEM when tablespace is 80% full, for instance, and add manually files when needed. You also can spread off the datafiles across different mount points.
Nicolas. -
Use expdp/impdp to reorganize a tablespace to remove additional datafile ?
Oracle 10g (10.2.0.1)
We had a tablespace with a single datafile WORK1, WORK1 filled up, colleague added two datafiles WORK2 and WORK3 (instead of resizing original larger).
I resized WORK1, increasing by 500Mb.
I was able to drop WORK3, but not WORK2 (ORA-03262: the file is non-empty)
My proposed solution is to expdp the tablespace, drop the tablespace and datafiles, recreate the tablespace with a correctly sized datafile and finally impdp the tablespace.
Is this solution valid ?
Any hints at syntax would be useful1. Map your datafile.
2. If no segments in datafile, drop it and go to 5.
2. Shrink the datafile up to where the data ends.
3. Rebuild/move the last object in the data file,
4. Go to 1
5. Fin
To map data file...
accept file_num char prompt 'File ID: ';
SET PAGESIZE 70
SET LINESIZE 132
SET NEWPAGE 0
SET VERIFY OFF
SET ECHO OFF
SET HEADING ON
SET FEEDBACK OFF
SET TERMOUT ON
COLUMN file_name FORMAT a50 HEADING 'File Name'
COLUMN owner FORMAT a10 TRUNC HEADING 'Owner'
COLUMN object FORMAT a30 TRUNC HEADING 'Object'
COLUMN obj_type FORMAT a2 HEADING ' '
COLUMN block_id FORMAT 9999999 HEADING 'Block|ID'
COLUMN blocks FORMAT 999,999 HEADING 'Blocks'
COLUMN mbytes FORMAT 9,999.99 HEADING 'M-Bytes'
SELECT 'free space' owner,
' ' object,
' ' obj_type,
f.file_name,
s.block_id,
s.blocks,
s.bytes/1048576 mbytes
FROM dba_free_space s,
dba_data_files f
WHERE s.file_id = TO_NUMBER(&file_num)
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 = TO_NUMBER(&file_num)
AND s.file_id = f.file_id
ORDER
BY file_id,
block_id -
Create a tablespace without specifying the datafile path and name
HI,
Is it possible to create a tablespace without specifying the datafile path and name.
For eg : if we just specify the tablespace name and the size of the datafile, the datafile should be created in a default location with default name? Is it possible?user13364377 wrote:
HI,
Is it possible to create a tablespace without specifying the datafile path and name.
For eg : if we just specify the tablespace name and the size of the datafile, the datafile should be created in a default location with default name? Is it possible?Using Oracle-Managed Files
Oracle internally uses standard file system interfaces to create and delete files as needed for the following database structures:
* Tablespaces
* Online redo log files
* Control files
Through initialization parameters, you specify the file system directory to be used for a particular type of file.
EXAMPLE:
The following parameter settings are included in the initialization parameter file:
DB_CREATE_FILE_DEST = '/u01/oradata/sample'
DB_CREATE_ONLINE_LOG_DEST_1 = '/u02/oradata/sample'
DB_CREATE_ONLINE_LOG_DEST_2 = '/u03/oradata/sample'
The following statement is issued at the SQL prompt:
SQL> CREATE DATABASE sample;
SQL> CREATE TABLESPACE tbs_2 DATAFILE SIZE 400M ;
SQL> CREATE UNDO TABLESPACE undotbs_1;
refer the link for more information:
http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/omf.htm -
Autoextend enabled in datafiles but not tablespace
Hi,
In my IDES ERP 6.0 EHP4 system, I have noticed that the tablespace PSAPSR3 is marked 'NO' in AUTOEXTEND colume in DBACockpit.
However, each datafile of this table space is autoexend enabled, the maxsize is 10GB and extend is 20MB per step.
I have no idea why the tablespace is marked as NOT AUTOEXTEND but datafiles are.
Please suggest.
Thanks a lot.
Regards,
AlexHi, this is my another account.
I have checked that the size and max. size of all datafiles of tablespace PSAPSR3 are same.
Tablespace name
Size(MB)
Free(MB)
Used(%)
Autoextend
Total size(MB)
PSAPSR3
150.000,00
9.863,06
93
NO
150.000,00
File name
File Id
Tablespace name
Size(MB)
#Blocks
Status
Rel. file number
Autoextensible
|D:\ORACLE\ECT\SAPDATA1\SR3_1\SR3.DATA1 |4 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|4 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_2\SR3.DATA2 |5 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|5 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_3\SR3.DATA3 |6 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|6 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_4\SR3.DATA4 |7 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|7 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_5\SR3.DATA5 |8 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|8 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_6\SR3.DATA6 |9 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|9 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_7\SR3.DATA7 |10 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|10 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_8\SR3.DATA8 |11 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|11 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_9\SR3.DATA9 |12 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|12 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_10\SR3.DATA10|13 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|13 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_11\SR3.DATA11|14 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|14 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_12\SR3.DATA12|15 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|15 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_13\SR3.DATA13|16 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|16 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_14\SR3.DATA14|17 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|17 |YES
|D:\ORACLE\ECT\SAPDATA1\SR3_15\SR3.DATA15|33 |PSAPSR3 |10.000,00 |1.280.000 |AVAILABLE|33 |YES
Please suggest.
Regards,
Alex
Edited by: QiAlexLi on Aug 31, 2010 1:39 PM -
Undo Tablespace and Temporary Tablespace - autoextend ?
- In general, should I allow the Undo Tablespace to grow (autoextend)?
- In general, should I allow the Temporary Tablespace to grow (autoextend)?The size of undo tablespace should always keeps in mind otherwiase you eill get ORA-1555 or out of space errors.
This paper is to help DBA’s in calculating the size of UNDO tablespace by using a simple formula.
It is tough to know about the number of transactions and subsequently number of rows changed per second.
So I suggest having a “big undo tablespace” to start with and based on load, after doing some calculations and resize your UNDO tablespace.
In my case one of the applications was going to production (live), and I had no idea that how many transactions will happen against this database. All what I was told that there will be optimum (transactional) activity on this database.
So I started with UNDO tablespace with size of 3GB and datafiles with autoextend “on” .
Note:
In production, you must be very careful in using this (autoextend on) as the space may grow to inifinity very fast. So my advice is either dont use this option, or use with "maxsize" or continuously monitor space (which is tough).
I month later, I noticed the activity from V$undostat.
Here is the step by step approach:
Step 1: Longest running query.
SQL> select max(maxquerylen) from v$undostat;
MAX(MAXQUERYLEN)
1793
This gives you ideal value for UNDO_RETENTION. To be on the safer size you should add few more seconds to get the right value. So in my case, the size of undo retention should be say 2000 secs.
Step 2: Size of UNDO tablespace.
Size of UNDO needed = UNDO_RETENTION x [UNDO block Generation per sec x DB_BLOCK_SIZE] + Overhead(30xDB_BLOCK_SIZE)
Out of these we know UNDO_RETENTION and DB_BLOCK_SIZE
All we need is to find out “UNDO Blocks per second”
Which can be easily fetched from v$undostat
SQL> SELECT (SUM(undoblks))/ SUM ((end_time - begin_time) * 24*60*60) "UPS"
2 FROM v$undostat;
UPS
8.11985583
V$undostat stores data for every 10 mins and begin/end times are start/end time of those intervals. We multiplied it with 24*60*60 because the difference between two dates will be in days and to get to seconds, we need it to multiply with 24hrs*60mins*60secs
So now we have all the values needed.
Undo size needed = [8.12 x 2000 x 8192] + [30 x 8192] = 133283840 bytes = 127.11 MB -
Hi,
I have created a tablespace to import a dumpfile
I created tablespace as
CREATE TABLESPACE DEV1 LOGGING DATAFILE
'/opt/oracle/oradata11g/DEV/DEVDATA01.dbf' SIZE 1G AUTOEXTEND ON MAXSIZE UNLIMITED,
'/opt/oracle/oradata11g/DEV/DEVDATA02.dbf' SIZE 1G AUTOEXTEND ON MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
My question is
Since I have given AUTOEXTEND ON MAXSIZE UNLIMITED for the datafile 'DEVDATA01.dbf'
When I start importing the dumpfile, Would two datafiles "DEVDATA01.dbf" & "DEVDATA02.dbf" get utilized
or only datafile "DEVDATA01.dbf" get utilized for restoring all the tables.
Please suggest me.
Thanks
KSGFrom documentation
The number of datafiles comprising a tablespace, and ultimately the database, can have an impact upon performance.
Oracle allows more datafiles in the database than the operating system defined limit. Oracle's DBWn processes can open all online datafiles. Oracle is capable of treating open file descriptors as a cache, automatically closing files when the number of open file descriptors reaches the operating system-defined limit. This can have a negative performance impact. When possible, adjust the operating system limit on open file descriptors so that it is larger than the number of online datafiles in the database.
Thanks,
NEerav -
Sysaux tablespace issue-missing sysux datafile
hi,
I ve upgraded an database for 9i to 10g. The upgrade was sucessfull and the Db was in normal usage. Due to some functionality testing the database was restored to a state from the backup taken after upgrade. But while restoring the database i forgot to include the path of the datafile of sysaux tablespace in the control file re-creation script.
I didnt notice this issue for long time until i realised the mistake made by me.
I found in the alert logs which showed errors such as
ORA-01157: cannot identify/lock data file 124 - see DBWR trace file
ORA-01110: data file 124: '/oracle/ora/dbs/MISSING00141'
ORA-27037: unable to obtain file status
since the path of the sysaux tablespace was not referred in the script i thought of referring it now and i issued the following command
alter tablespace sysaux add datafile '<path>/sysaux01.dbf' reuse;
i issued this as the datafile was already present and i thought of jus reusing it again.
But what had happened is this datafile had been added as an additional datafile for the sysaux tablespace,which means the sysaux is still referring '/oracle/ora/dbs/MISSING00141' as one of the datafile.
but one important thing is that there isnt any such datafile ie '/oracle/ora/dbs/MISSING00141' when i checked inside the dbs folder.
The path is getting referred as part of the sysaux tablespace but its physical location is not found.
So i did took this datafile offlinedrop issuing
alter database datafile '/oracle/ora/dbs/MISSING00141' ofline drop
but the problem i m facing now is the AWR is not opening up and it throw error stating first datafile of sysaux tablespace '/oracle/ora/dbs/MISSING00141' not found.
ORA-00376: file 124 cannot be read at this time
ORA-01110: data file 141: '/oracle/ora/dbs/MISSING00141'
ORA-06512: at line 21.
any solution for solving the problem would be appreciated
thanks,
ahmedHi, I've got exactly the same problem up to the point where I try to offline drop the MISSING0009 datafile.
The command says it completed OK but the phantom datafile does not go and still reports that it's there in dba_data_files, althoguh the online_status is RECOVER, the status is ONLINE.
I'm not sure how to get rid of the entry if the offline drop command doesnt work. I've tried recreating the control file and deleting the entry for this datafile too but somehow it returned after that too!
I''m also not sure what to do when I do get rid of it - since I cant recover the old sysaux01.dbf datafile since it's not consistent with the database since there has been a week inbetween and we're not running archivelogging.
I would assume that all the stuff usually put in the SYSAUX tablespace is therefore lost, but I dont think we use anything that normally puts stuff in there, I've only noticed this since I was trying to install em.
Do I have to rebuild the database from scratch? Or any ideas on how I can recover the situation? Can I do something like startup upgrade and re-run the upgrade scripts which will put their stuff back into sysaux....?
Many thanks for ideas
Rob -
Will autoextend on increase datafile size?
Hi i am observing in many posts since 2 weeks that many DBA's are posting that because i had set autoextend on my file size increase to <what ever the value>. am really wondered and somebody could please explain.
if necessary refer to post by sarat on undotbs size.Hi Pavan,
Two questions you need to ask yourself
1 As the datafile is the smallest unit of recovery, how much time will recovery of , say, 2 Gb take? How much downtime can I afford?
2 This is the age old question, assuming you don't want to fill up a disk (we usually don't set a maxsize, but monitor free disk space), how much free space is there on the disk.
So the answer is 'It depends'
Sybrand Bakker
Senior Oracle DBA
Maybe you are looking for
-
2 computers, 2 libraries- 1 iWeb
I want to Publish an iWeb Gallery and my pictures are in iPhoto 6 on my laptop. I Publish iWeb galleries through my desktop, so I need to get the photos from my laptop to my desktop. No problem, I export them, send them over the LAN to my desktop and
-
Hi Experts, For a purchase order line items ME23N where can i see the Value type of the line items of a purchase order. i.e Value Type = 10 - Actual,20 - Plan, 50- Budget What is significance of following Value types 1. 40 - Commitments, 2. 70 - Vari
-
How do I disable the Do-Not-Track header? Firefox preference is not working.
The "Do not tell anything about my tracking preferences" option is not working. As it always sends the "DNT:1" header no matter what option. I am using Firefox 23. I am aware of Bugzilla 803898. I would like an immediate solution if possible until th
-
Wiping OSX 10.4.11
Hello, I'm trying to do a wipe on my old iMac that is running 10.4.11. We want to wipe it so it can be submitted for recycling as it is not very functional anymore. We do not have the original install disc and do not want to spend the money to buy on
-
Can I use the citrix metaframe to run windows applications on Mac OSX?
Sorry if I put this in the wrong forum, but I was wondering, if I could use the citrix metaframe to run Windows apps in OSX. Thanks in advance for the help!