Forum Stats

  • 3,784,366 Users
  • 2,254,929 Discussions
  • 7,880,792 Comments

Discussions

Do you have to precreate data files when doing a full import?

davalutchi
davalutchi Member Posts: 7


I am doing a database upgrade from oracle 8.0.4 to oracle 8.1.7 using the full export and import method. I have already precreated the tablespaces on the new database. I was wondering do I also have to precreate the exact datafile names in the new database as well and allocate the storage size of the new datafiles before I do the full import?

Here is what I did in the test system that worked!

The test system I precreated the tablespaces and datafiles but notice that the import messages was sending warnings that they already exist as if it was going to create them for me. If this is the case I think it might be safe to asumme that I didnt need to precreate them before the full import. But I am not sure if that is going to work still.

davalutchi

Answers

  • Srini Chavali-Oracle
    Srini Chavali-Oracle Member Posts: 29,596 Blue Diamond

    If you do not pre-create them, then the import process will create tablespaces/datafiles with the same exact naming convention as the source. If this is acceptable, then there is no need to pre-create. If you wish to change the location/path of the datafiles on the target, then you will need to pre-create

    HTH
    Srini

  • Paul M.
    Paul M. Member Posts: 10,947
    edited Jun 11, 2014 2:56PM
    I am doing a database upgrade from oracle 8.0.4 to oracle 8.1.7

    Wow !!! what a new versions !!!

    I have already precreated the tablespaces on the new database. I was wondering do I also have to precreate the exact datafile names in the new database as well and allocate the storage size of the new datafiles before I do the full import?
    
    
    

    Datafile names are totally irrelevant, once you have created the tablespaces. Of course you need to allocate enough space to receive imported data.

    The test system I precreated the tablespaces and datafiles but notice that the import messages was sending warnings that they already exist as if it was going to create them for me.

    Yes, that's perfectly normal, since a full import does try to create them, but that's only a warning.

    I think it might be safe to asumme that I didnt need to precreate them before the full import.
    
    
    

    True, but only if paths are exactly the same. If you need/want to allocate datafiles on different paths, then you have to precreate them, for example when exporting from Windows and importing into Linux/Unix, or viceversa.

    Paul M.
  • The tablespaces dont have a place to alter the storage size. The datafiles are the only place that you can alter the storage size. Are you saying that is I kept the same defualt datafile new when I precreate the tablespaces I need the add space enough space to that defualt datafile?

  • Paul M.
    Paul M. Member Posts: 10,947
    Are you saying that is I kept the same defualt datafile new when I precreate the tablespaces I need the add space enough space to that defualt datafile?
    

    Not sure what you mean... if paths are exactly the same, then you don't need to precreate the tablespaces, as they get automatically created by the full import.

    If you need/want to change paths, then you have to precreate the tablespaces (datafiles) of a size sufficient to contain data that will be imported.

    But you should be able to see actual tablespaces (datafiles) size in DB to be exported, and create the same (in different paths) in DB to be imported.

    davalutchi
  • davalutchi
    davalutchi Member Posts: 7

    Thank you for your help. We ended up doing a full export and a full import of the database.

This discussion has been closed.