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

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)

Related

Copy Oracle database from Amazon RDS to a local Oracle developer edition database

I have an Oracle SE database that we run in Amazon's RDS service as our production database. I am looking for techniques and/or tools to duplicate the database to a developer edition database that the development team can run on their local systems.
You can generate dump file and transfer it to your local/standalone unix system where oracle is installed. and then import dump file data.
You do not have direct access to the RDS instance file system.
There are several data migration solutions.
The first solution using S3 Bucket.
Use DBMS_DATAPUMP to export to DUMP File on the RDS Instance.
Copy Dump File from the RDS instance to Amazon S3 Bucket.
Download the dump file from the S3 cloud to the developer edition database.
Import data from the dump file using expdp on the developer edition database.
The second solution using Database Link between the RDS Instance and the developer edition database.
Create a Database Link on the RDS Instance to the developer edition database.
Use DBMS_DATAPUMP to export to DUMP File on the RDS Instance.
Use DBMS_FILE_TRANSFER to Copy the Dump File from the RDS Instance to the developer edition database.
Import data from the dump file using expdp on the developer edition database.
The third solution using Oracle XE, if you cannot make a db link between the developer edition database and RDS instance.
Use DBMS_DATAPUMP to export to DUMP File on the RDS Instance.
Create a free instance of EC2(1 CPU core, 1G RAM, 30GD HDD ) or a
paid instance with a large disk and CPU.
Install a free database version of the Oracle XE version on EC2
instance.
Create a Database Link on the RDS Instance to the Oracle XE.
Use DBMS_FILE_TRANSFER to Copy the Dump File from the RDS Instance to the Oracle XE.
Copy files from the Oracle XE on EC2 instance via the sftp protocol on your PC.
Copy files from your PC to the developer edition database.
Import data from the dump file using expdp on the developer edition
database.
And other solutions without using DATA PUMP:
Export/Import Using Oracle SQL Developer.
Oracle Original Export/Import Original Utilities

invalid argument value and bad dump file specification when I try to impdp in Oracle 11g

I'm trying get the SQL DDL statements from a Data Pump dmp file. However I'm getting this when I run impdp:
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31619: invalid dump file "D:\Oracle\dmp\mydmp.dmp"
I'm trying to run this command:
impdp myuser/password directory=mydir dumpfile=mydmp.dmp sqlfile=myddl.sql logfile=mylog.log;
My user got pretty much all privileges and read, write access to the directory.
I'm doing this to retrieve the tablespaces from this dmp file.
My end goal is to fully restore this database that was done from another machine. I was told that before importing this DB to a new machine that I need to get the tablespaces and re-create the same ones on the new machine. The old machine also had a different user.
Sorry if all this sounds basic. It's my first time playing with Oracle DB.
Any advise or guidance would be greatly appreciated.
Thank You

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

Importing data from 11g to 10g

I had to import a table from schema of one database to a schema of another database.I created a .dmp file of the table using "exp" command transfered the file to the other machine using ftp (using binary transfer) and when I tried to import the file on the other machine using "imp" command I faced the error that the .dmp file is corrupt(IMP-00010).Now if one of my machine is hosting Oracle 11G and the other machine to which data has to be imported is hosting 10G ,Could that be the reason of the error which I recieved.If, yes what else could I do to get my work done?
Commands used
exp flstd05/flstd05#flow30 tables=cust_order_lines file=cust_order_lines_data1.dmp
imp flmad01/flmad01#flow04 file=cust_order_lines_data1.dmp

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