Oralce data import troubleshooting (SYSTEM. PROC_AUDIT and Audit)

Source: Internet
Author: User


Oralce data import troubleshooting (SYSTEM. PROC_AUDIT and Audit) When you export the data of USERNAME user of Data A and then import the data to USERNAME in database B, the following problems occur during table data query by USERNAME User: www.2cto.com ORA-06550: 1st rows, 7th columns: PLS-00201: must declare the identifier 'System. PROC_AUDIT 'ora-06550: 1st rows, 7th columns: PL/SQL: Statement ignored this problem occurs because database A has opened the audit, and when it is imported to database B, database B audit is not enabled, and database does not have SYSTEM. PROC_AUDIT object.
The solution is as follows: 1) log on to the database with sysdba: D: \ Users \ Administrator> sqlplus/as sysdba2) display the current audit parameters: SQL> show parameter audit; name type value =----------- ---------------------------- audit_file_dest string J: \ APP \ ADMINISTRATOR \ ADMIN \ orc l \ ADUMPaudit_sys_operations boolean FALSEaudit_trail string DB3) Enable audit. SQL> alter system set audit_sys_operations = TRUE scope = spfile; the system has changed. 4) check whether the new status shows that the audit operation is not enabled. You need to restart the database: SQL> show parameter audit; NAME TYPE VALUE =-------------------------------- audit_file_dest string J: \ APP \ ADMINISTRATOR \ admin l \ ADUMPaudit_sys_operations boolean FALSEaudit_trail string DB5) Restart Database SQL> shutdown immediate database has been disabled. The database has been detached. The ORACLE routine has been disabled. The SQL> startupORACLE routine has been started. Total System Global Area 3056513024 bytesFixed Size 2179656 bytesVariable Size 1644170680 bytesDatabase Buffers 1392508928 bytesRedo Buffers 17653760 bytes database loaded. The database has been opened. 6) Check the audit status again. The audit is enabled. SQL> show parameter audit; NAME TYPE VALUE =------------- using audit_file_dest string J: \ APP \ ADMINISTRATOR \ ADMIN L \ ADUMPaudit_sys_operations boolean TRUEaudit_trail string DBSQL> conn USERNAME/PWDXXXXXX; connected. 7) query table data. The error persists, but the error is changed to SYSTEM. PROC_AUDIT invalid: SQL> select * from configurationhot; select * from configurationhot * 1st rows error: ORA-06550: 1st rows, 14th columns: PLS-00905: Object SYSTEM. PROC_AUDIT invalid ORA-06550: 1st rows, 7th columns: PL/SQL: Statement ignored8) will object SYSTEM. PROC_AUDIT authorize USERNAME. SQL> grant execute on SYSTEM. PROC_AUDIT to username; authorization successful. 9) log on with USERNAME again and run the Data Table query. The SYSTEM object is displayed. PROC_AUDIT is invalid. Because the object has been authorized, this situation may be caused by an object error. SQL> conn USERNAME/PWDXXXXXX; connected. SQL> select * from TABLENAME; select * from TABLENAME * 1st rows error: ORA-06550: 1st rows, 14th columns: PLS-00905: Object SYSTEM. PROC_AUDIT invalid ORA-06550: 1st rows, 7th columns: PL/SQL: Statement ignored10) Find SYSTEM. PROC_AUDIT stored procedure. If a compilation error is found, the system is prompted. v _ $ SQL, v $ SQL _bind_capture, sys. the v _ $ session is an invalid identifier. Because the above object exists and can be queried, it is suspected that it is a permission setting problem. perform the following authorization: SQL> conn/as sysdba; connected. SQL> grant all on sys. v _ $ SQL to system 2; authorization successful. SQL> grant all on v $ SQL _bind_capture to system; authorization successful. SQL> grant all on sys. v _ $ session to system; authorization successful. 11) SYSTEM. after PROC_AUDIT is compiled, log on to the database with USERNAME and check that the table data is restored normally. The problem is solved. to verify whether the audit is enabled during export and the audit is not enabled during import, disable audit again: SQL> alter system set audit_sys_operations = FALSE scope = spfile; the system has changed. SQL> restart; SP2-0042: Unknown command "restart"-ignore other lines. SQL> shutdown immediate; the database has been closed. The database has been detached. The ORACLE routine has been disabled. SQL> startup; the ORACLE routine has been started. Total System Global Area 3056513024 bytesFixed Size 2179656 bytesVariable Size 1644170680 bytesDatabase Buffers 1392508928 bytesRedo Buffers 17653760 bytes database loaded. The database has been opened. 12) after the database is restarted, it is normal to log on with USERNAME to query data.
 

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.