export

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

export

Roshan
Hello Erman,

Source Database : Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 (linux)
Target database: 12c(windows Server 2012 R2)
 
Hello,
 
I want to do an export to oracle database 12C on Windows. My source database is Linux- 10.2. Is the script below ok?
 
expdp \"SYS@lfiche AS SYSDBA\"  version=10.2 dumpfile=PMTBIL01`(date +"%d%m%Y%H%M")`.dmp logfile=PMTBIL01.expdp.`(date +"%d%m%Y%H%M")`.log FULL=Y EXCLUDE=TABLE:"IN('INVOICE')" directory=myxport exclude=statistics

Thanks,
Roshan
Reply | Threaded
Open this post in threaded view
|

Re: export

ErmanArslansOracleBlog
Administrator
No, you don't need to speecify version in that case;

Read this:

In an upgrade situation, when the target release of a Data Pump-based migration is higher than the source, the VERSION parameter typically does not have to be specified because all objects in the source database will be compatible with the higher target release. An exception is when an entire Oracle Database 11g (release 11.2.0.3 or higher) is exported in preparation for importing into Oracle Database 12c Release 1 (12.1.0.1) or later. In this case, explicitly specify VERSION=12 in conjunction with FULL=YES in order to include a complete set of Oracle internal component metadata.
Reply | Threaded
Open this post in threaded view
|

Re: export

ErmanArslansOracleBlog
Administrator
So you don't use the version parameter here.
If you want to exp from 12c and import to 10g, then you have to use version.. But you want to exp from 10g and import to 12c, so in your case version parameter should not be used.
Reply | Threaded
Open this post in threaded view
|

Re: export

Roshan
Thanks for the tips.

Is invoking export as sysdba a good practice?
My target is Windows. The directory structure is different as in linux. Do I need to use  remap_datafile or create all the tablespaces only ? My target oradata(location of dbf) are in E:\oradata\lfiche on Windows.

I have modified my script as below:

production(source - 10g):

expd system/M@lfiche dumpfile=PMTBIL01`(date +"%d%m%Y%H%M")`.dmp logfile=PMTBIL01.expdp.`(date +"%d%m%Y%H%M")`.log FULL=Y EXCLUDE=TABLE:"IN('INVOICE')" directory=myxport exclude=statistics

target(Windows):

impdp system/M@lfiche dumpfile=PMTBIL01`(date +"%d%m%Y%H%M")`.dmp logfile=PMTBIL01.expdp.`(date +"%d%m%Y%H%M")`.log FULL=Y EXCLUDE=TABLE:"IN('INVOICE')" directory=myxport exclude=statistics


Reply | Threaded
Open this post in threaded view
|

Re: export

ErmanArslansOracleBlog
Administrator
using sysdba is also okay.
I don't use remap_datafile, but it can be used as well.
I would create the database on the target(create the tablespaces with same name as the source but in appropriate directories in the target before the export)  and then do the export/import things.