how to resolve thousand of errors in oracle import using impdp where I don't know the what parameters were used during expdp? - oracle

I am trying to import an oracle 11g dump file using impdp utility but while doing so, inter alia, I am facing two major errors:
First, It is showing the following error:
Processing object type DATABASE_EXPORT/TABLESPACE
ORA-39083: Object type TABLESPACE:"HIS_USER" failed to create with error:
ORA-01119: error in creating database file '/oracle/app/oracle/oradata/dwhrajdr1/his_user13.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
so to solve this, I have created the tablesapce with same name but now it is showing that 'HIS_USER' tablespace already exists.
Second, I am getting thousands of errors, where it is showing user or role does not exist:
Failing sql is:
GRANT EXECUTE ANY ASSEMBLY TO "DSS"
ORA-39083: Object type SYSTEM_GRANT failed to create with error:
ORA-01917: user or role 'DSS' does not exist
Please suggest how to solve these errors!
How can I import the dumpfile without making hundreds of users/roles or tablespaces?

you can generate sql statement using impdp the following way.
http://www.dba-oracle.com/t_convert_expdp_dmp_file_sql.htm
then adjust parameter accordingly.
scott

Related

oracle export failed due to unable to close dump file

The export is failing due to below error
ORA-31693: Table data object "x"."x_t" failed to load/unload and is being skipped due to error:
ORA-31643: unable to close dump file ""
Anyone has knowledge regarding this issue, please help out

ORA-01031: insufficient privileges when I run my script (oracle 19c)

I have newly installed oracle 19C for the first time and wanted to try it out. We have a java project where we have inside some scripts which are used to create users, upgrade users.. etc. When I run this script I get The error ORA-01031: insufficient privileges:
25.01.2021 10:13:00,689| INFO main [SYSTEM] creating user c##vdal ... |com.company.mpe.engine.SimpleScriptExecuter
25.01.2021 10:13:00,737| ERROR main Critical error occurred in [SYSTEM: grant select on all_sequences to c##vdal]:ORA-01031: Nicht ausreichende Berechtigungen
|com.company.mpe.engine.SimpleScriptExecuter
25.01.2021 10:13:00,737| ERROR main Script stopped with errors. |com..mpe.engine.SimpleScriptExecuter
25.01.2021 10:13:00,745| ERROR main Error while executing buildDB, aborting the build |com.company.database.builddb.Build
com.company.mpe.engine.TaskExecutionException: Error occurred for task of type Case (at engine/params/mpe/mpeBuildDB.xml:360):Error in case-when construct: Error occurred for task of type Case (at engine/params/mpe/mpeBuildDB.xml:365):Error in case-when construct: Error occurred for task of type If (at engine/params/mpe/mpeBuildDB.xml:232):Error in if construction: java.sql.SQLSyntaxErrorException: ORA-01031: Nicht ausreichende Berechtigungen
How can I configure the database so that I can successfully run all operations from outside like from my eclipse?
You need to provide the DBA rights to create or modify any user/schema in oracle.
You must be connecting with the database using some user. Let's say userX.
You can give the DBA privilege to useX from some DBA privileged user as follows:
grant dba to userx;
Beware that this will give all the system rights to userX and which is not recommended. This type of task should not be done from application.

import sequence from dump file in oracle

I am trying to import a sequence from a dump file using the command since I am using Windows:
impdp hr DIRECTORY=user_exp DUMPFILE=morder.dmp include=sequence:\"= 'EMPLOYEES'\"
However,it gave me error:
UDI-000257: operation generated Oracle error 257
ORA-00257 archiver error,connect internal only when freed
Need some guidance here please

ORA-39083: Object type REF_CONSTRAINT

I am getting Below error while importing dump:
Error:
ORA-39083: Object type REF_CONSTRAINT:"SMP54PERFQACM"."ORDR_ITEM_ENTITY_CHG_FK2" failed to create with error:
ORA-02298: cannot validate (SMP54PERFQACM.ORDR_ITEM_ENTITY_CHG_FK2) - parent keys not found
Impdp Command:
Impdp SMP54PERFQACM/********#orcl12c DUMPFILE=PTSMP54_18Jun2015.dmp REMAP_SCHEMA=PTSMP51QACM:SMP54PERFQACM logfile=imp_SMP54PERFQACM_03aug2015.log directory=BACKUP
Can any one please help to resolve this issue?
Thanks
Rahul Joshi
next time try this:
exp user/pass XXXXXX consistent=y
or
expdp user/pass XXXXXX flashback_time=systimestamp
take a look to [consistent] and [flashback_time]
good luck.
credits to : https://community.oracle.com/thread/3542336
for me based on the below link the solution was give grant to the user like
grant create view, connect, resource to USER_NAME;
and then redo the impdp
oracle community

java.sql.SQLException: ORA-01157: cannot identify/lock data file

I was getting the below given error, When I run the application:
Caused by: org.hibernate.exception.GenericJDBCException: could not execute native bulk manipulation query
.
.
Caused by: java.sql.SQLException: ORA-01157: cannot identify/lock data file - see DBWR trace file
ORA-01110: data file : '/fld1/fld2/mytemp_tablespace.dbf'
I tried to find out this files and came to know that there is no folders. I have ,
then created the respective folders and a new empty mytemptemp_tablespace.dbf file. But still the same error is getting over there.
Any idea why this error is happening?If it is an SQL exception it could have happened at the right beginning itself.
What I have done is, I have created a new schema and exported the db from the old to this new one.
Also how can I see or get the DBWR trace file.
This could be the result of a restored database and during the restore rman was not able to create the tempfiles because of a missing directory.
Solution is quite simple, once the directories are created, just add one or more tempfiles:
alter tablespace mytemp_tablespace add tempfile '/fld1/fld2/mytemp_tablespace01.dbf';
when the temp tablespace has it's storage, your actions can succeed.

Resources