select name from v$datafile;
select name from v$controlfile;
select file_name,tablespace_name from dba_data_files where file_name like '%media%';-Find the files contains media---
select file_name,status from dba_data_files where tablespace_name = 'APPS_TS_MEDIA'; - Shows the data files under particular TS
Rename the data file:
1.alter tablespace APPS_TS_MEDIA offline;
2.cp from Os
3.alter tablespace APPS_TS_MEDIA rename datafile '/testdb/TEST/testdata/logdata/media_6.dbf' to '/testdb/TEST/testdata/appsdata/media_6.dbf'
or
Shut DB,Start Mount,ALTER DATABASE RENAME file '/testdb/TEST/testdata/logdata/media_6.dbf' to '/testdb/TEST/testdata/appsdata/media_6.dbf';
4.alter tablespace APPS_TS_MEDIA offline;
To see the all tablespaces total MB, used MB, free MB, used and free order min
set linesize 170
AVG(PCUSED) "% USED",
round (NVL(SUM (fs.BYTES/1024/1024),0)) BytesFree,
round (NVL((100 * ((SUM (fs.BYTES)) / df.BYTES)),0)) PCFREE,
To Find Database Instance name,Startup Time,Host Name,Status,Archivelog Mode
COLUMN "Instance" FORMAT a10
set linesize 132
TO_CHAR(i.startup_time, 'MM/DD/YY HH24:MI') "Startup Time",
No comments:
Post a Comment