Home » RDBMS Server » Server Administration » How do I add a datafile to a tablespace with '-' in the name
How do I add a datafile to a tablespace with '-' in the name [message #202550] Fri, 10 November 2006 05:26 Go to next message
aidi-h
Messages: 45
Registered: November 2005
Member
I want to add a datafile to my 'TEST-OF-MAIN' tablespace but get the following error,
alter tablespace TEST-OF-MAIN add datafile '/oracle/oradata/dba/test-of-main4.ora' size 1500M autoextend off
*
ERROR at line 1:
ORA-02142: missing or invalid ALTER TABLESPACE option

I presume this is the '-' in the tablespace name as I tried an almost identical sql on a talespace 'TEST' and this worked.
Is there anyway that I can add this datafile to the tablespace or would a resize command have to be used instead. (i haven't tried that as yet).
Re: How do I add a datafile to a tablespace with '-' in the name [message #202558 is a reply to message #202550] Fri, 10 November 2006 06:28 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is probably a nonsense (as I don't know anything about the issue), but - what happens if you substitute minus with an underscore, so that it looks like TEST_OF_MAIN instead of TEST-OF-MAIN?
Re: How do I add a datafile to a tablespace with '-' in the name [message #202579 is a reply to message #202558] Fri, 10 November 2006 07:42 Go to previous messageGo to next message
aidi-h
Messages: 45
Registered: November 2005
Member
I think that I have sorted this now. I used double quotes "" around the tablespace name and it appears to have worked. Thanks for the reply though
Re: How do I add a datafile to a tablespace with '-' in the name [message #202650 is a reply to message #202579] Fri, 10 November 2006 12:38 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> it appears to have worked.
It is becuase you have created the tablespace within quotes.
Not a good idea.
Re: How do I add a datafile to a tablespace with '-' in the name [message #202665 is a reply to message #202650] Fri, 10 November 2006 15:31 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I might go as far as to say 'definitely a bad idea'
Re: How do I add a datafile to a tablespace with '-' in the name [message #202896 is a reply to message #202550] Mon, 13 November 2006 04:07 Go to previous message
aidi-h
Messages: 45
Registered: November 2005
Member
I totally agree. I didn't actually create the tablespace. I'm just trying to maintain it. Thanks for the response
Previous Topic: Error while creating new Oracle instance in solaris
Next Topic: connecting via Internet
Goto Forum:
  


Current Time: Fri Sep 20 06:55:15 CDT 2024