Tablespaces not created on oracle dump file import operation - oracle

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=

Related

Expdp with special character # password resulting in error

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

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.

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

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

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;

Error while importing an Oracle 9 dump in Oracle 11g

I need to import an Oracle9i Release 9.2.0.6.0 dump in an Oracle 11g.
Using the import command I have a ton of erros like this:
IMP-00017: following statement failed with ORACLE error 6550:
"BEGIN SYS.DBMS_EXPORT_EXTENSION.SET_IMP_SKIP_INDEXES_OFF; END;"
IMP-00003: ORACLE error 6550 encountered
Th command I use is:
imp system/<passwor>#<SID> file=export_20160209.dmp fromuser=USER1 touser=USER1 log=file_log_10022016.log
How else can I make the import I need?
You need to grant permission to user as:
GRANT EXECUTE ON SYS.DBMS_DEFER_IMPORT_INTERNAL TO <user>;
GRANT EXECUTE ON SYS.DBMS_EXPORT_EXTENSION TO <user>;
Nothing worked, so I asked for a new dump without the table where the import stopped.

Resources