Oracle 错误 ORA-19502:文件写入错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24559411/
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
Oracle Error ORA-19502: write error on file
提问by sead4711
I'm creating a tablespace in oracle using this code:
我正在使用以下代码在 oracle 中创建一个表空间:
Create BIGFILE tablespace SPC_X
Datafile 'SPC_X.dbf'
size 200M
AUTOEXTEND ON NEXT 50M
ONLINE;
Up to now, I have created couple of tablespaces, without any problem. Today I have created 5 tablespaces (500 M) and dropped them all. Right now I am facing this error after execution code, mentioned above:
到目前为止,我已经创建了几个表空间,没有任何问题。今天我创建了 5 个表空间 (500 M) 并将它们全部删除。现在我在执行代码后面临这个错误,上面提到:
SQL-Error: ORA-19502: write error on file " SPC_X.dbf", block number 11136 (block size=8192)
ORA-27072: File I/O error
Additional information: 4
Additional information: 11136
Additional information: 708608
19502. 00000 - "write error on file \"%s\", blockno %s (blocksize=%s)"
*Cause: write error on output file
*Action: check the file
Following Information could be helpful:
以下信息可能会有所帮助:
- It was successfully executing up to now.
- I am SA on my data base.
- I have enough place
- size should be at least 200 M
- I have googled more than 1,5 hours, no success :(?
- 到目前为止,它已经成功执行了。
- 我在我的数据库中是 SA。
- 我有足够的地方
- 大小应至少为 200 M
- 我用谷歌搜索了超过 1.5 个小时,没有成功:(?
Can someone please help me on this issue? Thanks :)
有人可以帮我解决这个问题吗?谢谢 :)
--
——
update1: Could it be that my drop statement, which I have used to drop old tablespases, was not complete?
update1:难道是我用来删除旧表空间的 drop 语句不完整?
DROP TABLESPACE SPC_A
INCLUDING CONTENTS
CASCADE CONSTRAINTS;
--
——
update2: I have tried this code without any success:
update2:我试过这个代码但没有成功:
ALTER DATABASE DATAFILE 'SPC_A' OFFLINE DROP;
This code cannot works out, since the tablespace has been already deleted
此代码无法运行,因为表空间已被删除
ALTER TABLESPACE example DROP DATAFILE 'SPC_A';
回答by ik_zelf
Normally you drop a tablespace using
通常你删除一个表空间使用
drop tablespace x including contents and datafiles;
this prevents the need to use OS commands to drop the datafiles from the filesystem and is a bit more secure than using OS commands deleting the unneeded files since manually, a typo is easier done than fixed.
这可以防止需要使用操作系统命令从文件系统中删除数据文件,并且比使用操作系统命令删除不需要的文件更安全,因为手动操作,打字错误比修复更容易。
In your situation, first cleanup the files from the OS. I assume the errors you get are when you try to re-create the tablespace using the same datafile[s].
在您的情况下,首先清除操作系统中的文件。我假设您在尝试使用相同的数据文件 [s] 重新创建表空间时遇到的错误。