How to import an Oracle database from dmp file and log file?

前端 未结 3 1626
南笙
南笙 2021-01-29 19:18

How would I go about creating a database from a dump file? I do not have an existing database with the same structure on my system so it has to be complete with jobs, events, ta

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-29 19:49

    How was the database exported?

    • If it was exported using exp and a full schema was exported, then

      1. Create the user:

        create user  identified by  default tablespace  quota unlimited on ;
        
      2. Grant the rights:

        grant connect, create session, imp_full_database to ;
        
      3. Start the import with imp:

        imp /@ file=.dmp log=.log full=y;
        
    • If it was exported using expdp, then start the import with impdp:

      impdp / directory= dumpfile=.dmp logfile=.log full=y;
      

    Looking at the error log, it seems you have not specified the directory, so Oracle tries to find the dmp file in the default directory (i.e., E:\app\Vensi\admin\oratest\dpdump\).

    Either move the export file to the above path or create a directory object to pointing to the path where the dmp file is present and pass the object name to the impdp command above.

提交回复
热议问题