Solved

datafile

Posted on 2011-02-21
7
887 Views
Last Modified: 2012-05-11
I need to increase the size of a datafile but it is already at its maxsize. How do I increase the maxsize of a datafile so I can resize it.
0
Comment
Question by:msimons4
7 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 334 total points
Comment Utility
ALTER DATABASE
  DATAFILE '/your/data/file/goes_here.dbf'
 AUTOEXTEND ON
   MAXSIZE 1234M;  -- adjust size to whatever you need
0
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 334 total points
Comment Utility
you can specify the maxsize in bytes  (no units)

or K, M, G, T, P, E  


kilobytes
megabytes
gigabytes
terabytes
petabytes
exabytes
0
 
LVL 18

Assisted Solution

by:sventhan
sventhan earned 83 total points
Comment Utility
<  but it is already at its maxsize

What is your max size? Is autoextend on?

What is the block size of the DB?

0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 334 total points
Comment Utility
also note, you can manually resize a datafile beyond it's maxsize.

the maxsize only applies to autoextend.

So, if your datafile is 1G max, you can resize it to 2G, but it won't autoextend because it's already beyond the max size
0
 

Author Comment

by:msimons4
Comment Utility
Is it better to increase the maxsize of the datafile or just increase the size of the datafile
0
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 334 total points
Comment Utility
neither is "better" than the other, but I would probably increase the maxsize and then let the datafile autoextend as needed


you could resize it also if you know you'll need 100Mb  now and "maybe" 100Mb later, then set the maxsize 200Mb bigger and resize 100Mb now
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 83 total points
Comment Utility
Just to add that extending datafiles is expensive.  If you let it autoextend you have no control when it happens and can take place during the busy times.

You should also set the NEXT size on autoextend to a decent size you it doesn't extend all the time.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now