一套Oracle面试题笔试题及参考答案
Oracle, 笔试, 面试
完成下列操作,写出相应的SQL语句
1.创建表空间neuspace,数据文件命名为neudata.dbf,存放在d:\data
目录下,文件大小为200MB,设为自动增长,增量5MB,文件最大为
500MB。(8分)
答:create tablespace neuspace datafile ‘d:\data\neudata.dbf’ size 200m auto extend on next 5m maxsize 500m;
2. 假设表空间neuspace已用尽500MB空间,现要求增加一个数据文件,存放在e:\appdata目录下,文件名为appneudata,大小为500MB,不自动增长。(5
分)
答:alter tablespace neuspace add datafile ‘e:\appdata\appneudata.dbf’
size 500m;
3. 以系统管理员身份登录,创建账号tom,设置tom的默认表空间为neuspace。为tom分配connect和resource系统角色,获取基本的系统权限。然后为tom 分配对用户scott的表emp的select权限和对SALARY, MGR属性的update权限。
(8分)
答:create user tom identified by jack default tablespace neuspace;
Grant connect, resource to tom;
Grant select, update(salary, mgr) on scott.emp to tom;