datafile

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.
msimons4Asked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
ALTER DATABASE
  DATAFILE '/your/data/file/goes_here.dbf'
 AUTOEXTEND ON
   MAXSIZE 1234M;  -- adjust size to whatever you need
0
 
sdstuberConnect With a Mentor Commented:
you can specify the maxsize in bytes  (no units)

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


kilobytes
megabytes
gigabytes
terabytes
petabytes
exabytes
0
 
sventhanConnect With a Mentor Commented:
<  but it is already at its maxsize

What is your max size? Is autoextend on?

What is the block size of the DB?

0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
sdstuberConnect With a Mentor Commented:
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
 
msimons4Author Commented:
Is it better to increase the maxsize of the datafile or just increase the size of the datafile
0
 
sdstuberConnect With a Mentor Commented:
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
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.