首先提几个问题:
1,只读表空间可不可以后来创建表
2,只读表空间里先创建的表能不能删除
3,read only 是不是只禁用dml
下面看我的实验,环境oracle 1og R2
1,只读表空间可不可以后来创建表
2,只读表空间里先创建的表能不能删除
3,read only 是不是只禁用dml
下面看我的实验,环境oracle 1og R2
SQL> create tablespace tbsread datafile '/oradata/orcl/tbsread.dbf' size 10m ;
Tablespace created.
SQL> alter tablespace tbsread read only;
Tablespace altered.
SQL> conn anbob/anbob
Connected.
SQL> create table testread (id int) tablespace tbsread;
create table testread (id int) tablespace tbsread
*
ERROR at line 1:
ORA-01647: tablespace 'TBSREAD' is read only, cannot allocate space in it
SQL> conn system/oracle
Connected.
SQL> alter tablespace tbsread read write;
Tablespace altered.
SQL> conn anbob/anbob
Connected.
SQL> create table testread (id int) tablespace tbsread;
Table created.
SQL> insert into testread values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> conn system/oracle
Connected.
SQL> alter tablespace tbsread read only;
Tablespace altered.
SQL> conn anbob/anbob
Connected.
SQL> delete table testread;
SP2-0544: Command "delete" disabled in Product User Profile
--为什么会报这个错,请查看http://www.anbob.com/?p=944 很有意思的方法
SQL> conn system/oracle
Connected.
SQL> delete from product_user_profile;
5 rows deleted.
SQL> commit;
Commit complete.
SQL> conn anbob/anbob
Connected.
SQL> delete from testread;
delete from testread
*
ERROR at line 1:
ORA-00372: file 18 cannot be modified at this time
ORA-01110: data file 18: '/oradata/orcl/tbsread.dbf'
SQL> drop table testread;
Table dropped.
SQL> conn system/oracle
Connected.
SQL> alter tablespace tbsread read write;
Tablespace altered.
SQL> create table anbob.testread (id int) tablespace tbsread;
Table created.
SQL> conn anbob/anbob
Connected.
SQL> alter table testread disable table lock;
Table altered.
SQL> insert into testread values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> drop table testread;
drop table testread
*
ERROR at line 1:
ORA-00069: cannot acquire lock -- table locks disabled for TESTREAD
SQL> alter table testread enable table lock;
Table altered.
SQL> drop table testread;
Table dropped.复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
605次阅读
2025-04-15 17:24:06
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
604次阅读
2025-04-18 14:18:38
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
499次阅读
2025-04-08 09:12:48
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
483次阅读
2025-04-20 10:07:02
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
465次阅读
2025-04-22 00:20:37
Oracle 19c RAC更换IP实战,运维必看!
szrsu
441次阅读
2025-04-08 23:57:08
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
438次阅读
2025-04-22 00:13:51
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
430次阅读
2025-04-17 17:02:24
火焰图--分析复杂SQL执行计划的利器
听见风的声音
372次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
362次阅读
2025-04-15 14:48:05
热门文章
移除DataGuard Standby配置导致Primary启动失败
2023-08-17 21324浏览
使用dblink产生的”SELECT /*+ FULL(P) +*/ * FROM XXXXX P ” 解析
2023-06-20 20900浏览
Troubleshooting 'ORA-28041: Authentication protocol internal error' change password 12c R2 DB
2020-04-08 13669浏览
浅谈ORACLE免费数据库Oracle Database XE (Express Edition) 版
2018-10-31 7632浏览
High wait event ‘row cache mutex’ in 12cR2、19c
2020-08-14 5594浏览