Mir Sayeed Hassan – Oracle Blog

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

Run SQL Query from Linux command as shown below:

Posted by Mir Sayeed Hassan on December 25th, 2017

Run SQL Query from Linux command as shown below:

Method 1:

[oracle@testdb ~]$ echo "select table_name from user_tables;" | sqlplus -s mir/mir123

TABLE_NAME
------------------------------
TEST1
TEST2
[oracle@testdb ~]$ echo "select * from test1;" | sqlplus -s mir/mir123

ENO
----------
1
2
Read more..

Posted in MISCELLANEOUS | Comments Off on Run SQL Query from Linux command as shown below:

Copy OS files from one location to another by sql*plus using Oracle function UTL_FILE.FCOPY

Posted by Mir Sayeed Hassan on December 25th, 2017

Copy OS files from one location to another by sql*plus using Oracle function UTL_FILE.FCOPY

Overview:

Create the sample 2 directories for test & create 1 file in one of the directory therefore create a user for new test or use existing user. Grant the appropriate privilege to the user and copy the files from one folder to another using the Oracle...

Read more..

Posted in MISCELLANEOUS | Comments Off on Copy OS files from one location to another by sql*plus using Oracle function UTL_FILE.FCOPY

To set up Autotrace by using the PLUSTRACE ROLE in Oracle Database

Posted by Mir Sayeed Hassan on December 24th, 2017

To set up Autotrace by using the PLUSTRACE ROLE in Oracle Database

Follow the step by step procedure as shown below:

SQL> conn sys/sys as sysdba
Connected.
SQL> set autotrace traceonly;

SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611:... 
Read more..

Posted in DBA Administration | Comments Off on To set up Autotrace by using the PLUSTRACE ROLE in Oracle Database

Real time Auditing in Oracle Database 11gR2

Posted by Mir Sayeed Hassan on December 23rd, 2017

Real time Auditing in Oracle Database 11gR2

There are major 4 types of auditing:

1 – Statement level auditing

2 – Object level auditing

3 – Privilege level auditing

4 – Fine granined auditing

 In...
Read more..

Posted in Performance Tuning(PT) | Comments Off on Real time Auditing in Oracle Database 11gR2

Auditing at Schema Level in Oracle Database 11gR2

Posted by Mir Sayeed Hassan on December 23rd, 2017

Auditing at Schema Level in Oracle Database 11gR2

 DDL Auditing at Schema Level

 Try to perform the below tested & verified auditing at schema level in Oracle Database 11gr2

 A DDL event occurs when a DDL statement is run in specific schema level such as...

Read more..

Posted in Performance Tuning(PT) | Comments Off on Auditing at Schema Level in Oracle Database 11gR2

Performance tuning test for Wait Event enq: TX – row lock contention.

Posted by Mir Sayeed Hassan on December 3rd, 2017

Performance tuning test for Wait Event enqTX – row lock contention.

Simulate step by step procedure for Wait Event enqTX – row lock contention, by updated (locking) row in 1st session & while trying to update the 2nd...

Read more..

Posted in Performance Tuning(PT) | Comments Off on Performance tuning test for Wait Event enq: TX – row lock contention.