create tablespace g1crm datafile 'D:\oracle\product\10.2.0\oradata\orcl\g1crm.dbf' size 200m autoextend on next 10m maxsize unlimited;
设置表空间自动扩展
alter database datafile 'D:\oracle\product\10.2.0\oradata\orcl\g1crm.dbf' autoextend on;
删除表空间
DROP TABLESPACE g1crm INCLUDING CONTENTS AND DATAFILES;
创建用户,未用户指定永久表空间
create user g1crm identified by g1crm default tablespace g1crm temporary tablespace temp;
删除用户
drop user g1crmcascade;
为用户分配权限
分配DBA权限
grant dba,connect to g1crm;
grant SYSDBA to g1crm;
=============================字符集问题【cmd】================================
中文乱码字符设置:
sqlplus "/as sysdba"
shutdown immediate
startup restrict
ALTER DATABASE CHARACTER SET ZHS16GBK;
有时候会遇到如下错误:
ORA-12712: new character set must be a superset of old character set
可以执行如下:跳过超集的检查
ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
然后重启数据库即可,不过最好先做备份哦!
命令行(CMD)字符设置:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1
NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK