Export Import Full Database - oracle

I have two computers. operating system: windows 7 in both, oracle 11g in both
I have created a database in computer 1. and created dumpfile using export utility
expdp usersname/password directory=dir dumpfile=full.dmp full=y
now i have transaferd the dump file & log file in another computer.
when i am running command
impdp username/password directory=dir dumpfile=full.dmp
I got the following errors:
ORA-39002: invalid operation.
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation.
ORA-06512: at "SYS.UTL_FILE", line 536.
ORA-29283: invalid file operation

Related

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 .....

Getting Oracle errors while importing with impdp

I'm trying to do an import using impdp utility. but I'm Seeting
impdp system/system remap_schema=ieulive:ieusystem directory=pump_dir dumpfile=IEULIVE.DMP logfile=imp.log
ORA-39002: invalid operation
ORA-39070: Unable to open the log file
ORA-29283: invalid file operation
ORA-29283: invalid file operation
thats's what I get when I use nologfile=y option
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "F:\data_pump\IEULIVE.DMP"
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: <os 5> access is denied
I read that its a permission issue. I have imported before onto this DB, now I'm not able to do so.
I tried everything on the internet but didn't get the solution.
Thank you for your help
Updated
when I installed oracle, I used the windows virtual account(which I don't know what it is exactly)
Either the permissions for the folder or for the specific file are not set correctly. Both must be accessible (read/write for the directory, at least read for the file) by the account which is running the Oracle processes, which is most likely the Windows SYSTEM account. Is F: a local disk drive or a network-mounted drive? On Windows network-mounted drives generally cannot be accessed using directory objects...
directory=pump_dir
Your default data pump directory location and the actual directory where you have placed your export dump files could be different.
ORA-31640: unable to open dump file "F:\data_pump\IEULIVE.DMP"
Verify the data pump directory matches with "F:\data_pump\IEULIVE.DMP":
SELECT DIRECTORY_PATH FROM dba_directories WHERE DIRECTORY_NAME = 'PUMP_DIR';
If it matches, then you need to set the appropriate permissions to the directory and files.

How to backup Oracle database from server

I connect to Oracle database server for backup database (.dmp file) to my computer with windows command line
I use syntax
expdp myuser/1234#[server_ip]:[serverport]/listener directory=my_data_pump_dir dumpfile=my_pump_backup.dmp nologfile=Y full=y
But Error message
Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "C:\app\User\admin\orcl\dpdump_DIR\my_pump_backup.dmp"
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.
What should I do?

Errors on importing Oracle backup

I have created a directory:
SQL> create or replace directory dir as '/home/oracle12c/Desktop/latest_exp.dmp';
I am trying to run an import, as sysdba:
impdp \'/as sysdba\' full=Y directory=dir dumpfile=importDump.dmp logfile=import.log;
I am getting these errors:
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
As far as I can see from the result on my search, it as to do with permissions. The Oracle user should own the files.
The permission to the file I am trying to import looks like this:
-rw-r--r-- 1 oracle12c root 2201247744 Feb 21 16:51 latest_exp.dmp
What is my problem here, and how do I overcome it? Is there a problem when the owner of the file is oracle12? Some solutions on the internet say that the files must be owned by the user trying to access the files, who in my case is sysdba. But I cannot change the owner to my file to be sysdba, as that user does not exist on my Ubuntu.
Also, we specify the dumfile and logfile, but we do not specify the location. Where will it create the locations for these? I assumed it would look for them here: /u01/app/oracle/oradata/orcl$ where orcl is my SID
I have not been able to solve my problem with the help of Google and Oracle Doc.
I am running on Ubuntu.
The Oracle directory object should point to an operating system directory, not a file; instead of:
create or replace directory dir as '/home/oracle12c/Desktop/latest_exp.dmp'
it should just be:
create or replace directory dir as '/home/oracle12c/Desktop'
The dump file should sit in that directory, and by default the log and bad files will be created in there too.
At the moment you're asking it to create log file under the directory /home/oracle12c/Desktop/latest_exp.dmp, i.e. /home/oracle12c/Desktop/latest_exp.dmp/import.log - which clearly isn't a valid full path; and also to look for the file importDump.dmp under that not-a-directory.
Your command line looks like it has the wrong name anyway:
impdp ... directory=dir dumpfile=latest_exp.dmp logfile=import.log

Oracle 11g directory objects to remote path

We're in the process of migrating over a system from Oracle 10G (windows 2003 32 bit) to 11G (on windows 2008 R2 64bit), where currently, our backup process consist a directory object that points to a remote (unc) path on our storage box so that we don't have to perform the expdp locally, and then move the file, which seems to work without issue, however on our new windows 2008 box with 11G, I can create the directory object and test it through the EM console, however whenever I try to run my import, I get the following:
Connected to: Oracle Database 11g Release 11.2.0.2.0 - 64bit ProductionWith the Automatic
Storage Management option
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
Any ideas?? Just trying to test with metadata_only right now to troubleshoot this, but still no luck.
E:\>impdp xxxxx/xxxxx#prod CONTENT=METADATA_ONLY directory=Restoreloc dumpfile=XXXXX_
MAY172011.DMP logfile=XXXXXIMPDP.log exclude=grant
Ensure that the oracle process has write access to the directory.
or
You have to manually create directory in specified path then try your operation.
Check this post.

Resources