分类: Oracle
2015-03-12 10:11:09
原文地址:如何修改数据库字符集 作者:hxl
SQL>alter system set cluster_database=false scope=spfile sid='racdb1';
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup mount;
ORACLE instance started.
Total System Global Area 588322312 bytes
Fixed Size 452104 bytes
Variable Size 251658240 bytes
Database Buffers 335544320 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL> alter system enable restricted session;
System altered.
SQL> alter system set job_queue_processes=0;
System altered.
SQL> alter system set aq_tm_processes=0;
System altered.
SQL> alter database open;
Database altered.
SQL> show parameters cluster;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects string
SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE UTF8;
Database altered.
SQL> alter database national character set internal_use utf8;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup restrict;
ORACLE instance started.
Total System Global Area 588322312 bytes
Fixed Size 452104 bytes
Variable Size 251658240 bytes
Database Buffers 335544320 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 588322312 bytes
Fixed Size 452104 bytes
Variable Size 251658240 bytes
Database Buffers 335544320 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> alter system set cluster_database=true scope=spfile sid='racdb1';
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 588322312 bytes
Fixed Size 452104 bytes
Variable Size 251658240 bytes
Database Buffers 335544320 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> alter system set job_queue_processes=300;
System altered.
SQL> alter system set aq_tm_processes=1;
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 588322312 bytes
Fixed Size 452104 bytes
Variable Size 251658240 bytes
Database Buffers 335544320 bytes
Redo Buffers 667648 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
SQL> show parameters clust;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects string
SQL> alter system set cluster_database=true scope=spfile sid='racdb2';
System altered.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 588322312 bytes
Fixed Size 452104 bytes
Variable Size 251658240 bytes
Database Buffers 335544320 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.