昨天安装好了EX后,今天继续基础温习。
用system登陆进去后,然后再查看当前在哪个 表空间下:
SQL>select username,default_tablespace from user_users;
发现屏幕间距太小,所以自己要把设置一下宽度:
set line 300
select username, default_tablespace from user_users之行之后发现没有找到我昨天创建的 表空间gaospace, 但是select * from student; 到时可以执行,
解答: 目前的用户是system, 应该是默认表空间是system,所以我要切换到 gaospace:
感觉好不爽啊,自己新创建一个用户: zhangsan。然后每次就可以用自己的用户管理自己的表空间了。
在用户 system下:
create user zhangsan identified by oracle;
对了还要授予一系列的权限,如下:
grant create session to zhangsan;
grant create table to zhangsan;//授予创建表的权限
grante drop table to zhangsan;//授予删除表的权限
grant insert table to zhangsan;//插入表的权限
................
太麻烦了,干脆一个语句:
grant all to gaoyu;
创建新表空间starive, 和临时表空间 和用户:
create temporary tablespace starive_temp
tempfile 'F:\Oraclesoftware\DISK1\datafiles\starivetemp001.dbf'
size 50m
autoextend on
next 32m maxsize 2048m
extent management local;
创建新用户starive:
create user starive identified by oracle
default tablespace starivespace
temporary tablespace starive_temp;
以后就用新用户 starive 来进行学习oracle。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26435490/viewspace-1076656/
,如需转载,请注明出处,否则将追究法律责任。