-
How to insert an ambersand ‘&’ into database
Continue reading →: How to insert an ambersand ‘&’ into databaseWhen ever you try to insert an ambersand ‘&’ into database, database tries to intract and get the values values from screen. in that case we can follow below steps create table test (name varchar2(35)); insert into test values (‘hello&world’); I tried the escape character ‘\’ but the system asks…
-
Auditing DDL changes in Oracle Database
Continue reading →: Auditing DDL changes in Oracle DatabaseAuditing changes within the database are becoming more and more important. As well as auditing changes to data, auditing DDL changes can be just as critical. This allows the DBA to not only know what changes have been made but also what haven’t. Being able to see what changes have…
-
Find accounts unused for days
Continue reading →: Find accounts unused for daysFind accounts unused for days Summary Here’s a script that shows accounts and number of days since last use. It assumes session auditing is enabled. SELECT RPAD(da.username, 12) “Username”, TRUNC(SYSDATE – MAX(da.TIMESTAMP)) “Days Inactive”, LPAD(du.account_status, 16) “Status”, LPAD(TO_CHAR(MAX(da.TIMESTAMP), ‘DD-MON-YYYY’), 16) “Last Login”FROM dba_users du, dba_audit_session da WHERE da.action_name LIKE ‘LOG%’–…
-
Top 10 Reasons DBAs Quit
Continue reading →: Top 10 Reasons DBAs QuitI found this interesting article online & would like to share: The role of the DBA is an anomaly in the IT environment. DBAs are often extremely critical yet hidden from view; highly paid yet individual contributors; and very knowledgeable yet rarely consulted. So why does an extremely critical, highly…
-
ORA-24247: network access denied by access control list
Continue reading →: ORA-24247: network access denied by access control listORA-24247: network access denied by access control list (ACL)Yesterday I was trying to send mail from my Oracle Database and I got below mentioned error :- ERROR at line 1:ORA-24247: network access denied by access control list (ACL)ORA-06512: at “CINP01314”, line 255ORA-06512: at line 21 In 11g Database , we…
-
ORA-01111: name for data file 129 is unknown – rename to correct file
Continue reading →: ORA-01111: name for data file 129 is unknown – rename to correct fileRecently 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…
-
Script to delete archive logs on standby server (oracle)
Continue reading →: 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…
-
Count All the Rows in all tables in a schema
Continue reading →: Count All the Rows in all tables in a schemaCount 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 ‘…
-
Purging a Database Audit Trail AUD$
Continue reading →: 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…
-
Create a sample schema with 1millions rows in Oracle
Continue reading →: Create a sample schema with 1millions rows in OracleWe 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…






