Datafile extend or add new file
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Datafile extend or add new file

  1. #1
    Join Date
    May 2013
    Posts
    2

    Datafile extend or add new file

    I am a new oracle dba. I am concerned that one of the files is getting low on space. Running oracle 8i on AIX. Does the file automatically extend or does it create a new file? I think I have to create a new file, just not sure.

    Thanks

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Check how was it created, meaning, if autoextend is allowed for it.
    Either way, I do prefer to control my tablespaces myself so I used (Ora8i) to create datafiles with autoextend set to OFF then add datafiles as needed.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,021
    If you want to learn, then you should write a query to join these views and figure out how much
    free space you have in each tablespace. You should join the two tables with tablespace_name
    and file_id. Now you can make the query work for what you are looking for. This is 11g, your
    version of Oracle is different.

    By the way if you are learning Oracle why start with a 10+ year old version of Oracle?

    Code:
    SQL> desc DBA_FREE_SPACE
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     TABLESPACE_NAME                                    VARCHAR2(30)
     FILE_ID                                            NUMBER
     BLOCK_ID                                           NUMBER
     BYTES                                              NUMBER
     BLOCKS                                             NUMBER
     RELATIVE_FNO                                       NUMBER
    
    SQL> desc dba_data_files
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     FILE_NAME                                          VARCHAR2(513)
     FILE_ID                                            NUMBER
     TABLESPACE_NAME                                    VARCHAR2(30)
     BYTES                                              NUMBER
     BLOCKS                                             NUMBER
     STATUS                                             VARCHAR2(9)
     RELATIVE_FNO                                       NUMBER
     AUTOEXTENSIBLE                                     VARCHAR2(3)
     MAXBYTES                                           NUMBER
     MAXBLOCKS                                          NUMBER
     INCREMENT_BY                                       NUMBER
     USER_BYTES                                         NUMBER
     USER_BLOCKS                                        NUMBER
     ONLINE_STATUS                                      VARCHAR2(7)
    this space intentionally left blank

  4. #4
    Join Date
    May 2013
    Posts
    2
    The version of Oracle is what my employer is currently using. It is a small part of the business but I want to make sure it is successful. Thank you for your help everyone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width