#########################################################################################################
# #
# Validate OWB Repository #
# #
# Validate Objects in OWB repository without deploymeny #
# Output is written in folder set of RootDir #
# #
# (C) Ciber Nederland John Minkjan OMB101.blogspot.com #
# V001 Init Version #
# V002 Validated against OWB11gR2 #
# #
#########################################################################################################
# RootDir
set RootDir "C:\\temp\\"
# Open Log
set chan [open [string map {\\ /} "$RootDir\\log.txt"] w]
set timestamp [clock format [clock seconds]]
puts $chan $timestamp
# Get the projects lists
set ProjectList [OMBLIST PROJECTS];
foreach ProjectName $ProjectList {
OMBCC '$ProjectName';
file mkdir $RootDir$ProjectName
set ModuleList [OMBLIST ORACLE_MODULES];
foreach ModuleName $ModuleList {
OMBCC '$ModuleName';
file mkdir [concat "$RootDir$ProjectName\\$ModuleName"];
set plural "S"
set ObjectList [list TABLE MAPPING FUNCTION PROCEDURE TABLE_FUNCTION PACKAGE DATA_AUDITOR DIMENSION CUBE EXTERNAL_TABLE VIEW MATERIALIZED_VIEW SEQUENCE]
foreach ObjectName $ObjectList {
set workListName [concat $ObjectName$plural];
set workList [OMBLIST $workListName];
foreach workName $workList {
set outputFileName [string map {\\ /} [concat "$RootDir$ProjectName\\$ModuleName\\Validation$ObjectName$plural.txt"]]
set isValid [OMBVALIDATE $ObjectName '$workName' OUTPUT VALIDATION_RESULT TO FILE '$outputFileName' WRITE ALL]
puts $chan "$ProjectName - $ModuleName - $ObjectName - '$workName' - $isValid"
};
};
OMBCC '..';
};
set ModuleList [OMBLIST FLAT_FILE_MODULES];
foreach ModuleName $ModuleList {
OMBCC '$ModuleName';
file mkdir [concat "$RootDir$ProjectName\\$ModuleName"]
set plural "S"
set ObjectList [list FLAT_FILE]
foreach ObjectName $ObjectList {
set workListName [concat $ObjectName$plural];
set workList [OMBLIST $workListName];
foreach workName $workList {
set outputFileName [string map {\\ /} [concat "$RootDir$ProjectName\\$ModuleName\\Validation$ObjectName$plural.txt"]]
set isValid [OMBVALIDATE $ObjectName '$workName' OUTPUT VALIDATION_RESULT TO FILE '$outputFileName' WRITE ALL]
puts $chan "$ProjectName - $ModuleName - $ObjectName - '$workName' - $isValid"
};
};
OMBCC '..';
};
set ModuleList [OMBLIST CONFIGURATIONS];
foreach ModuleName $ModuleList {
file mkdir [concat "$RootDir$ProjectName\\$ModuleName"]
set outputFileName [string map {\\ /} [concat "$RootDir$ProjectName\\$ModuleName\\ValidationConfiguration.txt"]]
set isValid [OMBVALIDATE CONFIGURATION '$ModuleName' OUTPUT VALIDATION_RESULT TO FILE '$outputFileName' WRITE ALL]
puts $chan "$ProjectName - Configurations - $ModuleName - $isValid"
}
OMBREVERT;
OMBCC '..';
};
close $chan;
No comments:
Post a Comment