Tuesday 29 October 2013

Convert logs to cvs with exclude some columns

Param (

$FILE_IN="access.log",
$FILE_OUT="access.csv",
$FILE_TMP="tmp.csv"
)

$datetime = get-date -f yyddMM-hhmm

cat $FILE_IN | where { $_ -match "^[0-9]"} | % { $_ -replace '\s+',"," } | foreach {Write-output "$(($_ -split ',')[1,4,5])" } | % { $_ -replace '\s+',"," } | Out-File -append -filePath $FILE_TMP

$FILE_OUT=$FILE_OUT.replace("csv",$datetime + ".csv")
Write-output $FILE_OUT
Copy-Item $FILE_TMP $FILE_OUT


Tuesday 15 January 2013

RMAN-06059: expected archived log not found

If rman unable to find archivelog run crosscheck


change archivelog all crosscheck;