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

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

Related

Migration from Oracle Database 11g to AWS RDS Oracle 19c Failures

When Migrating from Oracle Database 11g to AWS RDS Oracle Database 19c using the Oracle Datapump tool for export and the RDS Datapump API for Import resulted in some nasty errors.
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39143: dump file "/rdsdbdata/datapump/test.dmp" may be an original export dump file
What I have tried
Changing the ownership of the dmp file
Using the full schema option
Adding the credentials
Migrating from oracle database 11g to Oracle Database 12c using traditional datapump functionality to resolve the compatibility issues resulted in the same issue mentioned above.
I resolve this issue by doing the following:
Granting permission to the schema to access the directory I was interested in storing the exported DMP file on the server.
Exporting the DMP using expdp (Data Pump)

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

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.

How to force SQL developer to use imp/exp command while import/export

While importing or exporting oracle data dump using SQL Developer by default it is using impdp command for import and expdp command for export. But I want to import a dump which is exported using exp command, and for that i need to force SQL developer to use imp command instead of impdp command. And same for export.
Pleas help me if anyone knows how to in-force SQL developer to use imp for import instead of impdp and exp for export instead of expdp
IMP and EXP are client side utilities like SQL Loader and SQLPlus.
The reason you can use SQL Developer with Data Pump, is because Data Pump runs in the database AND it has a PL/SQL API - with which we have built a GUI for in our DBA Panel.
If you need to use IMP and EXP - you need to get an Oracle Client of your machine, and install it.
You don't say which version of Oracle Database you'll be working with - that's important. Make sure the client you install will be compatible with the source database you want to generate an EXP dmp with.
You can't do this because there is no PL/Sql API for imp and exp. Oracle have only provided PL/Sql api for expdp and impdp, So SQL developer can only implement those API.

oracle sql expdp -> database pump while users a writing to the databse

I use Oracle 11GR2 on openSuse and we do a Oracle Data Pump with the command expdp of all the schemas.
My Question is: what happens if a user updates the database trough the application while the expdp command runs on the server.
Am I guaranteed to get a consistent state?
No your are not unless you specify: flashback_time or flashback_scn
here is the link to the documentation:
https://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL850

How do I export a 'database' from Oracle 11g XE and import it to Oracle 10.2?

Up to this point, I've never done anything serious with an Oracle database. I know that they are different than what I've handled, like MS SQL.
So, coming from an MS SQL perspective, I can backup a database, copy over the .bak file to another server, restore it, creating a complete copy of the database.
I'm not sure how to do the same for Oracle, much less different versions. I've seen it done mostly with command lines, so I tried this:
$exp owner/owner schemas=tkcsdb directory=dumpdir dumpfile=dBaseName logfile=dBaseLog
And then the SQL Plus returns:
Unknown Parameter Name 'Schemas'.
Failed to process parameters.
Export terminated unsuccessfully.
I've since replaced the 'schemas' with 'schema' (same error), and I wanted to try using 'tables', though I'm not sure how that would turn out. I'm not even 100% if 'tkcsdb' is the name of the database I'm looking for - I've been unable to list all the databases I have.
What I want to do (which I've done with MS SQL, MySQL, and even IBM DB2 of all things) is looking to be quite difficult to replicate in Oracle.
As with the title, how do I export a 'database' from Oracle 11g XE and import it to Oracle 10.2?
I'm using Windows 7, the target machine is a Linux Fedora of some sort.
EXP and IMP are ancient - do not use them unless you absolutely have to. They cannot handle some of the features of newer Oracle versions.
The tools of choice are EXPDP and IMPDP (short for EXP datapump and IMP datapump).
Unfortunately, using them is a little more complicated, because you can run them only on the database server (contrary to old-style EXP/IMP, which you could run from any client computer).
So, to get your schema from the 11g source DB to the 10g target DB, you'll have to:
open a terminal session on the 11g DB server
run expdp with version set to 10 (so you can import it on the 10g server)
copy the dump file fom the 11g server to the datapump directory of the 10g server (look for a directory called "dpump")
open a terminal session on the 10g DB server
run impdp with your dump file
Example:
expdp scott/tiger#db11g version=10.2 schemas=SCOTT dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
impdp scott/tiger#db10g schemas=SCOTT dumpfile=SCOTT.dmp logfile=impdpSCOTT.log

Resources