Resize existing Tablespace?
Can someone tell me how to resize a tablespace?
I can't change the size 'cause the usage is still very high.
I've removed several users (cascade) from my "system" tablespace, but I noticed the file size didn't change, even though a lot was removed.
Perhaps "resize" isn't the correct term - maybe I mean "compact" or "compress" or "restructure" or something...
Thanks.
To resize a tablespace the supporting datafiles must be resized or a datafile must be added to the tablespace.
I. This can be done with the ALTER TABLESPACE ADD DATAFILE command.
ALTER TABLESPACE app_data
ADD DATAFILE '/DISK6/app_data_04.dbf'
SIZE 200M
AUTOEXTEND ON
NEXT 10M
MAXSIZE 500M;
This will add a datafile to the app_data tablespace and it will turn on the autoextend feature so that the datafile will be increased by 10MB when necessary but will not exceed 500MB.
II. Datafiles supporting tablespaces can also be resized as follows.
ALTER DATABASE
DATAFILE '/DISK5/app_data_02.dbf'
RESIZE 200M;
This will resize the datafile DISK5/app_data_02.dbf to a new size of 200MB.
Similar Messages
-
Adding data file to the existing tablespace given wrong format file name
Hi
while adding the data file existing tablespace. i given wrong format '/dev/oracle/data/user_data_02' i miss the .dbf extension for this data file.
Alter tablespace ts2 add datafile '/dev/oracle/data/user_data_02' size 200m
the data file was created.
So i want to know. What will happen if the data file is wrong format?
Thanks in advanceit doesnt matter what you name the file. oracle will be able to use it. if you need to change the name to meet your naming conventions, then you will need to take the db down and rename the file at the OS level and then startup mount to rename the file at the DB level.
why are you puting files in /dev? Thats for devices. -
CREATE A NEW TABLESPACE THAT IS LIKE AN EXISTING TABLESPACE?
Hello,
Does anyone know how to create a new tablespace, e.g, bk_USERS, based on an existing tablespace, say USERS tablespace? The EM has option 'create like' to accomplish this, but I'd like to use the statements from command line.
Thank you for assistance,hi Anurag Tibrewal,
I am using Oracle 10g Enterprise and would like to create a new tablespace based on the structure of the existing tablespace. In other word, is it possible to copy existing tablespace and have the newly created one under the new name?
I tried something as follows but it does not work:
CREATE TABLESPACE new_tablespace_name LIKE existing_tablespace_name DATAFILE '$ORACLE_HOME/oradata/datafle SIZE 10M; -
Windows Server batch to resize TEMP tablespace.
I was wondering if it's possible to use windows server 2003 batch jobs to RESIZE TEMP tablespace.
Here are some details:
Windows Server 2003
Oracle 10gR2
We do a windows batch job to backup all files on Oracle directory (.ctl, .dbf, etc) to a different server. With autoextend on, the TEMP.dbf gets to be really big. What I am wanting to do is reduce the size of the TEMP.dbf before backing up the files - to reduce the back up time.
Since alter database tempfile 'c:\oracle\...' RESIZE 10M is a SQL command; is there a way I can resize it through the windows batch job? If so, mind pointing me the way?
Thanks.a) Consider using RMAN for backup
b) Don't backup temp tablespace
c) Are Temporary tabesspaces Backed Up -
Hi all,
I have ran out of space in the asm so couldn't add the datafiles to a tablesapce so I tried to resize the tablespace which has got unused space so that I can use the gained space to add datafile when I tried to do that I am getting the following error. What can I do
select FILE_NAME,TABLESPACE_NAME,sum(MAXBYTES)/1024/1024/1024,sum(USER_BYTES)/1024/1024/1024,sum(BYTES)/1024/1024/1024 from dba_data_files where TABLESPACE_NAME='DATA11' group by TABLESPACE_NAME,FILE_NAME;
FILE_NAME TABLESPACE_NAME SUM(MAXBYTES)/1024/1024/1024 SUM(USER_BYTES)/1024/1024/1024 SUM(BYTES)/1024/1024/1024
+DATA_1/affperf/datafile/data11.290.639902725 DATA11 31.9999847 2.01165771 2.01171875
+DATA_1/affperf/datafile/data11.291.639902049 DATA11 31.9999847 1.91497803 1.91503906
+DATA_1/affperf/datafile/data11.296.639896325 DATA11 31.9999847 4.73626709 4.73632813
+DATA_1/affperf/datafile/data11.298.639895327 DATA11 31.9999847 1.99212646 1.9921875
+DATA_1/affperf/datafile/data11.300.639894203 DATA11 31.9999847 2.07611084 2.07617188
+DATA_1/affperf/datafile/data11.305.639892373 DATA11 31.9999847 1.93255615 1.93261719
+DATA_1/affperf/datafile/data11.319.639873689 DATA11 31.9999847 2.04779053 2.04785156
+DATA_1/affperf/datafile/data11.339.639863013 DATA11 31.9999847 5.23431396 5.234375
Actually the alloted size for +DATA_1/affperf/datafile/data11.290.639902725 file is 31 g but used is very less as you can see, but when I tried to make it to 20 g by using the following command i am getting the error.
SQL> ALTER DATABASE DATAFILE '+DATA_1/affperf/datafile/data11.291.639902049' RESIZE 20g;
ALTER DATABASE DATAFILE '+DATA_1/affperf/datafile/data11.291.639902049' RESIZE 20g
ERROR at line 1:
ORA-01237: cannot extend datafile 233
ORA-01110: data file 233: '+DATA_1/affperf/datafile/data11.291.639902049'
ORA-17505: ksfdrsz:1 Failed to resize file to size 2621440 blocks
ORA-15041: diskgroup space exhausted
What is the problem, Please help.Hemant K Chitale wrote:
+DATA_1/affperf/datafile/data11.291.639902049 DATA11 31.9999847 1.91497803 1.91503906The datafile is only 1.9GB currently. Why not try resizing it to 2GB
Similarly :
+DATA_1/affperf/datafile/data11.290.639902725 DATA11 31.9999847 2.01165771 2.01171875this datafile is only 2.012GB in size.
What other files do you have in the DiskGroup ? What is the total size of the files ? How large is the DiskGroup ?
Hemant K Chitaleactually i am trying to shrink data11 tablespace
TABLESPACE_NAME SUM(MAXBYTES)/1024/1024/1024 SUM(USER_BYTES)/1024/1024/1024 SUM(BYTES)/1024/1024/1024
DATA11 255.999878 21.9458008 21.9462891
This is the status of the tablespace, See out of 255gb alloted for it only 22gb is used. So I thought of shrinking it and use the gained space through shrink to add datafile to another tablespace. on trying this i got the mentioned error. also now i checked the asm space it shows that 99gb is free. Is re balancing problem causing this ORA-15041. -
Dear All,
My system datafile size has reached around 3.29 GB. I have separated the datafiles and now My query indicates that i am only using 9 percent of the total system tablespace. I need to reduce the size of this file to 400M. i issued the command "ALTER DATABASE DATAFILE '............' RESIZE 400M". i recieve an error saying "file contains used data beyoung requested resize size".
Any comments are highly appreciateable.
Thanks and Best Regards.
Shahzada Khurram KhanFirst, no matter which tablespace is the target you cannot shrink the allocated file space to less than the last allocated object.
So map the tablespace: list objects by file, block to see how much room exists, if any, at the end of each allocated file. Then attempt to shrink each file down.
This will take the space away before some other object gets allocated to it.
Next verify that all objects in the system tablespace are only those objects placed there by Oracle when the database is created. Move non-SYS/SYSTEM owned objects to a different tablespace. Repeat above.
The odds are you will still not get back that much of the allocated space. In which case your choices are to either live with it, or to bebuild the database from scratch so that you re-create the system tablespace.
HTH -- Mark D Powell -- -
To resize temporary tablespace
The temporary tablespace extends endlessly and its size reaches 3.8 GB now. Every time the database startup, it takes a long time to initialize the temporary tablespace before completing startup process.
I want to resize it. What should I do next?
Should I add a limit to its size?
May experts here share your experience?
Thanks,
RichardTo all,
thank you for your opinions!
From the following SQL and its result, it can be noted that most space of the temporary segment is free.
select f.TABLESPACE_NAME, f.FILE_NAME, f.AUTOEXTENSIBLE, sum(s.BYTES)
from dba_free_space s, dba_data_files f
where s.FILE_ID = f.FILE_ID
group by f.TABLESPACE_NAME, f.FILE_NAME, f.AUTOEXTENSIBLE
DRSYS C:\ORACLE\ORADATA\HRDB01\DR01.DBF YES 87941120
INDX C:\ORACLE\ORADATA\HRDB01\INDX01.DBF YES 45735936
RBS C:\ORACLE\ORADATA\HRDB01\RBS01.DBF YES 503308288
SYSTEM C:\ORACLE\ORADATA\HRDB01\SYSTEM01.DBF YES 12632064
TEMP C:\ORACLE\ORADATA\HRDB01\TEMP01.DBF YES 3964395520
TOOLS C:\ORACLE\ORADATA\HRDB01\TOOLS01.DBF YES 12574720
USERS C:\ORACLE\ORADATA\HRDB01\USERS01.DBF YES 113238016
Then what should I do next? Drop the existing one and recreate a new temporary tablespace with a max size limit?
Richard -
Resizing temporary tablespace in oracle 8i
Please,
I some questions on oracle 8i.
1. how do I know on oracle 8i if the tablespace X is the temporary tablespace?
2. I have someone that increase the size of the temporary tablespace, so I have to decrease it to its normal size, my question is when I do the following command.
alter database tempfile '/u02/oradata/TESTDB/temp01.dbf' resize 250M;
alter database tempfile '/u02/oradata/TESTDB/temp01.dbf' resize 250M
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value
Does someone show me how to solve this issue?
Thanksyou can use the below sqls
sql>SELECT tablespace_name, extent_size, total_extents, used_extents,
free_extents, max_used_size FROM v$sort_segment;
From the output of the v$sort_segment query:
extent_size : size of one extent, in number of Oracle blocks
total_extents : total number of extents in the segment (free or in use)
used_extents : total number of extents currently in use
free_extents : total number of extents currently marked as free
max_used_size: maximum number of extents ever needed by an operation (like a sort):
sql> SELECT s.username, u.tablespace, u.contents, u.extents, u.blocks FROM v$session s,
v$sort_usage u WHERE s.saddr=u.session_addr;
SQL> select s.username, s.sid, u.tablespace, u.contents, u.segtype,
round(u.blocks*8192/1024/1024,2) MB
from v$session s, v$sort_usage u
where s.saddr = u.session_addr
and u.contents = 'TEMPORARY'
order by MB DESC ;
reference
### search MetaLink on: resize tempfile
Note 273276.1 How to Shrink the datafile of Temporary Tablespace
Note 274283.1 How to resize Tempfiles if receive an ORA-03297 error Gen RDBMS.
RD-9014 :
Note 132663.1 ORA-03296 Resizing Temporary Locally Managed Tablespace
Note 180578.1 Cannot Resize Tempfiles in Bitmapped Temporary Tablespaces
Note 161103.1 Space For a Tempfile Not Allocated In The Filesystem -
Unable to shrink/resize undo tablespace
Hi Experts,
I have Oracle 10.2.0.4 database running on RHEL 4.7 in production environment, my undo tablespace has grown upto 32 GB, database is rebooted, still the tablespace is full.
I want to shrink, resize the undo tablespace, please help me
Few details are as below
show parameter undo_retention
NAME TYPE VALUE
undo_retention integer 10
Please help
ThanksThis post is repeatedly executed by mistake, thread with same name is posted 2 minutes before this
Edited by: user1687821 on Jul 9, 2010 9:29 AM -
problem definition:
To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16 . In this process some fla's are not resizing properly I mean the content is not matching with stage
In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
development tool : adobe flash professsional cc
extension : air for android 16
original file dimension: 800 * 600 px
new dimension required is : 2650 * 1600 px ( to get full screen view)
anyone please suggest me to solve this problem
when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
Thanks®ards
K.Niranjanproblem definition:
To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16 . In this process some fla's are not resizing properly I mean the content is not matching with stage
In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
development tool : adobe flash professsional cc
extension : air for android 16
original file dimension: 800 * 600 px
new dimension required is : 2650 * 1600 px ( to get full screen view)
anyone please suggest me to solve this problem
when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
Thanks®ards
K.Niranjan -
[b]Resizing/Altering Tablespaces Oracle9i[/b]
1. I want to solve a performance problem by resizing the:
temporary tablespace
rollback tablespace
undo tablespace
using
Alter tablespace, by doubling the storage parameters.
Is this enough or should I resize the associated datafiles?
2. Is it better performance wise: to resize the datafiles, i.e doubling
capacity
OR
adding another datafile to the tablespace with the same capacity as
the first one.Well U should add space in datafiles if datafiles are of smaller size and very soon they need to autoextend.
Storage parameters must be decided before making tablespace.
for ur second query i will suggest u to have different datafile on different disks -
How to resize existing magazine page size to 320x480
Hi
I would like to resize an existing magazine page to the size of an iPhone 320*480
When we set the page size of a new document (File-document-page size) we can change the width and the height.
But if I have to resize an existing magazine page in InDesign to iphone size, how do I do?
Also the text and the images should be placed correctly, and the page layout should look the same when i resize.
If I resize them and then export, the XML created should be the size of iPhone (this is what I want to achieve)
Is this possible?
Please help!
Thanks in advance!
Pearl IHello Bob
Thanks for the quick reply!
Looks like it is possible but time consuming...
I was wondering if something could be done with help of the "master page"
If default settings are set to master page, can it be replicated to the
child master pages.
Not sure if I was clear in conveying.
Pearl I -
I have a rollback tablespace contain 7 rollback segments, I want to resize(decrease) the tablespace without reduce the datafile size, any suggest method? Its it possible cretae another rollback tablespace then take origin rollback tablespace offline?
Hi,
Sum of datafile sizes defines the tablespace size. So to reduce tablespace size datafile size have to be reduced.
null -
Hi, I've got an external hard drive (1 GB Western digital) Which I bought with a view to both storage and time-machine functions.
Initially, I partitioned the hard drive such that I had 750 GB for the time-machine segment, and 250 GB for the storage segment.
Now that my storage is approaching the 250 GB limit, and my time machine is only taking up 80 of the alloted 750 GB, I want to transfer some of that space across so that I'll have more room for storage.
When attempting this on disk utility, I can reduce the size of the time machine partition, but I am unable to increase the size of the storage partition.
Can someone please advise what I should do to sort this out without deleting the contents of each partition.
Regards,
JoshWell, this is not easily answered. You can shrink existing partitions in order to add additional ones. But in order to add space from one partition to another that can only be done by first removing the lower partition first. If that partition has data, then it will be lost. Unfortunately, Disk Utility cannot manipulate partitions in place. You need a third-party utility for that, iPartition 3.4.1.
Now with that said I'll pass on a bit of advice. Do not us your Time Machine backup drive for extra storage. External storage and backups should be kept on separate drives. I suggest you get a separate drive for your storage or Time Machine backups.
If you use Disk Utility you can shrink your Time Machine partition, but the only way to put that space in another partition is to first delete the storage partition, then recreate it with a larger capacity. -
How to autoextend just one file from existing tablespace?
Hi,
I discover some of the tablespaces did not have autoexent feature, i.e. none of the datafiles have been autoextend features
so I need to autoextend it, hopefully the data file which has the most free space. So it would be good if I can come up with a query to find out which datafile belonging to a tablespace which currently has the highest free space could be selected for extend features,
To get me on the right track,
which dynamic views/data dictionary do I need to look up?
v$datafile/v_$datafile
dba_free_space
v$tablespace
when should I use v$datafile? when should I use v_$datafile.
thanks a lot!There seems to be some basic confusion.
AUTOEXTEND is not going to reuse the space within a data file; it is going acquire more space for the same file on the disk.
You can lookup dba_data_files.autoextensible column to check if your file is autoextensible or not.
when should I use v$datafile? when should I use v_$datafile.v$datafile is just a synonym for v_$datafile.
Maybe you are looking for
-
When I insert an audio CD into my iMac, it automatically starts playing
When I insert an audio CD into my iMac, it automatically starts playing, and I can't figure out why, nor how to stop this behavior. When I click in the upper right corner of my screen where it says "Finder", it shows the Finder as the only applicatio
-
Error Message When Saving a File
I'm running PSE 10 on a Mac OSX 10.6.8. When I tried to save a file recently I received the following message: "Could not save as FILENAME because you do not have necessary access privileges". It occurred when I attemped to save as a PSD and JPG.
-
How to create trial version in oracle project
assalamualikum and hi .. sir how to create trial version in oracle project i want to anyone use my oracle (forms) project for some limited time.. and then expire after some time..
-
can anybody suggest how to detect dent or depression on a metal surface using IMAQ Vision.The metal surface is circular with diameter of 2 inch. The surface may carry stains which is perfectly alright but dent is the problem.
-
X1 - WAN (UMTS / SIM) unter Windows 8.1
QuestionIch habe ein X1, mit integriertem SIM Kartenslot für UMTS bzw. Wireless WAN und dem eingebauten Modul Ericsson F5521gw. Im Gerätemanager wird das Device erkannt und es sind auch nötigen (richtigen?) Treiber installiert. Ich habe diese und die