ORA-39002 occurs during a Data Pump Import (IMPDP) - oracle

I exported a schema on 19c, with the parameter VERSION=18. When trying to import this schema onto a 18c environment, I am getting an error - "ORA-39002: invalid operation".
Oracle say online "Adding the sqlfile parameter allows the import to run with no errors to make a file of the DDL". This works but the SQLFILE that gets exported doesn't include my table data, etc.
Is there any workaround here, or what are my options to allow a successful import?

Related

how to export schema and import it to another schema in PL\SQL Developer

I am using PL\SQL Developer by AllroundAutomations.
My task is to import schema named EN to another schema (it doesn't exist now) called E9.
I managed to make a dump of a scheme using Tools --> Export User Objects, so now I have EN.sql file
So, here are my questions?
How can I make EN.dump file?
To import it to another scheme, I need firstly to create new (E9) scheme from sysdba user?
And is there any opportunity to import scheme from PL\SQL Developer interface? For some reason I can't connect to sqlplus which makes things worse.
Thank you in advance.
update: i just reinstalled my instant client from ver 11_2 to 12_2 with the tools and sql*plus
PL/SQL Developer has tools Export Tables and Import Tables witch can import/export dmp files using EXP and IMP utilites. See PL/SQL Developer's help :
Export Tables:
The Export Tables tool allows you to export one or more table definitions and their data into a file, so that you can import the tables later. After starting the Export Tables tool, you can select the user and the
tables you wish to export, choose an export method (Oracle Export, SQL Inserts, or PL/SQL Developer), and set various options that apply to the export method...
Import Tables:
The Import Tables tool allows you to import table definitions and data from a file that was previously exported with the Export Tables tool described in the previous chapter. Just like with the Export Table
tool, there are 3 methods to import tables, each with its own file format...
P.S. As you see schema where you want import to must already exists.
But in such a way you can export/import only tables.
So if you want export whole schema use utility througth command line, see example:
Command to export a schema:
exp userid=dba/dbapassword OWNER=username DIRECT=Y FILE=filename.dmp
This will create the export dump file.
To import the dump file into a different user schema, first create the new user in SQLPLUS:
SQL> create user newuser identified by 'password' quota unlimited users;
Then import the data:
imp userid=dba/dbapassword FILE=filename.dmp FROMUSER=username TOUSER=newusername

Importing data into an Oracle table from a CSV file using SQL developer is terminating Connection

I'm having a weird issue with my SQL developer. I'm importing data into one of the existing table(with no data in it) in oracle database(DEV Environment) from a CSV file using import option in Oracle SQL developer. My connection gets terminated automatically as soon as I start the import with the error shown in the screenshot. After clicking "yes" task gets cancelled and import is rolled back. Finally, it is automatically resetting my database connection. To know the issue, I converted it to .txt file and also with using previous files which I was able to import successfully before and tried to import it again but having same issue.
Appreciate insights on this issue!

how to import a .dmp file in oracle sql developer

How can i import a .dmp file in to sql developer. i had already created schema and i just need to insert data with these dump files. I tried imp and impdb commmands in sql command line but of no use.
You don't use SQL Developer to process data pump or legacy EXPORT dumps.
You CAN use SQL Developer to create a Data Pump job which will process your data pump export - this assumes the file is avail on a DB directory.
For a better answer, tell us exactly what kind of 'dmp' file you have.
If it's a Oracle Export dmp, the only way to import it is with the Import utility.

impdp in Oracle. Why it does not create users?

I am newbie in oracle and I am facing troubles with impdp. I have a production server and I have created a new server for testing purposes, so I installed centos, oracle and created the database "sire". Now I make a dump from the production server with the following command:
expdp system/password#sire full=Y
directory=pump_dir dumpfile=sire_dump.dmp logfile=sire.log
The I come to the new server, and I execute impdp:
impdp system/password#sire full=Y
directory=pump_directorio dumpfile=sire_dump.dmp logfile=sire_imp.log
It starts to do the import but then I receive errors such as:
"the user vberrios does not exist". And also error beause it cannot
found some schemas and tablespaces.
My question is: It is not supposed that impdp full=Y must import all users and schemas? I have read that I have to create the users in the destination server but I have about 300 users in the database. How can I do a full import in a empty server. I just want to import the full database and user and all objects.
The documentation states, that impdp will create uses, when the dump file contains the create user statements:
If the schema you are remapping to does not already exist, the import
operation creates it, provided the dump file set contains the
necessary CREATE USER metadata and you are importing with enough
privileges.
So either your dump file is incomplete (for example due to missing privileges) or you are lacking privileges on the target database.
So please check your privileges on both, the source database and the target database. Please update your question with then according information. For the export to include the schema definitions, you must have the DATAPUMP_EXP_FULL_DATABASE privilege.

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