SYS>startup
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2257880 bytes
Variable Size 545262632 bytes
Database Buffers 289406976 bytes
Redo Buffers 2355200 bytes
Database mounted.
Database opened.
SYS>select name from v$tempfile;
/u01/app/oracle/oradata/PROD/datafile/o1_mf_temp_b29o0g6r_.tmp
1 row selected.
--数据库重建
2)在11g以前,如数据库不能重起,可以创建新的临时表空间:
create temporary tablespace temp2 tempfile
'/u01/app/oracle/oradata/orcl/temp2.dbf' size 10m reuse autoextend on maxsize 200m;
SQL>alter database default temporary tablespace temp2;
--将新的表空间设置为默认的临时表空间
SQL>drop tablespace temp including contents and datafiles;
--删除旧的表空间及其数据
SQL>ALTER TABLESPACE temp ADD TEMPFILE '/u01/app/oracle/oradata/orcl/temp2.dbf' SIZE 20M;
--给临时表空间添加文件
SYS>select * from database_properties
where property_name='DEFAILT_TEMP_TABLESPACE'; --查看当前数据库默认数据库