Thursday, November 5, 2009

How to backup Oracle database


  • Export full database

  • $exp USERID=scott/tiger FULL=y FILE=myfull.dmp


  • Example of Exporting Schemas

  • $exp USERID=scott/tiger OWNER=(SCOTT,ALI) FILE=exp_own.dmp


    The above command will export all the objects stored in SCOTT and ALI’s schema.

  • Exporting Individual Tables

  • $exp USERID=scott/tiger TABLES=(scott.emp,scott.sales) FILE=exp_tab.dmp


    This will export scott’s emp and sales tables.

  • Using Import Utility

  • IMP SCOTT/TIGER

  • IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)

  • IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N


    USERID must be the first parameter on the command line.

No comments:

Post a Comment