Posted on April 10, 2008 by Alex
Pass the start date + time and end date + time to the following script. It looks at the alert log file and obtains the no of archive logs that have been applied during media recovery in that time interval.
#!/usr/bin/perl -w
BEGIN { push @INC,”/home/user/TimeDate-1.16/lib/” }
use Date::Parse;
$start=str2time(@ARGV[0]);
chomp(@ARGV[1]);
$end=str2time(@ARGV[1]);
$log=’path to the log file’;
open(ALERTLOGFILE,$log) or die “Not able to [...]
Filed under: oracle | Tagged: log, oracle, perl | Leave a Comment »
Posted on April 3, 2008 by Alex
REGEXP_REPLACE(target_name,’(([\.]|[:])[a-z,A-Z,0-9]*)|(-[0-9]{3})’,”)
It was written to transform host entries in the table of the format “aaa-bbb-001.ccc.ddd.eeeeeee.fff” to aaa-bbb . The underlying requirement was to get one distinct entry for all RAC nodes in a cluster.
Filed under: oracle | Tagged: oracle, regex | Leave a Comment »
Posted on July 27, 2007 by Alex
1. Is index always the best way.. Should I really use the index or just do a full table scan.
2. Use bind variables everywhere. Parse once execute many times.
3. Should i partition the table ? What type of partition ? (range,list, hash etc)
4. What can be done in SQL is better done in SQL, never [...]
Filed under: oracle | Tagged: guidelines, tips | Leave a Comment »