Home » RDBMS Server » Server Utilities » Import a new schema gives error for SYS.DBMS_STATS
Import a new schema gives error for SYS.DBMS_STATS [message #161274] Fri, 03 March 2006 00:28 Go to next message
kpraveen
Messages: 1
Registered: March 2006
Junior Member
While importing a schema into a new database in Oracle 9i I am getting following error

IMP-00017: following statement failed with ORACLE error 4068:
"BEGIN DBMS_STATS.SET_TABLE_STATS(NULL,'"ARCHIVE_DEALS"',NULL,NULL,NULL,0,1"
",0,2); END;"
IMP-00003: ORACLE error 4068 encountered
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SYS.DBMS_STATS" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 1

However I am able to desc SYS.DBMS_STATS.

Also status is valid...

SQL> select status from all_objects where object_name = 'DBMS_STATS';

STATUS
-------
VALID
VALID

SQL>

I ran dbmsstat.sql also as sys and tried again, but import gives same error..

Re: Import a new schema gives error for SYS.DBMS_STATS [message #161341 is a reply to message #161274] Fri, 03 March 2006 06:28 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
May be the importing user does not have the proper rights to set the statistics. Are target and source different versions?
Why import without statistics (statistics =none) and re-collect stats later?


Previous Topic: full database export
Next Topic: Populating Data between 2 different Servers and DB
Goto Forum:
  


Current Time: Thu Dec 26 08:06:08 CST 2024