question

OracleApprender avatar image
OracleApprender asked

How do you add a data file to a tablespace?

Can anybody tell me the syntax that how to add a data file to an existing tablespace. Thank you in advance.

oracleadministrationtablespace
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

HillbillyToad avatar image HillbillyToad commented ·
I appreciate your interest in Oracle, but have you considered looking in the online Oracle user guides before posting a question? And if you do post, suggest what problems you had following the Oracle docs? It would probably take you less time to do that than post a generic question here...
1 Like 1 ·
Andrew Mobbs avatar image
Andrew Mobbs answered
ALTER TABLESPACE <tablespace> ADD DATAFILE '<datafile>' SIZE <size> AUTOEXTEND <options>

AUTOEXTEND can be "OFF" or "ON" with further options of "NEXT <size>" and "MAXSIZE <size>" for the increment and the maximum size.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KillerDBA avatar image
KillerDBA answered

Here's one way:

Alter Tablespace Command

It appears that you would:

alter tablespace <name> add <datafile>

That's a 10g reference. I think you use 9, so I looked at the 10g "New Features" and tablespaces have changed, but not the basics, so I think this command will work on 9.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

OracleApprender avatar image OracleApprender commented ·
Thank you. I'll try with your suggestion.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.