#########################################################################################################
# #
# COMPILE OWB Repository #
# #
# Get the Repository documentation #
# Output is written to file in RootDir #
# #
# (C) Ciber Nederland John Minkjan OMB101.blogspot.com #
# V001 Init Version #
# V002 Validated against OWB11gR2 #
# #
#########################################################################################################
#OMBCONNECT rep_owner/rep_owner@localhost:1521:orcl USE WORKSPACE 'My_Workspace'
#set OMBPROMPT ON
# RootDir
set RootDir "C:\\temp\\"
set ProjectList [OMBLIST PROJECTS];
foreach ProjectName $ProjectList {
if {$ProjectName != "PUBLIC_PROJECT"} {
set chan [open [string map {\\ /} "$RootDir\\ProjectSummery_$ProjectName.txt"] w];
set timestamp [clock format [clock seconds]];
puts $chan "Project Summery: $ProjectName Run: $timestamp";
puts $chan "";
set ProjectDescription [OMBRETRIEVE PROJECT '$ProjectName' GET PROPERTIES (DESCRIPTION)];
puts $chan "Project Description: $ProjectDescription";
OMBCC '$ProjectName';
puts $chan "";
puts $chan "$ProjectName: ORACLE_MODULES";
puts $chan "";
set ModuleList [OMBLIST ORACLE_MODULES];
foreach ModuleName $ModuleList {
OMBCC '$ModuleName';
set plural "S"
set ObjectList [list MAPPING DATA_AUDITOR DIMENSION CUBE TABLE EXTERNAL_TABLE VIEW MATERIALIZED_VIEW SEQUENCE FUNCTION PROCEDURE TABLE_FUNCTION PACKAGE]
foreach ObjectName $ObjectList {
set workListName [concat $ObjectName$plural];
set workList [OMBLIST $workListName];
foreach workName $workList {
set ProjectDescription [OMBRETRIEVE $ObjectName '$workName' GET PROPERTIES (DESCRIPTION)]
puts "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
puts $chan "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
}
;
};
OMBCC '..';
};
puts $chan "";
puts $chan "$ProjectName: FLAT_FILE_MODULES";
puts $chan "";
set ModuleList [OMBLIST FLAT_FILE_MODULES];
foreach ModuleName $ModuleList {
OMBCC '$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 ProjectDescription [OMBRETRIEVE $ObjectName '$workName' GET PROPERTIES (DESCRIPTION)]
puts "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
puts $chan "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
};
};
OMBCC '..';
};
puts $chan "";
puts $chan "$ProjectName: PROCESS_FLOW_MODULES";
puts $chan "";
set ModuleList [OMBLIST PROCESS_FLOW_MODULES]
puts $ModuleList
foreach ModuleName $ModuleList {
puts $ModuleName
OMBCC '$ModuleName';
set plural "S"
set ObjectList [list PROCESS_FLOW_PACKAGE]
foreach ObjectName $ObjectList {
set workListName [concat $ObjectName$plural];
set workList [OMBLIST $workListName];
foreach workName $workList {
set ProjectDescription [OMBRETRIEVE $ObjectName '$workName' GET PROPERTIES (DESCRIPTION)]
puts "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
puts $chan "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
};
};
OMBCC '..';
};
puts $chan "";
puts $chan "$ProjectName: CALENDAR_MODULES";
puts $chan "";
set ModuleList [OMBLIST CALENDAR_MODULES]
foreach ModuleName $ModuleList {
OMBCC '$ModuleName';
set plural "S"
set ObjectList [list CALENDAR]
foreach ObjectName $ObjectList {
set workListName [concat $ObjectName$plural];
set workList [OMBLIST $workListName];
foreach workName $workList {
set ProjectDescription [OMBRETRIEVE $ObjectName '$workName' GET PROPERTIES (DESCRIPTION)]
puts "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
puts $chan "$ProjectName - $ModuleName - $ObjectName - '$workName' - $ProjectDescription"
};
};
OMBCC '..';
};
puts $chan "";
puts $chan "$ProjectName: CONFIGURATIONS";
puts $chan "";
set ModuleList [OMBLIST CONFIGURATIONS];
foreach ModuleName $ModuleList {
set ProjectDescription [OMBRETRIEVE CONFIGURATION '$ModuleName' GET PROPERTIES (DESCRIPTION)]
puts "$ProjectName - $ModuleName - $ProjectDescription"
puts $chan "$ProjectName - $ModuleName - $ProjectDescription"
};
OMBCC '..';
close $chan;
}
}
A Collection of all my OMB+ / tcl scripts to manage my OWB (Oracle Warehouse Builder) stuff
Friday, November 11, 2011
Wednesday, November 9, 2011
OMB VALIDATE Without Deploy
#########################################################################################################
# #
# 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;
# #
# 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;
EXPORT Project MDL
# Connection to Workspace
# OMBCONNECT rep_owner/rep_owner@localhost:1521:orcl USE WORKSPACE 'My_Workspace'
# show the prompt
# set OMBPROMPT ON
# List Projects
#
# (c) Ciber Nederland John Minkjan
# V001 Validated against OWB11gR2
#
set RootDir "C:\\temp\\"
set projectList [OMBLIST PROJECTS];
foreach projectName $projectList {
OMBCC '$projectName';
file mkdir $RootDir$projectName
puts "exporting $projectName to MDL file"
set exportFileName [string map {\\ /} [concat "$RootDir$projectName\\$projectName.mdl"]]
set exportFileLogName [string map {\\ /} [concat "$RootDir$projectName\\$projectName.log"]]
OMBEXPORT MDL_FILE '$exportFileName' FROM PROJECT '$projectName' OUTPUT LOG TO '$exportFileLogName'
OMBCC '..';
};
# OMBCONNECT rep_owner/rep_owner@localhost:1521:orcl USE WORKSPACE 'My_Workspace'
# show the prompt
# set OMBPROMPT ON
# List Projects
#
# (c) Ciber Nederland John Minkjan
# V001 Validated against OWB11gR2
#
set RootDir "C:\\temp\\"
set projectList [OMBLIST PROJECTS];
foreach projectName $projectList {
OMBCC '$projectName';
file mkdir $RootDir$projectName
puts "exporting $projectName to MDL file"
set exportFileName [string map {\\ /} [concat "$RootDir$projectName\\$projectName.mdl"]]
set exportFileLogName [string map {\\ /} [concat "$RootDir$projectName\\$projectName.log"]]
OMBEXPORT MDL_FILE '$exportFileName' FROM PROJECT '$projectName' OUTPUT LOG TO '$exportFileLogName'
OMBCC '..';
};
Welcome to OMB101
Welcome to OMB101
I will devote this blog to my travels on the OWB / OMB+ scripting tool path.
Till Next Time
I will devote this blog to my travels on the OWB / OMB+ scripting tool path.
Till Next Time
Subscribe to:
Posts (Atom)