Expdp with special character # password resulting in error - oracle

I have set of new boxes where I need to take a copy of export ,
All of this machines have system user password with complex stuff like# etc..
Ex:
expdp system/yada#yada1233*something #hostname:portnumber/servicename
schemas=soso directory=xyz dumpfile=mydump.dmp logfile=mylog.log
ERROR:
UDE-12154:opertion generated oracle error 12154
ORA-12154:TNS:could not resolve the connect identifier specified
Yeah I know this looks like service name resolution issue but tnsping looks good and is able to resolve I believe this has to do with password having #I have tried putting the password in double quotes adding escape character to special characters etc but none work any guidance would be great
Also I tried with user that don't have special characters it works fine
edit : As Suggested here are things I tried and didn't work and still threw the same error
expdp system/'yada#yada1233*something' #hostname:portnumber/servicename
schemas=soso directory=xyz dumpfile=mydump.dmp logfile=mylog.log
expdpsystem/"yada#yada1233*something*"#hostname:portnumber/servicename schemas=soso directory=xyz dumpfile=mydump.dmp logfile=mylog.log
expdp system/\"yada#yada1233*something\" #hostname:portnumber/servicename
schemas=soso directory=xyz dumpfile=mydump.dmp logfile=mylog.log
expdp system/"yada\#yada1233\*something" #hostname:portnumber/servicename
schemas=soso directory=xyz dumpfile=mydump.dmp logfile=mylog.log

SQL> create user "Scott" identified by "T#ger!"
2 ;
User created.
SQL> grant connect, resource to "Scott";
Grant succeeded.
SQL> grant read,write on directory DATA_PUMP_DIR to "Scott";
Grant succeeded.
Example 1
more exp_dp_stroy.sh
#!/bin/bash
export ORACLE_SID=orastb3
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
I=`date +"%d-%m-%y"`
NAMEDUMPFILE=autotest.dmp.$I
PARFILE=/u02/script/parfile_expdp_stroy_autotest
LOG=/u02/script/parfile_expdp_log.log
$ORACLE_HOME/bin/expdp parfile=$PARFILE DUMPFILE = $NAMEDUMPFILE 2>$LOG
more /u02/script/parfile_expdp_stroy_autotest
USERID = \"Scott\"/\"T#ger!\"
# username/password
#SCHEMAS = "Scott"
DIRECTORY = DATA_PUMP_DIR
CONTENT=ALL
FLASHBACK_TIME=SYSTIMESTAMP
Export: Release 11.2.0.4.0 - Production on Fri Oct 1 17:03:32 2021
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "Scott"."SYS_EXPORT_SCHEMA_01": "Scott"/******** parfile=/u02/script/parfile_expdp_stroy_autotest dumpfile=autotest.dmp.01-10-21.
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Master table "Scott"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for Scott.SYS_EXPORT_SCHEMA_01 is:
/u01/app/oracle/admin/orastb3/dpdump/autotest.dmp.01-10-21
Job "Scott"."SYS_EXPORT_SCHEMA_01" successfully completed at Fri Oct 1 17:05:05 2021 elapsed 0 00:01:31
Example 2
more /u02/script/parfile_expdp_stroy_autotest
USERID = \"Scott\"/\"T#ger!\"#orastb3
# username/password
#SCHEMAS = "Scott"
DIRECTORY = DATA_PUMP_DIR
CONTENT=ALL
FLASHBACK_TIME=SYSTIMESTAMP
Export: Release 11.2.0.4.0 - Production on Fri Oct 1 17:26:21 2021
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "Scott"."SYS_EXPORT_SCHEMA_01": "Scott"/********#orastb3 parfile=/u02/script/parfile_expdp_stroy_autotest dumpfile=autotest.dmp.01-10-21.
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Master table "Scott"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for Scott.SYS_EXPORT_SCHEMA_01 is:
/u01/app/oracle/admin/orastb3/dpdump/autotest.dmp.01-10-21
Job "Scott"."SYS_EXPORT_SCHEMA_01" successfully completed at Fri Oct 1 17:26:47 2021 elapsed 0 00:00:25

Related

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.

Install EMC12c Configuration Assistant Repository has Failed

My installation stop at 52% and it said Configuration Assistant "Repository Configuration" has Failed
This is my log
INFO: oracle.sysman.top.oms:The command run for transx is E:\app\TrongNhan\mw\oms\sysman\admin\emdrep\bin\RepManager.bat -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=example.trongnhan185.com)(PORT=1521)))(CONNECT_DATA=(SID=db12c))) -action transx -repos_user SYSMAN -dbUser SYS -mwHome E:\app\TrongNhan\mw -mwOraHome E:\app\TrongNhan\mw\oms
INFO: oracle.sysman.top.oms:processing arguments
INFO: oracle.sysman.top.oms:compiling arguments for validation
INFO: oracle.sysman.top.oms:Enter SYSMAN user password :
INFO: oracle.sysman.top.oms:Verify:
INFO: oracle.sysman.top.oms: Enter password for: SYSMAN
INFO: oracle.sysman.top.oms: process_id:5twvpe4i89xj
INFO: oracle.sysman.top.oms:[Initializing the EM RCU Runner, Running the Schema Action, Schema Action Completed Successfully]
INFO: oracle.sysman.top.oms:************
INFO: oracle.sysman.top.oms:The transx command execution is completed with the status 0
INFO: oracle.sysman.top.oms:process_id:
INFO: oracle.sysman.top.oms:The Process ID: [] does not exist. Either it has been completed, or this is not the executing JVM
INFO: oracle.sysman.top.oms:The plug-in Repository Configuration has failed its perform method
What step i should do now , i have searched google but still cannot find solution
I guess there is a problem with your repository database. Maybe you try to install em12c in a released of oracle DB which is not certified with that. you could try with the other EM like EM 13 or use the following DB releases like ..
*Oracle 11.2.0.3.0
*Oracle 11.2.0.2.0
*Oracle 11.2.0.1.0
*Oracle 11.1.0.7.0
*Oracle 10.2.0.5.0 etc.
Or there could have other OS release issue. you better check the prerequisites from link below....
https://docs.oracle.com/cd/E24628_01/install.121/e22624/install_em_exist_db.htm#EMBSC162

AWS RDS Oracle Datapump error ORA-39001: invalid argument value

I want to import my dump file from my local to AWS. I've uploaded my pdv.dpdm file into my S3 bucket
expdp sys/pass schemas=PDV dumpfile=pdv.dpdm NOLOGFILE=YES directory=TEST_DIR
I was success downloading that file into oracle DATA_PUMP_DIR with rdsadmin.rdsadmin_s3_tasks.download_from_s3 command, When I list the files inside that directory, I got this. So I think the problem is not the failure when moving the data.
select * from table
(rdsadmin.rds_file_util.listdir(p_directory => 'DATA_PUMP_DIR'));
datapump/ directory 4096 2020-03-04 06:49:40
pdv2.log file 28411 2020-03-04 06:49:40
29012020.DMP file 825552896 2020-03-03 09:36:59
pdv2.dpdm file 685617152 2020-03-04 06:49:40
pdv.dpdm file 685613056 2020-03-04 06:49:27
When I starting to import that file with DBMS_DATAPUMP.ADD_FILE I got an error on that line.
DECLARE
hdnl NUMBER;
BEGIN
hdnl := DBMS_DATAPUMP.OPEN( operation => 'IMPORT', job_mode => 'SCHEMA', job_name=> NULL, version => 12);
DBMS_DATAPUMP.ADD_FILE(
handle => hdnl,
filename => 'pdv.dpdm',
directory => 'DATA_PUMP_DIR',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE
);
DBMS_DATAPUMP.START_JOB(hdnl);
END;
Error :
SQL Error [39001] [99999]: ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4087
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4338
ORA-06512: at line 6
It seems I'm missing something, maybe configure in AWS or what. I've done searching for a couple of answers but it doesn't fix my problem. Could you help me with this? I don't know anymore what should I do. Thanks
You are mistaken with the import version.
hdnl := DBMS_DATAPUMP.OPEN( operation => 'IMPORT', job_mode => 'SCHEMA', job_name=> NULL, version => 12);
version=>'12.0.0'
Oracle Documentation
COMPATIBLE - (default) the version of the metadata corresponds to the
database compatibility level and the compatibility release level for
feature (as given in the V$COMPATIBILITY view). Database compatibility
must be set to 9.2 or higher.
LATEST - the version of the metadata corresponds to the database
version.
A specific database version, for example, '11.0.0'.
Specify a value of 12 to allow all existing database features,
components, and options to be exported from Oracle Database 11g
release 2 (11.2.0.3) or later into an Oracle Database 12 c Release 1
(12.1) (either a multitenant container database (CDB) or a non-CDB).
You must export as a non-SYS user!
grant read, write on directory TEST_DIR to PDV;
expdp PDV/password schemas=PDV dumpfile=pdv.dpdm NOLOGFILE=YES directory=TEST_DIR
Oracle Documentation
Note:Do not start Export as SYSDBA, except at the request of Oracle
technical support. SYSDBA is used internally and has specialized
functions; its behavior is not the same as for general users.

Datapump Import Fails With ORA-39006, ORA-39213: “Metadata processing is not available”

I am trying to import multiple dmp files using impdp command i got this error DataPump import (impdp) reports the errors:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39006: internal error
ORA-39213: Metadata processing is not available
Attempting to correct the error ORA-39213 via
dbms_metadata_util.load_stylesheets also reports errors similar to:
SQL> exec dbms_metadata_util.load_stylesheets;
BEGIN dbms_metadata_util.load_stylesheets; END;
* ERROR at line 1: ORA-22288: file or LOB operation FILEEXISTs failed
Permission denied
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 1807
ORA-06512: at line 1
login from sys and run below query worked for me oracle 11.2
exec dbms_metadata_util.load_stylesheets;

Tablespaces not created on oracle dump file import operation

I am trying to import a dump into Oracle 11g. I have run this command :
impdp david/coucou#Louis-PC directory=geismar file=EXPDP_TOP.dmp log=EXPDP_TOP.log full=y;
The import process is successfully launched but I get a lot of errors. Here's a subset of my logfile :
Import: Release 11.2.0.2.0 - Production on Dim. Juin 25 12:02:28 2017
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
;;; Legacy Mode Active due to the following parameters:
;;; Legacy Mode Parameter: "file=EXPDP_TOP.dmp" Location: Command Line, Replaced with: "dumpfile=EXPDP_TOP.dmp"
;;; Legacy Mode Parameter: "log=EXPDP_TOP.log" Location: Command Line, Replaced with: "logfile=EXPDP_TOP.log"
Master table "DAVID"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "DAVID"."SYS_IMPORT_FULL_01": david/********#Louis-PC directory=geismar dumpfile=EXPDP_TOP.dmp logfile=EXPDP_TOP.log full=y;
Processing object type SCHEMA_EXPORT/USER
ORA-39083: Object type USER failed to create with error:
ORA-00959: tablespace 'TOPADDIN' does not exist
Failing sql is:
CREATE USER "TOPADDIN" IDENTIFIED BY VALUES 'S:A86A3644C5EA64C9320A5C66457EE39C51888BBD1110001C5776E9D7A554;C4D29EC4F0EAB8DE' DEFAULT TABLESPACE "TOPADDIN" TEMPORARY TABLESPACE "TEMP"
ORA-39083: Object type USER failed to create with error:
ORA-00959: tablespace 'TOPDBA' does not exist
Failing sql is:
CREATE USER "TOPDBA" IDENTIFIED BY VALUES 'S:29F9686B7D8B5861F84CA3D5720C6C8A8CFC8C7D01374D49D77DE152C234;F3A449A6B2BF4CD0' DEFAULT TABLESPACE "TOPDBA" TEMPORARY TABLESPACE "TEMP"
ORA-39083: Object type USER failed to create with error:
ORA-00959: tablespace 'TOPERP' does not exist
Failing sql is:
CREATE USER "TOPERP" IDENTIFIED BY VALUES 'S:3EC63E08F86B4922FE5328678F5E5DDD7A23D6092D539C31492FC97F2FFB;B3B7BBDA73271B0C' DEFAULT TABLESPACE "TOPERP" TEMPORARY TABLESPACE "TEMP"
ORA-39083: Object type USER failed to create with error:
ORA-00959: tablespace 'TOPMAN_USERS' does not exist
It seems that the import does not include the tablespaces' definition and does not create tablespaces.
Shouldnt the option full=y also import tablespace definitions ?
What am I doing wrong ?
First you can do
impdp david/coucou#Louis-PC directory=geismar dumpfile=EXPDP_TOP.dmp SQLFILE=check.sql
to see exactly what DDL the import is going to run, by viewing check.sql.
Then test some parameters, for example:
INCLUDE=TABLESPACE:"IN ('TOPADDIN','TOPDBA')"
INCLUDE=SCHEMA:"IN ('TOPADDIN','TOPDBA')"
And possibly some remaps:
remap_schema=
remap_tablespace=

Resources