8 Replies Latest reply: May 8, 2010 4:59 AM by Neev RSS

    data pump error ORA-39082 with wrapped packages

    622465
      hi,

      oracle EE 10.2.0.3 is running on AIX.
      I created a package in which I use the datapump API to transfer a schema over the database link using datapump.

      Unfortunatelly I got the following error:
      ORA-39082: Object type ALTER_PACKAGE_SPEC:"OWNER"."PACKAGENAME" created with compilation warnings

      for all wrapped packages.
      After the import there is also no chance to recompile these packages.

      has anyone hit the same error before with data pump?

      thanks Stefan
        • 1. Re: data pump error ORA-39082 with wrapped packages
          Madrid
          Check out the error message text:

          ORA-39082: Object type string created with compilation warnings
          Cause: The object in the SQL statement following this error was created with compilation errors. If this error occurred for a view, it is possible that the base table of the view was missing.
          Action: This is a warning. The object may have to be recompiled before being used.


          Since this is a wrapped package there is no way to check the source code, but at least you could try to run the utlrp.sql script and verify if this compiles.

          ~ Madrid
          http://hrivera99.blogspot.com
          • 2. Re: data pump error ORA-39082 with wrapped packages
            571482
            OTN regular Yingkuan blogged about a similar issue:
            http://yingkuan.blogspot.com/2008/03/ora-39082-error-while-import-using-data.html


            What do you mean about "no chance to recompile". Do you get an error when attempting?
            • 3. Re: data pump error ORA-39082 with wrapped packages
              622465
              Hi all,

              thanks for your replies...

              unfortunatelly recompiling the invalid packages after the impdp didn't bring them into a valid level.
              (also utlrp.sql did not work ..)

              when recompiling the package I got errrors like:
              PLS-00114: identifier 'LK5KCJYRZKKSHYG3VODLQHN17A1HRW' too long

              dropping all the packages and export and import them using the conventional "old" exp and imp features brought them into a valid status.

              but there must be a possiblility to get them to a valid status with using only datapump import...

              anyone a idea?

              thanks Stefan
              • 4. Re: data pump error ORA-39082 with wrapped packages
                658859
                I had a similar error but for different reasons, mine were due to impdp importing objects ion the wrong order, causing problems with dependancies.

                It looks like your error is to do with either the source code for the package in question, or the objects it's referencing.

                To find the offending source code, use the following commands...

                ALTER PACKAGE <SchemaName>.<PackageName> COMPILE;
                SHOW ERRORS PACKAGE <SchemaName>.<PackageName>;
                ALTER PACKAGE <SchemaName>.<PackageBodyName> COMPILE BODY;
                SHOW ERRORS PACKAGE BODY <SchemaName>.<PackageName>;

                The 'SHOW ERRORS' commands should reveal a dodgy line of source code, e.g. trying to assign a value to a variable where that is value is larger than the declared size of the target variable/column, etc. You may want to...

                1. Fix the code yourself and then do a "CREATE OR REPLACE PACKAGE ..." OR
                2. Modify a column length, etc. if approriate OR
                3. Pass it on to the developer concerned.

                It may be worhtwile checking the status of the package in the source database (if different from the target database) by recompiling it as shown above - it may never have compiled!

                Nick
                • 5. Re: data pump error ORA-39082 with wrapped packages
                  user1753853
                  I've also got this issue, howerver it seems after the import via impdp and network_link, you CAN in fact re-compile the objects however the package SPEC must be re_compiled and THEN the body, but, as indicated previously uytlrp.sql doesn't work, and I don't have time to manually recopile 2000+ objects manually.

                  Well about time to write some more sql.
                  • 6. Re: data pump error ORA-39082 with wrapped packages
                    user12011149
                    this is a bug in oracle. when you use data pump for import/export wrapped packages doesn't get migrated properly.

                    for valid wrapped package there should be new line character at the end of wrapper packages before /

                    for example:

                    9KT8wA45xNIx8UkKA2HePAukkjxautEZA46ttoRHaQKjPJh43giqUg==

                    /

                    However with data pump package gets changed to

                    9KT8wA45xNIx8UkKA2HePAukkjxautEZA46ttoRHaQKjPJh43giqUg==
                    /

                    Hence wrapped package doesn't get compiled.

                    To resolve issue you need to add new line character manually or get a fix from Oracle.

                    Kind Regards,
                    Harjeet
                    • 7. Re: data pump error ORA-39082 with wrapped packages
                      746649
                      I just looked up the issue mentioned above about the blank lines for wrapped packages as I was having the issue also. The Doc is ...
                      *Impdp Returns ORA-39082 When Importing Wrapped Procedures [ID 460267.1]*
                      and references the bug 5581731.
                      • 8. Re: data pump error ORA-39082 with wrapped packages
                        Neev
                        You can also do one thing that you can only export packages from source database example after exporting dumpfile(includes only functions).Try to create sql file by importing.After creation of sqlfile open it using editplus OR notepad simply replace create function cluase with create or replace function.and run that new sqlfile on target database

                        HTH,
                        Neerav