Monday, February 17, 2020

Finding SQL Statements in an Oracle Trc File

It often comes to pass that I have received an oracle alert file indicating deadlocks along with a .trc file from one of our customers.

As we all know, deadlocks are an *APPLICATION* problem, not a database problem.
Still, the developers are my team, my posse, my *PEOPLE*, yo, and imma help 'em out. ;-)

So, to make their analysis easier, one of the things I like to do is give them a consolidated list of SQL Statements from the .trc file. This helps them to understand what the application is doing when the deadlock  occurrs.

To find any lines that contain select, insert, update, or delete, you can do the following search. (NOTE: This could easily be expanded to include Merge, etc.  )


Using Notepad ++ ,  I search for
\b(?:select|insert|update|delete)\b .*?$
I then use Notepad++'s bookmark feature to bookmark each line that matches the search.


Finally, I use Search -> Bookmark -> Remove Unmarked Lines

This will remove everything but the Select, Insert, Update, and Delete statements.

DBT-50000 when using DBCA.bat on Windows (Oracle 19.11)

I’ve been having some trouble getting DBCA to run in order to create databases. Thought I’d share it with you, and thus document it for la...