Oracle常用命令
一、查询编码格式:
select userenv(‘language‘) from dual;
二、设置编码格式为UTF-8
(1)
--先查看oracle数据库字符集:
select userenv(‘language‘) from dual;
查询结果:
SIMPLIFIED CHINESE_CHINA.AL32UTF8
(2)
--修改oracle数据库字符集:(在SQL Plus中)
sql> conn / as sysdba;
sql> shutdown immediate;
database closed.
database dismounted.
oracle instance shut down.
sql> startup mount;
oracle instance started.
total system global area 135337420 bytes
fixed size 452044 bytes
variable size 109051904 bytes
database buffers 25165824 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> alter database character set internal_use UTF8 ;
sql> shutdown immediate;
sql> startup;
-- 上面的倒数第三行最后的单词 就是 我们要修改成的 编码格式。可用输入其他的编码格式。
C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 10.1.0.2.0 - Production on 星期四 12月 18 09:32:12 2014
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create tablespace scott_tbs datafile ‘F:\oracle\product\10.1.0\oradata\test\scott_tbs01.dbf‘ size 500M;
Tablespace created.
--创建表空间
SQL> alter user scott default tablespace scott_tbs quota unlimited on scott_tbs;
User altered.
--修改scott用户的默认表空间为新创建的scott_tbs;并无限制的 表空间使用权;
SQL> revoke unlimited tablespace from scott;
Revoke succeeded.
--取消用户对所有表空间都拥有写权限的权限;
SQL> show user;
USER is "SYS"
SQL> exit
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。