用匯入匯出誇平臺遷移所有資料( Move a Database Between Platforms)

fei890910發表於2014-04-02

Using Export and Import to Move a Database Between Platforms

The Export and Import utilities are the only method that Oracle supports for moving an existing Oracle database from one hardware platform to another. This includes moving between UNIX and NT systems and also moving between two NT systems running on different platforms.


The following steps present a general overview of how to move a database between platforms.

  1. As a DBA user, issue the following SQL query to get the exact name of all tablespaces. You will need this information later in the process.

    SQL> SELECT tablespace_name FROM dba_tablespaces;
    select name,tablespace_name from dba_data_files;
    注:在匯入之前必須在目標庫建立表空間,最後檢視資料庫檔案資訊,目標庫建立表空間的時候建立一樣的資料檔案,資料檔案路徑可以不一致      
  2. As a DBA user, perform a full export from the source database, for example:

    > exp system/manager FULL=y FILE=expdat.dmp
    
  3. Move the dump file to the target database server. If you use FTP, be sure to copy it in binary format (by entering binary at the FTP prompt) to avoid file corruption.

  4. Create a database on the target server.


    See Also:

    Oracle Database Administrator's Guide for information about how to create a database

  5. Before importing the dump file, you must first create your tablespaces, using the information obtained in Step 1. Otherwise, the import will create the corresponding datafiles in the same file structure as at the source database, which may not be compatible with the file structure on the target system.

  6. As a DBA user, perform a full import with the IGNORE parameter enabled:

    > imp system/manager FULL=y IGNORE=y FILE=expdat.dmp
    
    

    Using IGNORE=y instructs Oracle to ignore any creation errors during the import and permit the import to complete.

  7. Perform a full backup of your new database.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-1134910/,如需轉載,請註明出處,否則將追究法律責任。

相關文章