2. query the Current Character Set SQL> select * from nls_database_parameters where parameter = 'nls _ CHARACTERSET '; PARAMETER VALUE -------------------------------------------------------------------------------- NLS_CHARACTERSET WE8ISO8859P1 3. Shut down the database SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. 4. Start the database to the mount status. SQL> startup mount ORACLE instance started. Total System Global Area 205520896 bytes Fixed Size 1266608 bytes Variable Size 100666448 bytes Database Buffers 100663296 bytes Redo Buffers 2924544 bytes Database mounted. 5. Restrict session SQL> alter system enable restricted session; System altered. 6. query and modify relevant parameters SQL> show parameter job_queue_processes; NAME TYPE VALUE ----------------------------------------------------------------------------- Job_queue_processes integer 10 SQL> show parameter aq_tm_processes; NAME TYPE VALUE ----------------------------------------------------------------------------- Aq_tm_processes integer 0 SQL> alter system set job_queue_processes = 0; System altered. 7. Open the database SQL> alter database open; Database altered. 8. Modify Character Set SQL> alter database character set ZHS16GBK; Alter database character set ZHS16GBK * ERROR at line 1: ORA-12712: new character set must be a superset of old character set When an error occurs, the new character set must be a superset of the old character set. That is, the original character set is a subset of the new character set. You can query the character set inclusion relationship in the Oracle official documentation. The following uses the Oracle Internal Command internal_use to skip the superset check. This method is not recommended in the production environment. SQL> alter database character set internal_use ZHS16GBK; Database altered. 9. query the Current Character Set SQL> select * from nls_database_parameters where parameter = 'nls _ CHARACTERSET '; PARAMETER VALUE -------------------------------------------------------------------------------- NLS_CHARACTERSET ZHS16GBK 10. Shut down the database SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. 11. Start the database to the mount status. SQL> startup mount ORACLE instance started. Total System Global Area 205520896 bytes Fixed Size 1266608 bytes Variable Size 100666448 bytes Database Buffers 100663296 bytes Redo Buffers 2924544 bytes Database mounted. 12. Change the relevant parameters back to the original value. SQL> alter system set job_queue_processes = 10; System altered. 13. Open the database SQL> alter database open; Database altered. |