############################################################
# #
# Change Location Properties #
# #
# (C) Ciber Nederland John Minkjan #
# http:\\OMB101.blogspot.com #
# V001 Init Version #
# V002 Validated against OWB11gR2 #
# #
############################################################
# use connection file
source C:\\OMB_CONNECT.tcl
# Switch ON Prompt
set OMBPROMPT ON;
set LocationList [OMBLIST LOCATIONS];
foreach Location $LocationList {
if [catch {
set GetLocationType [OMBRETRIEVE LOCATION '$Location' GET PROPERTIES (CONNECTION_TYPE)];
} errmsg] { set GetLocationType 'UNKNOWN'};
if {$GetLocationType == "HOST:PORT:SERVICE"} {
if {$Location != "OWB_REPOSITORY_LOCATION"} {
set alterLocationCommand [OMBALTER LOCATION '$Location' SET PROPERTIES (HOST) VALUES ('HOSTNAME')];
set alterLocationCommand [OMBALTER LOCATION '$Location' SET PROPERTIES (PORT) VALUES ('1521')];
set alterLocationCommand [OMBALTER LOCATION '$Location' SET PROPERTIES (SERVICE_NAME) VALUES ('DWH_POC')];
set alterLocationCommand [OMBALTER LOCATION '$Location' SET PROPERTIES (VERSION) VALUES ('11.2')];
set alterLocationCommand [OMBALTER LOCATION '$Location' SET PROPERTIES (USER_NAME) VALUES ('$Location')];
set alterLocationCommand [OMBALTER LOCATION '$Location' SET PROPERTIES (PASSWORD) VALUES ('********')];
# PASSWORD isn't always accepted, has to be checked manualy
OMBCOMMIT;
}
};
};
OMBCOMMIT;
OMBDISCONNECT;
Fill can be downloaded here: https://sites.google.com/site/filesof101/omb101/OMB_CHANGE_LOCATION.tcl?attredirects=0&d=1
Till Next Time
No comments:
Post a Comment