I have created a new oracle DB 18xe on a docker.
I am trying to import a dump file using the following command
impdp **/**#xepdb1 directory=DATA_PUMP_DIR dumpfile=file.dmp
remap_schema='source:dest' logfile=imp.log CONTENT=DATA_ONLY
I am getting the following error
Import: Release 18.0.0.0.0 - Production on Thu Dec 9 05:39:42 2021
Version 18.4.0.0.0
Copyright (c) 1982, 2018, 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
I could not figure out why I am getting this error, I tried to import one table only, used the following command
impdp **/**#xepdb1 directory=DATA_PUMP_DIR dumpfile=file.dmp
remap_schema='source:dest' logfile=imp.log CONTENT=DATA_ONLY tables=table1
I got the following error
Import: Release 18.0.0.0.0 - Production on Thu Dec 9 05:39:42 2021
Version 18.4.0.0.0
Copyright (c) 1982, 2018, 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-39166: Object dest.table1 was not found or could not be exported or imported.
Appreciate your assistance people.
As far as I can tell, remap_schema doesn't / shouldn't have single quotes.
No : remap_schema='source:dest'
Yes: remap_schema=source:dest
See REMAP_SCHEMA in documentation.
Related
I keep on getting this error . I have corrected ora.listner file as mentioned in other answer of similar problem in stack overflow and I was able to login too but problem start again when I open my window 10 again today.error
listner.ora
Result of lsnrctl status
open listner.ora file without editing and saved it and restart i am able to connect now. Every time i have to do this to connect
Most likely the Oracle service hasn't started. Open up powershell and check it with
get-service OracleService*
If it says it's stopped then you can do
get-service OracleService* | start-service
If it has started then your oracle_sid environment variable hasn't been set or your oracle_home isn't correct.
Unfortnately, I cannot see where you showed the actual sqlplus command, just a screen shot that picks up after sqlplus gets control. But I find the near 100% of the time I see this error, it is because sqlplus is started without specifying a connect descriptor. Doing so means you are asking for a local connection, so the listener, nor any other TNS component is not involved at all. Instead, sqlplus tries to make a local (in memory) connection to the running instance that is specified by the environment variable ORACLE_SID:
TNS Connection:
G:\scripts>sqlplus scott/tiger#edstest
SQL*Plus: Release 12.1.0.2.0 Production on Tue Oct 27 15:46:01 2020
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Tue Oct 27 2020 15:45:42 -05:00
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL>
local connection, check ORACLE_SID first
G:\scripts>echo %ORACLE_SID%
edstest
G:\scripts>sqlplus scott/tiger
SQL*Plus: Release 12.1.0.2.0 Production on Tue Oct 27 15:47:32 2020
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Tue Oct 27 2020 15:46:01 -05:00
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL>
Local connection with ORACLE_SID not set, or improperly set:
G:\scripts>set ORACLE_SID=FUBAR
G:\scripts>echo %ORACLE_SID%
FUBAR
G:\scripts>sqlplus scott/tiger
SQL*Plus: Release 12.1.0.2.0 Production on Tue Oct 27 15:48:57 2020
Copyright (c) 1982, 2019, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name: ^C
G:\scripts>set ORACLE_SID=
G:\scripts>echo %ORACLE_SID%
%ORACLE_SID%
G:\scripts>sqlplus scott/tiger
SQL*Plus: Release 12.1.0.2.0 Production on Tue Oct 27 15:49:59 2020
Copyright (c) 1982, 2019, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
And there's your error.
I am trying to connect to Oracle using SQL*Plus from Oracle instant client 12.2 but it keeps failing.
# export LD_LIBRARY_PATH=/root/oracle/instantclient_12_2
# ./sqlplus USERNAME/PASSWORD#remotehost.ancd.com:1881/TEST1.ancd.com
SQL*Plus: Release 12.2.0.1.0 Production on Fri Jan 19 19:04:03 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I am not an Oracle expert but my understanding is I don't need a tnsnames.ora in Oracle client 12 for direct connection.
What I am going wrong?
I have installed instantclient 12c x86 on Windows 8.1
I am able to connect from cmd.exe:
C:\Users\vagrant>sqlplus user#\"hostname:1521/SERVICE_NAME\"
SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 3 06:22:31 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options
SQL>
Now when I try the same from Powershell:
I want to be prompted for password. It does not work.
PS C:\Users\vagrant> sqlplus user#\"hostname:1521/SERVICE_NAME\"
SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 3 06:30:12 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
Here I provide my password and it works
PS C:\Users\vagrant>sqlplus user/password#hostname:1521/SERVICE_NAME
SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 3 06:24:48 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
What is the correct syntax for being prompted for password logging in with sqlplus from Powershell?
I've been provided with a Oracle database dump which I'm attempting to import using the following:
impdp myuser/myuser DUMPFILE=/u01/app/oracle/oradata/dumpfile.dmp FULL=y LOGFILE=/u01/app/oracle/oradata/dumplog.log
The output is
Import: Release 12.1.0.1.0 - Production on Fri May 1 09:46:59 2015
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
UDI-00942: operation generated ORACLE error 942
ORA-00942: table or view does not exist
Is there anyway I can find out what the problem is or get more information? The user myuser has all privileges.
After running though the setup again it turned out this database has not had the catalog.sql and catproc.sql scripts run on it. Rerunning the import once this has been run resolved this error.
I have received some data in Oracle DMP format that I am trying to use imp to import into an Oracle database.
I am running the command:
imp <user>/<pass>#<tns> FILE=SI_DESIGN_SETS_12Mar2015.dmp
I get the result:
Import: Release 11.2.0.1.0 - Production on Fri Mar 20 11:59:37 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
IMP-00058: ORACLE error 1031 encountered
ORA-01031: insufficient privilegesUsername:
Running this command with other dmp files has worked in the past. Any ideas on how to get past this error?
In case anyone is wondering, I managed to get them to regenerate them and bizarrely adding "FEEDBACK=1000" to the import command actually made some of the old ones work!