Now, that you have your export, it's time to import it into your new system.
I'll here suppose that you executed the same command as I did on this webpage.
We will also do it with a parameter file, here is it his content :
file=full-db-1.dmp full-db-2.dmp full-db-3.dmp full-db-4.dmp full-db-5.dmp full-db-6.dmp full-db-7.dmp full-db-8.dmp
It's nearly the same as in this webpage , except that we change the logfile parameter(in bold). Because the logfile generated by the import will, of course, be something else than the export.
If your datafile on the old database are on the same place within the new database,I means the directory of your new datafile exists, you nearly have nothing to do. Otherwise, some works need to be done.
First, you have to create the same directory for the new database. I means that if your datafile on the database that will be exported has the datafile on this directory :
this directory needs to exist on the system where you will import the database. So, simply do :
and change probably recursively the property of this directory to the owner of the database, probably the user oracle.
If you don't remember where was your original directory on the file system, let's try an import and in the log file, you will something like that :
ORA-01119: error in creating database file '/u0/oradata/tables/my_dbf_file.dbf'
So, try an import and let him end unsuccesfully, and then search for each :
error line, and create his corresponding directory ! As easy as that, and don't forget to create the directory with the proper right, to let oracle user do his job !
Still one thing needs to be done, as you exported the database with a user, this user needs to exist on the new system, so you have to create it with his password. This can be done with these steps :
- create the user and his password
- enable connect grand to this user
This can be done with this two command entered in sqlplus and with sysdba access right :
SQL> create user USER identified by USER_PASSWORD;
SQL> grant connect to USER;
And now, we can do the import with this simple command :
import \'USER/USER_PASSWORD as sysdba\' parfile=imp-oracle.txt
And be patient as it can take a lot of time…
- When doing an import, don't let the database be in archivelog mode. Otherwise, it will produce a lot of archive log file if you database is big…