Skip to main content

Posts

Showing posts from 2019

View large file in Unix

You might had this experience many times while working in day to day Unix environments.. Viewing a Unix file very common in any Unix based task, however, there are large files in form of any log or any other data. Viewing such files really annoying to any administrator when this hits the following error.   Out of memory saving lines for undo - try using ed : The reason why above error, default maximum lines can be displayed by " vi " editor is 1,048,560 so anything file more than 1,048,560 lines will not be displayed with "vi" editor. May be below will show what you're looking for but will not allow much flexibility to view complete file View the first 200 records $head -n 200 yourfile.log |pg to view the last 200 records $tail -200 yourfile.log How to solve this problem " -y " switch of " vi " editor allows to overrides the maximum line setting of 1,048,560 with any value greater than 10...

Freeze DB view

Did you freeze your DB view? Or maybe by it happened by chance!!!... Did you ever hit DB view freeze because of " set transaction read only ". Let us see what it does. Under a test DB user and test table ABC which consist only one record. Start a read-only transaction. Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select * from abc;          P           Q ---------- ----------          1           1 SQL> set transaction read only; (Kept event 10046 level 12 trace for this session to see all background happening more detail) *** 2019-05-16 15:46:33.912 WAIT #4574320352: nam='SQL*Net message from client' ela= 102202601 driver id=1650815232 #bytes=1 p3=0 ob...

Was it rolled back

Ever had that experience? Was it really a rollback? This post will compel you to think about Oracle COMMIT/ROLLBACK!!!.. I have – many times over when working on SQPLUS. Any SQLPLUS connection initiates a transaction irrespective of its type. You might be doing a series of databases changes and while coming out from the SQLPLUS, you did a clean exit, however, forgot doing a COMMIT/ROLLBACK. Do you think that you lost the changes….. No really!!!!!...... Oracle does AUTOCOMMIT when you do a clean exit from SQLPLUS, but when abnormal termination of SQLPLUS, don't capture uncommitted changes. This pattern is clearly visible in the session trace where XCTEND (transaction END) explains about it. XCTEND rlbk=%d rd_only=%d ---------------------------------------------------------------------------- XCTEND A transaction end marker. rlbk 1 if a rollback was performed, 0 if no rollback (commit). rd_only 1 if transaction was read onl...

Performance Hub Report

Hi Guys, In case you do not have Oracle Enterprise Manager or Grid Cloud Control and want to have almost similar features for Oracle monitoring purpose, Performance Hub Reports can help you up to a great extent. Performance Hub report helps to view all performance data available for a specified time period. Various tabs are available in the Performance Hub, depending on whether real-time or historical data is selected for the time period. When real-time data is selected, more granular data is presented, because real-time data for the last hour is displayed. When historical data is selected, more detailed data is presented, but the data points are averaged out to the Automatic Workload Repository (AWR) interval for the selected time period. To use the performance hub report, underlying Oracle must be at least 12c. Following is the way how to generate this report. 1.        At the SQL prompt, enter:         ...