ORA-01157: ORA-01110: 处理方式

select name from v$datafile ; 
文件已经存在于控制文件中。 


su - oracle 
export  ORACLE_SID=test1
sqlplus / as sysdba 




加入到本地,可能文件是落在某个节点文件系统上,那么用户在这个节点上的连接可以写入数据。所以需要先查看
表空间中是否有segment . 到文件所在的节点操作。 


show con_id  
select con_id, ts#, name from v$datafile ; 
如果是pdb 
show pdbs 查看con_id对应的pdb 
alter session set container=xxxx ; 
或直接 
select con_id, ts#, name from v$tablespace where ts#=xxx and con_id=xxxxx ; 


通过表空间查询是否存在segment .
alter session set container=xxxx ; 
select owner, segment_name, segment_type from dba_segments where tablespace_name='TBS_NAME' ; 




SQL> alter database datafile  '/u01/app/oracle/product/12.1.0.2/db_1/dbs/smartCabinet.dbf' offline drop ; 
Database altered.


删除原来表空间
drop tablespace TBS_NAME including contents and datafiles; 


重建。


SQL> create tablespace TB1 add datafile  '+DATA'  size 8G  AUTOEXTEND ON NEXT 500M MAXSIZE 32G; 


请使用浏览器的分享功能分享到微信等