什么是 Oracle 错误 ORA-01536?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4493485/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is Oracle error ORA-01536?
提问by Gold
I got the following error on Oracle: ORA-01536
我在 Oracle 上遇到以下错误:ORA-01536
What is the problem?
问题是什么?
回答by APC
The online documentation includes a book with explanations and resolutions for all the error messages. Some of them are a bit cryptic but it is the place to start. Find out more.
在线文档包括一本书,其中包含所有错误消息的解释和解决方案。其中一些有点神秘,但这是开始的地方。 了解更多。
Anyhoo, here is an illustrated solution for ORA-01536.
Anyhoo,这里是 ORA-01536 的说明性解决方案。
A DBA creates a new user:
DBA 创建一个新用户:
SQL> create user fox_in_socks identified by tweetlebeetle
2 default tablespace users quota 1M on users
3 /
User created.
SQL> grant create session, create table to fox_in_socks
2 /
Grant succeeded.
SQL>
In another session our brave user creates a table...
在另一个会话中,我们勇敢的用户创建了一个表......
SQL> conn fox_in_socks/tweetlebeetle
Connected.
SQL> create table t23 (col1 varchar2(4000))
2 /
Table created.
SQL>
.. and does some work....
..并做了一些工作......
SQL> begin
2 for i in 1..1000 loop
3 insert into t23 values (rpad('a', 4000, 'a'));
4 commit;
5 end loop;
6 end;
7 /
begin
*
ERROR at line 1:
ORA-01536: space quota exceeded for tablespace 'USERS'
ORA-06512: at line 3
SQL>
Uh-oh! So our user goes to their tame DBA and asks for more quota, which they get:
哦哦!所以我们的用户去找他们驯服的 DBA 并要求更多的配额,他们得到了:
SQL> alter user fox_in_socks
2 quota 10M on users
3 /
User altered.
SQL>
Work proceeds:
工作进展:
SQL> begin
2 for i in 1..1000 loop
3 insert into t23 values (rpad('a', 4000, 'a'));
4 commit;
5 end loop;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL>
If the user were an application owner then the DBA could have decided to give them unlimited quota (especially if they were the only user with privileges on that tablespace):
如果用户是应用程序所有者,那么 DBA 可以决定给他们无限的配额(特别是如果他们是唯一对该表空间具有特权的用户):
alter user fox_in_socks
quota unlimited on users
/
(in real life this situation is unlikely to be true for the USERS tablespace).
(在现实生活中,这种情况对于 USERS 表空间不太可能成立)。
Users can check their current quota using the appropriate view:
用户可以使用适当的视图检查他们当前的配额:
SQL> select * from user_ts_quotas
2 /
TABLESPACE_NAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS DRO
------------------------------ ---------- ---------- ---------- ---------- ---
USERS 9437184 10485760 1152 1280 NO
SQL>
回答by SLaks
ORA-01536: space quota exceeded for tablespace 'string'
ORA-01536: 超出表空间 'string' 的空间配额
Cause: The space quota for the segment owner in the tablespace has been exhausted and the operation attempted the creation of a new segment extent in the tablespace.
原因:表空间中段所有者的空间配额已用完,操作尝试在表空间中创建新段范围。
Action: Either drop unnecessary objects in the tablespace to reclaim space or have a privileged user increase the quota on this tablespace for the segment owner.
行动:要么删除表空间中不必要的对象以回收空间,要么让特权用户为段所有者增加此表空间的配额。