1

I'm triying to import our database which is in WE8MSWIN1252 instance to a new AL32UTF8 instance. I'm using impdp tool to achieve this. I get the following error

Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC ORA-39083: Object type ALTER_PACKAGE_SPEC:"MyOwner"."MyPackageOwner" failed to create with error: ORA-00904: "DECL_OBJ#": invalid identifier

Please note that when I compile this package using SQLplus it is working as expected Do you have any idea about what can causes this error ? Thanks, Bilel

Bilel Chaouadi
  • 903
  • 1
  • 10
  • 28
  • [Possibly related](https://support.oracle.com/knowledge/Middleware/2476156_1.html)? The fix anyway (which you need a support contract to see), if not the exact scenario... So you might need to raise an SR with Oracle to confirm and get detailed advice. – Alex Poole Apr 11 '19 at 10:07

3 Answers3

6

Open SQL Developer. Set the PLScope identifiers parameter (Tools > Preferences > Database > PL/SQL Compiler > PLScope identifiers) from All to None. Close and open the SQL Developer.

It solved my issue.

mik
  • 3,575
  • 3
  • 20
  • 29
Balu B
  • 61
  • 1
3

In the support note mentioned above, Oracle says that this error is related to SQL Developer and a specific patched version of Oracle DB (12.2.0.1.181016).

As a workaround it seems you can disable PL/Scope (a functionality to parse and analyse PL/SQL code) like this :

  • Open SQL Developer Set the PLScope identifiers parameter (Tools > Preferences > Database > PL/SQL Compiler > PLScope identifiers) from All to None.
  • Close and open the SQL Developer
R. Du
  • 544
  • 4
  • 16
  • I'm not using Sql developer, I'm using datadump tool. – Bilel Chaouadi Apr 11 '19 at 12:41
  • The support note explicitly says that is not really an SQL Developer issue, but does offer a workaround (which you should not be reproducing, pretty sure that breaks your support contract terms...) if you experience it from within SQL Developer. But it looks like the underlying problem *might* also be what's affecting `impdp` here. So the actual fix (not workaround) there *might* work for this scenario too, but the OP really needs to ask Oracle (via a service request). – Alex Poole Apr 11 '19 at 14:55
  • right, but as impdp can be run from SQL Developer it might have been the case, thanks Alex for adding clarification. – R. Du Apr 11 '19 at 15:27
0

I have just excluded views, packages and package_compile from the export and this worked as expected.

Bilel Chaouadi
  • 903
  • 1
  • 10
  • 28