• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 931
  • Last Modified:

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.
0
hussainkhan22
Asked:
hussainkhan22
  • 6
  • 4
  • 3
1 Solution
 
slightwv (䄆 Netminder) 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now