SELECT * FROM v$nls_parameters WHERE PARAMETER IN ('NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET'); #通过NLS_LANGUAGE,NLS_TERRITORY,NLS_CHARACTERSET这三个变量查看
SELECT USERENV ('language') FROM DUAL;#或者通过USERENV函数也可以取得
操作方法也很简单:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount#进入维护模式
ORACLE instance started.
Total System Global Area 4275781632 bytes
Fixed Size 2260088 bytes
Variable Size 905970568 bytes
Database Buffers 3355443200 bytes
Redo Buffers 12107776 bytes
Database mounted.
SQL> alter system enable restricted session;#在维护模式的基础上再开启restricted,防止其他用户登录连接
System altered.
SQL> alter system set job_queue_processes=0;#关闭系统的触发器
System altered.
SQL> alter system set aq_tm_processes=0;#指定队列监视进程个数,缺省是0,如果没有改过可以不加
System altered.
SQL> alter database open;#打开数据库
Database altered.
SQL> alter database character set internal_use al32utf8;#进行字符集修改
Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup#最后重启修改字符集生效
ORACLE instance started.
Total System Global Area 4275781632 bytes
Fixed Size 2260088 bytes
Variable Size 905970568 bytes
Database Buffers 3355443200 bytes
Redo Buffers 12107776 bytes
Database mounted.
Database opened.