ORACLE DB exp with FULL=y option cannot export all user tables but expdp can - oracle

I am trying to use the exp tool to backup the whole DB.
The command is "exp userid=system/manager#test inctype=complete buffer=65535 file=/home/oracle/backup/exp_full.dmp log=/home/oracle/backup/exp_full.log full=y".
But from the exp log, it can only export some user tables, not all, even though those tables cannot exported indeed have content. Only these users can be exported from the log as below:
. about to export SYSTEM's tables via Conventional Path ...
. about to export OUTLN's tables via Conventional Path ...
. about to export ORDDATA's tables via Conventional Path ...
. about to export OLAPSYS's tables via Conventional Path ...
etc.
But when I try to use expdp with command expdp system/manager dumpfile=expdp_full.dmp logfile=expdp_full.log full=y, it can export all user tables successfully.
The ORACLE DB version is 11.2.0.1.0.
Appreciate for your help.

you need to specify which schema you want to export , by expdp user/password schema=abc dumpfile=abc.dmp logfile=abc.log directory=abcdirectory

Oracle Database Online Documentation Library, 11g Release 2 (11.2)
Original Export is desupported for general use as of Oracle Database
11g. The only supported use of original Export in Oracle Database 11g
is backward migration of XMLType data to Oracle Database 10g release 2
(10.2) or earlier. Therefore, Oracle recommends that you use the new
Data Pump Export and Import utilities, except in the following
situations which require original Export and Import: You want to
import files that were created using the original Export utility
(exp).
You want to export files that will be imported using the original
Import utility (imp). An example of this would be if you wanted to
export data from Oracle Database 10g and then import it into an
earlier database release.

Related

Export & Import in SQL DEVELOPER without datapump

I want to export below things from SQL developer
1-Only schema (tables structure)
2-Only data in excel form
3-Schema with data
after exporting this i want to import the same to the another database
So what steps should i follow for export and import?
I can not use DATA PUMP as i don't have DBA privilege
As you use Oracle 11g, I'd suggest you to forget about SQL Developer and use the original EXP and IMP utilities. Doing so, you'd avoid DBA-related-problems as these utilities don't require access to the directory (an Oracle object which points to (usually database server's) filesystem directory, and - in order to be able to use it - you'd need to have read/write privileges on it).
So - if you don't already have these, install Oracle Client which contains EXP/IMP and use them.

How to export/import full OracleDB data dump?

I am new to Oracledb. please help me to export whole data Dump and import same to another db to create another copy of database.
You need an administrative account (for example SYSTEM). Assuming you have this, the steps are:
create a directory object inside the database to map to a physical directory on both source and target
export the source database
import into the target database
For example
SQL> create directory X as '/u01/big_directory';
expdp system/mypassword#source full=Y directory=X dumpfile=full.dmp logfile=fullexp.log
impdp system/mypassword#target full=Y directory=X dumpfile=full.dmp logfile=fullimp.log
Also, check the "Database Utilities" guide in the standard Oracle documentation set for your release at docs.oracle.com

Oracle 12C: ORA-00406: COMPATIBLE parameter needs to be 12.2.0.0.0

We have a 2 current Oracle 10G(10.2.0.1) production databases, and we are planning to migrate to a new database server with Oracle 12C. Since data is for each database is only around 5GB, the best way to create a new instance and use data pump to transfer data. To achieve this, I created a database link from the Oracle 12C database to the 10G, and use that to expdp the data from the 12C database. However when I import the exported data I have around tables that have an error like this:
ORA-39083: Object type TABLE:"USER"."WH_SEARCH_ACT" failed to create with error:
ORA-00406: COMPATIBLE parameter needs to be 12.2.0.0.0 or greater
ORA-00722: Feature "Partition Read Only"
Is there any solution to this other than adding the COMPATIBLE parameter in the production database? This is production so I can't really just update/modify the current production database. Any other solutions here, because i don't like just create the tables before importing the data pump file.
Use the version parameter in the data pump utility. For example:
expdp hr/hr TABLES=hr.employees VERSION=10.2
DIRECTORY=data_pump_dir DUMPFILE=emp10g.dmp LOGFILE=emp.log
Just make sure the version of the export utility is 10g and import utility is 12G. Hope this helps.
In the production database . you can use exp program
exp username/password buffer=64000 file=/path/to/path.dmp full=y
copy exp dump file to oracle 12c and use
imp username/password buffer=64000 file=/path/to/path.dmp full=y

How to create a dump?

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.
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
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
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:
Interactive dialogue
Controlled through bypassed parameters
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:
Original Export and Import
The ORACLE Import/Export Utilities

Import of data in Oracle using impdp fails because of missing dependencies

I need to export a subset of an Oracle table and import it in another Oracle instance. The export using expdp works pretty well but when I try to import the data in the other instance using impdp tool it fails because there are dependencies (foreign keys) missing. Is there any option to force expdp tool to export all required dependencies as well?
no.
You should makie sure your dump set is complete.
What you could try is to use impdp to generate the sql file, apply the generated sql to the other database to only create the table[s]. For this you might need to do some edit work on the generated sql until it fits your task.
Next use impdp with contents=data_only to import the rows in the pre-create table[s]

Resources