Question

I'm one of the junior DBA working in IT company.In my company there are so many schemas is there.Now my question is How to create a dump file(some times i'm working at home.That time how to use that dump file ).Please suggest me

NOTE:I am using Oracle SQL Developer.

Was it helpful?

Solution 2

You should use the Oracle Data Pump tool. The tool allows you to export your data into a .dmp file and import it into any database. Here is a video showing how to use the data pump tool in SQLDeveloper. I think this is a relatively new feature in SQLDeveloper, so make sure you have the appropriate versions..

Video Tutorial HERE

From the command line, you can use data pump with the expdp and impdp commands like so..

Set your oracle environment by running the below command and providing your oracle SID

. oraenv

Then you can run your export command..

expdp directory=/bu1/dpdump/ dumpfile=myexport.dmp logfile=mylog.log schemas=users,products,sales

The parameters are as follows..

directory - the directory where to create the dumpfile and log

dumpfile - name of the dump file (should end in .dmp)

logfile - name of the log file (should end in .log)

schemas - comma seperated list of the schemas you want to export

NOTE: you need dba privileges to use datapump. It will prompt you for the credentials

Data Pump Documentation is here

OTHER TIPS

Expdp helps in exporting the database and impdp helps in importing the database. you can directly export one schema to another (in different database also) by using network link concept. If network link concept is used then the creation of separate expdp file is not required.

For example If you have to export a schema called schema1 with password pwd1 from source database to target database then first you need admin privileges of your target and source schema. You can create a network link between source and target schema

CREATE PUBLIC DATABASE LINK example_link
CONNECT TO schema1 IDENTIFIED BY pwd1
USING 'server_name:port/service_name';--(put source database server_name,port and service name)

then create a directory in your target server :-

CREATE OR REPLACE DIRECTORY exp_dir AS 'F:/location';

grant read,write on directory exp_dir to schema1;

After this login to your target server and from command line use the below command:

impdp dba_username/dba_pwd  network_link=example_link directory=exp_dir remap_tablespace=source_tbs:target_tbs remap_schema=schema1:schema1 parallel=2 

Exporting of ORACLE database objects is controlled by parameters. To get familiar with EXPORT parameters type:

exp help=y

You will get a short description and the default settings will be shown. The EXPORT utility may be used in three ways:

  1. Interactive dialogue
  2. Controlled through bypassed parameters
  3. Parameterfile controlled

Example to the 2nd option:

exp scott/tiger file=empdept.expdat tables=(EMP,DEPT) log=empdept.log

Take a look at these links for further readings:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top