Wednesday, February 8, 2012

OMB Set Tablespaces

############################################################
#                                                          #
# Set Tablespace OWB TABLES                                #
#                                                          #
# (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 projectList [list ********];

foreach project $projectList {
    OMBCC '$project';
    set moduleList [OMBLIST ORACLE_MODULES];
    puts $moduleList;
    foreach module $moduleList {
        OMBCC '$module'
        set tableList [OMBLIST TABLES];
        foreach table $tableList {
        set alterTableCommand [OMBALTER TABLE '$table' SET PROPERTIES (TABLESPACE) VALUES ('USERS')];
        puts alterTableCommand;
        };
        puts $tableList;
        OMBCC '..';
    };
   
    OMBCC '..';
}

OMBCOMMIT;
OMBDISCONNECT;

File can be found here:

https://sites.google.com/site/filesof101/omb101/OMB_CHANGE_LOCATION.tcl?attredirects=0&d=1

Till Next Time

No comments:

Post a Comment