Monday 5 October 2015

Gather Schema statistics in Oracle apps from backend and Importent apps dba reguralar querys

Gather statistics in Oracle apps from backend


Use the following command to gather schema statistics:

exec fnd_stats.gather_schema_statistics('ONT') < For a specific schema >exec fnd_stats.gather_schema_statistics('ALL') < For all schemas
 
 
 
 DROP a Datafile from a Tablespace
Starting with version 10.2 and higher You can now alter tablespace drop datafile (except first datafile of a tablespace).

Eg:
Alter tablespace TBS01 drop datafile '/dev01/oradata/dev01/data_04.dbf'; 

 


Some important queries.........!



select open_mode from v$database;
select log_mode from v$database;
select name from v$datafile;
select count(*) from v$datafile;

select name from v$tablespace;
select count(*) from v$tablespace;


Bakup

sql> alter tablespace HRD begin backup ;
copy the datafile to the backup location
sql> alter tablespace HRD end backup;

sql> select open_mode from v$datafile;

sql> alter database open reset logs;



Tablespace Offline:

sql> alter database datafile '/u01/appsmode/jet/oradata/data/HRD01.dbf' offline;

exit
copy the datafile from backup

recover datafile 7;

sql> alter database datafile '/u01/appsmode1/jet/oradata/data/hrd01.dbf' online;


No comments:

Post a Comment


No one has ever become poor by giving