Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

Rename a schema in Oracle Database 11gR2

Posted by Mir Sayeed Hassan on September 15th, 2018

Rename a schema in Oracle Database 11gR2

Find the schema name to rename with user#

SQL> select user#,NAME from SYS.user$ WHERE NAME='TEST';

USER# NAME
 ---------- ------------------------------
 208 MIR

Now modify the schema name “MIR” to “SAYEED” as shown below

SYNTAX:

SQL> UPDATE USER$ SET... 
Read more..

Posted in Oracle SQL | Comments Off on Rename a schema in Oracle Database 11gR2

ORA-16139: media recovery required in Oracle Database 11gR2

Posted by Mir Sayeed Hassan on September 15th, 2018

ORA-16139: media recovery required in Oracle Database 11gR2

The Ora-16139 error occur while performing the physical standby database during switchover from physical standby database to primary database in Oracle database 11gR2(11.2.0.4)

Check the status of standby db

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
... 
Read more..

Posted in ORA-Error | Comments Off on ORA-16139: media recovery required in Oracle Database 11gR2

How to exclude Single or Multiple tables from schema by using from EXPDP

Posted by Mir Sayeed Hassan on September 4th, 2018

How to exclude Single or Multiple tables from schema by using from EXPDP

Include Single table from schema

[oracle@testdb dump_bkp]$ expdp system directory=dump_bkp dumpfile=mir04sep18.dmp logfile=mir04sep18.log schemas=mir include=TABLE:"IN('T1')"

Export: Release 11.2.0.4.0 - Production on Tue Sep 4 11:16:31 2018

Copyright... 
Read more..

Posted in Datapump (Expdp/Impdp) | Comments Off on How to exclude Single or Multiple tables from schema by using from EXPDP

Script to Delete Log Files in Oracle Database by using the Crontab Job

Posted by Mir Sayeed Hassan on July 25th, 2018

Script to Delete Log Files in Oracle Database by using the Crontab Job

The given script is tested in our test env

The logfiles are deleTrace File i.e (,trc,.trm) , Audit File (.aud), Listener log (.trc,.trm) & .xml files

In order to manage space in better way, the best practice is to clear the logs files from the database as...

Read more..

Posted in DBA Scripts | Comments Off on Script to Delete Log Files in Oracle Database by using the Crontab Job

ORA-16072: a minimum of one standby database destination is required

Posted by Mir Sayeed Hassan on July 15th, 2018

ORA-16072: a minimum of one standby database destination is required

This error occurs in one of our production database after restore & recover in a database open stage

SQL> startup mount
 ORACLE instance started.

Total System Global Area 396726272 bytes
 Fixed Size 2253504 bytes
 Variable Size 318770496 bytes
... 
Read more..

Posted in ORA-Error | Comments Off on ORA-16072: a minimum of one standby database destination is required

ORA-01156: recovery or flashback in progress may need access to files

Posted by Mir Sayeed Hassan on July 7th, 2018

ORA-01156: recovery or flashback in progress may need access to files

[oracle@primdb onlinelog]$ !sq
sqlplus / as sysdba
SQL> alter database drop standby logfile group 1;

alter database drop standby logfile group 1
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files

Solution:

You...
Read more..

Posted in ORA-Error | Comments Off on ORA-01156: recovery or flashback in progress may need access to files