Blog Posts

  • ORA-01111: name for data file 129 is unknown – rename to correct file

    Recently i was working on moving some data file on the primary server and i have set the standby_file_management=’MANUAL’. and  then I saw the following error on my standby server. ALTER DATABASE RECOVER managed standby database disconnect from sessionAttempt to start background Managed Standby Recovery process (ORCL)Thu Mar 20 16:07:33 2014MRP0 started with pid=35, OS…

  • Script to delete archive logs on standby server (oracle)

    Frist Create file vi rman_script.sh then add the following lines in rman_script.sh file #!/bin/bash####################################################################  this script will delete the archive and obsolete file on standby server  ############################################################################# ORACLE_HOME=/u01/app/oracle/product/11.2/db_1;export ORACLE_HOME;ORACLE_SID=ORCL;export ORACLE_SID; rman msglog ” now.log ” <<EOFconnect target /;CONFIGURE CONTROLFILE AUTOBACKUP ON;CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE…

  • Count All the Rows in all tables in a schema

    Count All the Rows in all tables in a schema  you can do it various options Option 1.  you can write a sql to get the out output an the then run the output to get the count for all tables . select ‘select count (*) as ‘||owner||’_’||table_name||’ from ‘ ||owner||’.’||table_name||’;’ from all_tables tables where…

  • Purging a Database Audit Trail AUD$

    Purging a Subset of Records from the Database Audit Trail You can manually remove records from the database audit trail tables. This method can be useful if you want to remove a specific subset of records. You can use this method if the database audit trail table is in any tablespace, including the SYSTEM tablespace.…

  • Create a sample schema with 1millions rows in Oracle

    We always to test the database for various reasons we will need to create a tables  with a lot of data in it.We can use below script that will allow us to create a table and populate the table with 10,00,000 rows with simple plsql block. This is just for demo purpose and have been…