Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2004
    Posts
    545

    DBdumpscript UNIX global variables

    I have a HP Tru64 unix-box, running Sybase ASE 12.5.
    I'd like the databasedumps to run automaticly every night.
    Due to distribution of maintenancescripts on several server, I have one setenv.ini on every server, which sets all global, serverwide variables, such as servername, maintenanceuser and maintenancepassword.

    The other script, be it databasedump or dbcc-check or whatever, call this setenv.ini-script to fill all neccesary variables.

    Please take a look at the text below to see my problem.

    setenv.ini:
    $ cat setenv.ini
    #************************************************* **************
    #* *
    #* setenv.ini *
    #* *
    #* set environment variables for Sybase ASE *
    #* *
    #************************************************* **************

    SYB_SERVER=DB01 ; export SYB_SERVER
    SYB_MAINT_USR=maintenanceusr ; export SYB_MAINT_USR
    SYB_MAINT_PWD=maintenancepwd ; export SYB_MAINT_USR
    $
    parentscript:
    $ cat test2
    ###############################################
    #
    #
    ##############################################

    #
    # INIT
    #
    ./setenv.ini
    echo $SYB_SERVER
    echo CHECK
    echo $SYB_MAINT_USR
    $


    calling the scripts:
    $ test2

    CHECK

    $


    It seems like the parentscript doesn't inherit the values of the variables set in setenv.ini. Both script have full rwx-permissions, so that can;t be it I think.
    Please advise me!

    //edit: woops..I missed the Unix Shell Script-subforum...maybe this thread is better in place there..
    Last edited by Martijnvs; 05-24-04 at 09:08.
    I'm not crazy, I'm an aeroplane!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •