Exporting a schema in Oracle with a dot in the name requires a bit of special handling because dots are not allowed in Oracle schema names. However, if you're referring to a user that has a dot in its name, that might be possible. Here's how you can export such a schema:
- Using Data Pump Export (expdp): Oracle Data Pump Export utility (
expdp
) can be used to export the schema. If the schema name contains a dot, you'll need to enclose the schema name in double quotes.
expdp username/password@SID schemas="\"schema.name\"" directory=DATA_PUMP_DIR dumpfile=schema_name.dmp logfile=schema_name.log
Replace
username
, password
, SID
, schema.name
, DATA_PUMP_DIR
, schema_name.dmp
, and schema_name.log
with appropriate values.Here is the example
expdp system/<password> SCHEMAS=ABC.XYZ DIRECTORY=dump_dir DUMPFILE=full_export.dmp LOGFILE=fullexport.log
This throws error as the Scheman name is ABC.XYZ ( With a "." in middle)
Export: Release 10.2.0.1.0 - Production on
Wednesday, 23 August, 2006 11:08:07
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39170: Schema expression 'ABC' does not correspond to any schemas.
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39170: Schema expression 'ABC' does not correspond to any schemas.
The problem is due to the dot (".")
in the schema name. The right escape sequence must be used in order to avoid
this.
The right escape sequence is '\"' ( back
slash + double quote).
- correct syntax is this
expdp system/<password> SCHEMAS='\"ABC.XYZ\"'
DIRECTORY=dump_dir DUMPFILE=full_export.dmp LOGFILE=fullexport.log
Tags:
Oracle