3

I want to continue working on oracle db from home and I need certain tables I created. How do I back them up then restore them?

3
  • We're going to need more information. Do you want to transfer the tables electronically? What are your home and not-home environments like? Does the home copy need to be synced back in with the not-home copy?
    – Pops
    Commented Feb 17, 2011 at 22:20
  • I'd suggest asking on serverfault.com Commented Feb 17, 2011 at 23:26
  • You probably just need to use the export tool from the command line. But you need to read the manual on this as it's not 100% export and then import at home. Commented Feb 18, 2011 at 4:26

5 Answers 5

1

Completely agree with Sathya. One thing to note -- rather than reading the manual, you can issue "help=Y" to the imp/exp command. To wit:

exp help=y
imp help=y

This will show you the most common parameters you can use, and also show you the default values for each parameter.

2

Quick & easy way - use Oracle's exp & imp tools

To export them:

exp scott/tiger file=emp.dmp tables=(emp,dept)

Transfer the dmp file to your destination & then to import them:

imp scott/tiger file=emp.dmp fromuser=scott touser=scott tables=(emp,dept)
0

I remember a tool called ODUMP when I was using Oracle 8i on NetWare. The following web page explains how to import and export data: http://www.orafaq.com/wiki/Import_Export_FAQ

These import and export tools can be used to transfer an entire database or specific tables, but I believe there is a limitation in that the data has to be imported back to the same tablespace (which won't be a problem if you're using Oracle 10g or newer which have support for tablespace renaming).

I'm not seeing any helpful information for the ODUMP command in Google Search results, so I may not be remembering the name of the tool correctly (I haven't used Oracle for quite a few years now since switching to PostgreSQL, but I still regard it as an excellent SQL server).

1
  • there is a limitation in that the data has to be imported back to the same tablespace there's no such limitation - atleast not on "regular" tables. It will cause a problem on Partitioned Tables.
    – Sathyajith Bhat
    Commented Feb 18, 2011 at 7:10
0

For exporting a table:-

expdp mydbusername/mydbpassword@mydbinstancename tables=mytablename directory=MY_DIR dumpfile=mytablename.dmp

For importing a table:-

impdp mydbusername/mydbpassword@mydbinstancename tables=mytablename directory=MY_DIR dumpfile=mytablename.dmp

For directory parameter you can use default directory DATA_PUMP_DIR or you can use your own directory MY_DIR.

Oracle version used for above commands:-

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit

0

To backup a table in oracle you can use EXP command ex :

exp tables=EMPLOYEES,DEPARTMENTS file=EMP_DEPT_BKP14082021.dmp

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .