ora-00933

Hey When I am trying to execute
SQL> alter database datafile 'appl/oracle/abc/test01.dbf' resize 6001M maxsize 6051M;

Getting the below error:
Ora-00933: Sql command not properly ended.

I really appreciate your help. Thanks in advance.
hussainkhan22Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
try:
 alter database datafile 'appl/oracle/abc/test01.dbf' resize 6001M autoextend on maxsize 6051M;

0
 
slightwv (䄆 Netminder) Commented:
You are also missing a leading '/':

'/appl/oracle/abc/test01.dbf'
0
 
woolmilkporcCommented:
Hi,

afaik RESIZE and MAXSIZE cannot be used together in a single statement!

wmp
0
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
slightwv (䄆 Netminder) Commented:
>>cannot be used together in a single statement!

You could be right.  Never tried it.
0
 
hussainkhan22Author Commented:
It is "/appl" only I made a mistake in typing. So what do you guys suggest me to do to resolve this error. I really appreciate your help.
0
 
hussainkhan22Author Commented:
I have one question can maxsize be greater than the resize filesize. As above customer asking to resize tablespace to 6001M and specifying maxsize as 6051M,
0
 
woolmilkporcCommented:
Don't use RESIZE and MAXSIZE together in one statement!
0
 
woolmilkporcCommented:
MAXSIZE is meaningful only if AUTOEXTEND is ON.

Why would one try to resize a datafile which has AUTOEXTEND ON?

0
 
hussainkhan22Author Commented:
Its autoextend on already
0
 
woolmilkporcCommented:
So do you want to desrease the size? That's the only use of RESIZE for an AUTOEXTEND datafile which could make some sense, IMHO.

And, actually, if both modifications have to be performed, use two distinct statements!
0
 
slightwv (䄆 Netminder) Commented:
It also doesn't seem to make sense to resize basically, a 6 Gig datafile and only let it autoextend another 50 Meg.

I would hope the NEXT size on a 6 Gig datafile would be more than 50M.  I would probably have it autoextend 1 Gig at a time since that is a pretty expensive operation.

I also confirmed that woolmilkporc said:  It does need to be two commands.
0
 
woolmilkporcCommented:
I just tested it here:

If RESIZE is being used nothing else can be specified in ALTER DATABASE DATAFILE ...

Also, MAXSIZE cannot be specified without AUTOEXTEND ON preceeding it.

0
 
woolmilkporcCommented:
The suggestion you accepted does NOT work.
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.