Solved

ora-00933

Posted on 2011-02-11
14
890 Views
Last Modified: 2012-08-13
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
Comment
Question by:hussainkhan22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
14 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 34871074
try:
 alter database datafile 'appl/oracle/abc/test01.dbf' resize 6001M autoextend on maxsize 6051M;

0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34871078
You are also missing a leading '/':

'/appl/oracle/abc/test01.dbf'
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34871079
Hi,

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

wmp
0
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
LVL 77

Expert Comment

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

You could be right.  Never tried it.
0
 

Author Comment

by:hussainkhan22
ID: 34871113
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
 

Author Comment

by:hussainkhan22
ID: 34871139
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34871141
Don't use RESIZE and MAXSIZE together in one statement!
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34871171
MAXSIZE is meaningful only if AUTOEXTEND is ON.

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

0
 

Author Comment

by:hussainkhan22
ID: 34871194
Its autoextend on already
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34871217
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
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34871373
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34871527
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34888287
The suggestion you accepted does NOT work.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

695 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