Posts

Showing posts from September, 2012

Unix: List Files Which Do Not Have A Particular Pattern In Filename

Many a times we want to list files which do not have a particular pattern in its file name. Here are a few things you can do (Remember not to use ls -l here): ls |grep -v bz2 -- file name has bz2 anywhere in the file name ls |grep -v bz2$ -- file name ends with bz2 ls |grep -v ^bz2 -- file name starts with bz2 ls |grep -v .bz2. -- file name has bz2 in the middle ls |grep ..bz2 -- file name has atleast 2 chars before bz2 ls |grep '\.bz2$' -- file name ends with .bz2 (\ to escape) ls |grep "\.bz2$" -- file name ends with .bz2 ("or ' might matter with the shell being used) ls |grep b.2 -- file name can have bz2 or bx2 ls |grep '\.b.2' -- file name can have .bz2 or .bx2 ls |grep "\.b.2" -- file name can have .bz2 or .bx2

Debug Methods Oracle (Coarse Grained Auditing)

Scenario There are many times, where there was an issue in production and you did not have any idea how it happened. The following article will give you some direction. Please note there are many other ways too. Currently, I will just focus on a method I had used during a similar situation. This error information is from the latest logs from Production said: ORA-00001: unique constraint (TABLE_ABCD.SYS_C006189415) violated       Now the constraints to troubleshoot the above scenario are: You have limited access/privilege in production environment. The above was due to a duplicate record that came in and your process tried to insert that duplicate data. But what was that data that caused disruption? The answer could have been found out by using FlashBack Query feature from Oracle. This however is version specific. Let’s look into some other aspects of debugging. Observation There is no clue to the data that was being inserted at the time this exce