Import dmp file to Oracle - oracle

my customer has provided a dmp file (10 GO), and i tried the following:
Create a user:
create user USERNAME identified by PASSWORD;
Grant read write access
Import the dump file(using imp and impdp)
impdp or imp system/password#db dumpfile=EXPDAT.DMP FULL=Y logfile=dice.log
and here's the error message:
Import: Release 18.0.0.0.0 - Production on Tue Feb 23 11:46:07 2021
Version 18.4.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39059: dump file set is incomplete
ORA-39246: cannot locate master table within provided dump files
Can anyone help on that?

First, imp and impdp are not interchangeable; they have different file formats and options. You need to know exactly which was used to create the file you have.
Second, assuming the file was created with expdp (aka datapump, the more modern choice) and you should be using impdp to load it, the error indicates that there's a problem with the datafile itself.
ORA-39246 cannot locate master table within provided dump files
Cause: Check the export log file and make sure all of the files that
were exported are included in the current job.
Action: A Data Pump IMPORT or SQL_FILE operation was being performed
but not all of the files from the Data Pump export dump file set were
included. In particular, the dump file containing the export job's
master table was not provided.
It seems likely that your customer has not provided you with the complete data dump and you should have received additional files. This is possible if either the "parallel" or "filesize" option was used during the export. Confirm with them the number and size of the files you should have.

Related

Oracle : impdp ORA-39001: invalid argument value

I want to import a dmp file I have it in this path:
C:\Users\ASUS\Desktop\pr\projects\db\test.dmp
I created a directory like this :
SQL> create directory testdir as 'C:\Users\ASUS\Desktop\pr\projects\db';
Directory created.
SQL> grant read, write on directory testdir to c##stage;
Grant succeeded.
When I run the following command
impdp c##stage/stage SCHEMAS=stage DIRECTORY=testdir DUMPFILE=test.DMP EXCLUDE=CONSTRAINT,REF_CONSTRAINT,INDEX TABLE_EXISTS_ACTION=REPLACE nologfile=y
I got this errors
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "C:\Users\ASUS\Desktop\pr\projects\db\test.DMP" for read
ORA-27041: unable to open file
OSD-04002: ouverture impossible du fichier
O/S-Error: (OS 5) Acc┐refus┐
notes:
I don't know if the exporter used exp or expdp to export file.
What is the c##?
Try narrowing it down by setting
CONTENT=DATA_ONLY
If you are doing content=data_only, then all of the metadata is excluded by default so you don't need any of these:
EXCLUDE=REF_CONSTRAINT
EXCLUDE=CONSTRAINT

Import Oracle DUMP file in oracle instance 19c

I have an oracle .dmp file and I do not know any other information about that, I want to import this dump file to my oracle 19c database.
When I use the imdb command like this:
impdp DIRECTORY=E:\Oracle19c\db_home\admin\sample\bdump DUMPFILE=tf20200325.dmp
I get these errors:
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name E:\ORACLE19C\DB_HOME\ADMIN\SAMPLE\BDUMP is invalid
When I use the imp command like this:
imp file=E:\Oracle19c\db_home\admin\sample\bdump\tf20200325.dmp full=y;
I get these errors:
IMP-00038: Could not convert to environment character set's handle
IMP-00000: Import terminated unsuccessfully
I tried after searching on the web, but not found any solution to help me.
notable: I am not creating any databases, I only create a user with all privileges.
The directory you specify is the name of a database directory object, not the actual directory. So, connect to your db as SYS, and do
create directory xyz as 'E:\Oracle19c\db_home\admin\sample\bdump\';
grant all on directory xyz to (put your user name);
and then you can use it like this:
impdp directory=xyz .....

is it possible to recover the Oracle Data Pump master table?

I'm trying to import a few files with a published Oracle Data Pump perl script: dumpinfo.pl
After successfully importing several dump files from the same export process, another file failed with:
# impdp system/****** DIRECTORY=RESTORE_DIR DUMPFILE=exp_%u.dmp PARALLEL=8
Import: Release 11.2.0.2.0 - Production on Mon Jul 7 11:40:37 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39059: dump file set is incomplete
ORA-39246: cannot locate master table within provided dump files
The script reports that it can't find a master table. Assuming that the master table is lost, there any mechanics for recover it?
Thanks...
ORA-39246 cannot locate master table within provided dump files
Cause: Check the export log file and make sure all of the files that
were exported are included in the current job. Action: A Data Pump
IMPORT or SQL_FILE operation was being performed but not all of the
files from the Data Pump export dump file set were included. In
particular, the dump file containing the export job's master table was
not provided.
Check that you have all dump files in that directory and they all are accessible to impdp utility. I got this error when our backup team has restored first five dmp files, and two last ones were missing.

Errors on importing my oracle 10g database

I am running my oracle on a debian machine. Today I decided to create a new user and a new tablespace. Then I export a database with the user System which on the same machine. I got some error when I try to import to my new user account.
here is what I've done:
./imp mynewuser/passwrdb#orcl file=newdump_sept.dmp system/tomynewuser
Import: Release 10.2.0.1.0 - Production on Thu Sep 29 18:06:23 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release
10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
Warning: the objects were exported by SYSTEM, not by you
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
IMP-00085: multiple input files specified for unbounded export file
IMP-00000: Import terminated unsuccessfully
Any suggestion to my problem?
From http://www.error-code.org.uk/view.asp?e=ORACLE-IMP-00085 :
Oracle Error :: IMP-00085
multiple input files specified for unbounded export file Cause
You specified multiple file names for the FILE parameter when doing an
import, but the header in the export file indicates that that the
export operation could create only one file. Specifying multiple file
names is valid for an import operation only if the export files were
created by an export operation in which the user specified a non-zero
value for the FILESIZE parameter. Action
If you believe the export contains multiple files, verify that you
have specified the correct files. If you believe the export should be
in only one file then try the import operation again, but specify only
one value for the FILE parameter.
You should probably use:
./imp mynewuser/passwrdb#orcl file=newdump_sept.dmp fromuser=system touser=tomynewuser
For help: imp help=y
In my case I solved the error by importing the dump file by using SYS user instead of SYSTEM user and import working without errors.

Error importing oracle dump

I am trying to import a dump into two schema in the same oracle DB.Following a workaround to do this.
I am trying to run the imp command with the INDEXFILE option to be able to modify the tablespace names in the sql. This is what I get :
E:\oracle_10_2\BIN>imp atlantis/atlantis#orcl file=ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp indexfile=index.sql full=y log=imp.log
Import: Release 10.2.0.1.0 - Production on Thu Mar 12 15:31:44 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
IMP-00002: failed to open ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp for read
Import file: EXPDAT.DMP >
Looked like a file permission issue to me so I tried changing it.
E:\oracle_10_2\BIN>cacls E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp /p atlantis:F
Are you sure (Y/N)?y
processed file: E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp
E:\oracle_10_2\BIN>cacls E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp
E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp CORP\atlantis:F
But the problem persists.
If you are using Oracle 10g consider using new export/import tool Oracle Data Pump in which you can use REMAP_TABLESPACE parameter.
Anyway, you missed the path of the exportfile (bassed on the commands fo give permissions). Then You wrote:
file=ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp
instead of
file=E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp
Then, the result export command to work is:
imp atlantis/atlantis#orcl file=E:\ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp indexfile=index.sql full=y log=imp.log
Open window command line as administrator
imp user/pass#databasename(listenername) file='DMP path'
log=indexfile.log full=y;
Don't forget to add your database or listener name.

Resources