Project error due to Oracle 10g empty table export failure -- the table or view does not exist, oracle10 g View

Source: Internet
Author: User

Project error due to Oracle 10g empty table export failure -- the table or view does not exist, oracle10 g View

This afternoon, the data in the remote database is exported and imported to the local database. After the deployed project connects to the local database, jboss starts compiling and reports the following error:


Severe: Exception sending context initialized event to listener instance of class com. dicpsi. mis. contextListener. ContextListener
Org. springframework. dao. InvalidDataAccessResourceUsageException: cocould not execute query; nested exception is org. hibernate. exception. SQLGrammarException: cocould not execute query
Caused by: org. hibernate. exception. SQLGrammarException: cocould not execute query
At org. hibernate. exception. SQLStateConverter. convert (SQLStateConverter. java: 67)
At org. springframework. transaction. interceptor. TransactionInterceptor. invoke (TransactionInterceptor. java: 107)
At org. springframework. aop. framework. ReflectiveMethodInvocation. proceed (ReflectiveMethodInvocation. java: 161)
At org. springframework. aop. framework. JdkDynamicAopProxy. invoke (JdkDynamicAopProxy. java: 202)
At $ Proxy1.find (Unknown Source)
Caused by: java. SQL. SQLException: ORA-00942: Table or view does not exist.


Find the cause: by reporting the error information table or trying to not exist, I tried to use the above information to locate the relevant non-existent tables, but I did not find these non-existent tables. Then, I opened the remote database and compared the user's data table with the local data table I imported. I found that eight tables with empty data in the local database were missing.


Solution: Finally, I used the following SQL statement to re-export the table on the remote data server that stores NULL data.



-- Select a blank field
Select 'alter table' | table_name | 'allocate extent (size 64 k); 'from tabs t where not exists (select segment_name from user_segments s where s. segment_name = t. table_name );

Note:

New Feature of oracle11g. When the number of data entries is 0, no segment is assigned, so it cannot be exported. After the preceding SQL statement is executed, all tables with NULL data are listed in the query content, and the following SQL statement is generated. copy and paste the following content for execution.


-- Change to an empty table for identification when exporting the database
Alter table PBCATVLD allocate extent (size 64 k );
Alter table PBCATTBL allocate extent (size 64 k );
Alter table PBCATCOL allocate extent (size 64 k );
Alter table MIS_WORDBOOKMARK allocate extent (size 64 k );
Alter table MIS_CHAT_SPARE allocate extent (size 64 k );
Alter table MIS_CHART allocate extent (size 64 k );
Alter table AS_TRANSRESULT_CHECKACCOUNT allocate extent (size 64 k );
Alter table AS_TRANSERRLOG allocate extent (size 64 k );
Alter table AS_BANKTRANSCOMPARE allocate extent (size 64 k );
Alter table AR_CUSTOMERINFO allocate extent (size 64 k );

Note: After the preceding SQL statement is executed, the tables that originally stored data in the remote database as null will be exported, but the data is still empty.

Export Database statement:

Exp username/password @ database instance name file =/home/oracle/exp. dmp log =/home/oracle/exp_smsrun.log

Example of exporting database statements:

Exp scpssts/scpssts123 @ dicpsi file = D: \ ora \ scpssts. dmp owner = scpssts log = D: \ ora \ scpssts. log

After modification, jboss compilation is restarted successfully.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.