Humble Trader

Monday, February 13, 2006

Create Warehouse Linux Infrastructure

Introduction:

This procedure is to create some Linux accounts and directories that will be used for managing and running the warehouse.

    Aim:

    Set up Linux-side maintenance accounts:
    • dwmgr - Data Warehouse Manager:
      • This account holds the Linux-side code library and is used to manage the Warehouse.
    • dwoper - Data Warehouse Operator:
      • This account carries out day-to-day Warehouse maintenance.
    Directories:
    • /u01
      • dw
        • code
          • ctl - Control schema scripts.
          • ods - ODS schema scripts.
          • sta - Staging schema scripts.
          • val - Validation schema scripts.
          • whs - Warehouse schema scripts.
          • lib - Library scripts.
        • data
          • landing - Where files first arrive.
          • staging - Where files are loaded to.
          • processed - Where files are stored after processing - the file archive.
          • log - File processing logs.
            • ctl - SQL*LOADER control logs.
            • bad - SQL*LOADER bad files.
            • dsc - SQL*LOADER discard files.
            • log - General logs.
    Requirements:

    Linux is installed and configured.

    Procedure:
    • On the Linux desktop:
      • -Desktop-
      • -System Settings-
      • -Users and Groups-
      • Query:
        • Password for root: *********
      • User Manager:
        • [Add Group]
        • Create New Group:
          • Group Name: dw
          • [OK]
        • [Add User]
          • User Name: dwmgr
          • Full Name: Data Warehouse Manager
          • Password: *********
          • Confirm Password: *********
          • Create home directory
          • Home Directory: /home/dwmgr
          • [OK]
        • -dwmgr-
        • [Properties]
        • User Properties:
          • [Groups]
          • dw
          • dwmgr
          • Primary Group: dw
          • [OK]
        • [Add User]
          • User Name: dwoper
          • Full Name: Data Warehouse Operator
          • Password: *********
          • Confirm Password: *********
          • Create home directory
          • Home Directory: /home/dwoper
          • [OK]
        • -dwoper-
        • [Properties]
        • User Properties:
          • [Groups]
          • dw
          • dwoper
          • Primary Group: dw
          • [OK]
    • Open Terminal.
      • $ su - root
      • Password: *********
      • # cd /u01
      • # mkdir dw
      • # cd dw
      • # mkdir -p code/ctl
      • # mkdir -p code/ods
      • # mkdir -p code/sta
      • # mkdir -p code/val
      • # mkdir -p code/whs
      • # mkdir -p code/lib
      • # mkdir -p data/landing
      • # mkdir -p data/staging
      • # mkdir -p data/processed
      • # mkdir -p data/log/log
      • # mkdir -p data/log/ctl
      • # mkdir -p data/log/bad
      • # mkdir -p data/log/dsc
      • # cd ..
      • # chown -R dwmgr.dw dw
    • Edit both of the new user's .bash_profile file:
      • Open Terminal and log in as [new user].
      • $ vi .bash_profile
      • Add the following just below the line 'export PATH':
    # Warehouse paths:
    export DW_BASE=/u01/dw
    export DW_CODE=$DW_BASE/code
    export DW_CTL=$DW_CODE/ctl
    export DW_ODS=$DW_CODE/ods
    export DW_STA=$DW_CODE/sta
    export DW_VAL=$DW_CODE/val
    export DW_WHS=$DW_CODE/whs
    export DW_LIB=$DW_CODE/lib
    export DW_DATA=$DW_BASE/data
    export DW_LAND=$DW_DATA/landing
    export DW_STAG=$DW_DATA/staging
    export DW_PROC=$DW_DATA/processed
    export DW_LOGS=$DW_DATA/log
    export DW_LOG_LOG=$DW_LOGS/log
    export DW_CTL_LOG=$DW_LOGS/ctl
    export DW_BAD_LOG=$DW_LOGS/bad
    export DW_DSC_LOG=$DW_LOGS/dsc

    # Oracle definitions & locations.
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/10.2.0.1/db01
    export PATH=$PATH:$ORACLE_HOME/bin
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    export ORACLE_TERM=vt100
    export ORACLE_SID=`grep Y$ /etc/oratab | cut -d: -f1 | head -1`

    umask 022

    0 Comments:

    Post a Comment

    << Home