Installation procedure

Home Up Install  On Cygwin smenu_install_GD

 

horizontal rule

  1. Smenu Installation procedure
  2. Maintenance 
    1. How to add Shortcuts 
    2. Automated connections
    3. Default user and customized default user
  3. How to create new shortcuts
  4. How to add Smenu to your environment
  5. use Smenu against remote DB
  6. Troubleshooting after update Smenu
  7. Modify default parameters

 

Smenu Installation procedure 

Connect as user Oracle (Or the owner of the DB)
Copy the file "smenu_tar10g.tar" in the directory  you intend for smenu (the Installation process will create the directory 'smenu').


      tar xvf ./smenu_tar10g.tar


This create a directory ./smenu, and 3 files : 

-install.sh
-README.txt
-addpar.tail.

Here is the content of your directory after the tar xvf :

test_dev:/tmp/tt> ls -l 

total 2732
-rw-r--r--   1 oracle   dba         5739 Oct 26 21:40 addpar.tail
-rwxr-xr-x   1 oracle   dba         1757 Oct 26 21:40 install.sh
drwxrwxrwx   9 oracle   dba          512 Oct 26 21:40 smenu
-rw-r--r--   1 oracle   dba      1054720 Oct 26 21:40 smenu_tar



  Now to customize your installation, type : sh install.sh

 

      Installation customized !

      To launch Smenu, type :

        if your . is in your path
        --------------------------

            cd smenu
            . ad
            sm        (if you are in ksh)                     
            or
            smenu.sh  (if you are in sh )


            if your . is not in your path
            -----------------------------

            cd ./smenu
            . ./ad
            ./sm   (if you are in ksh)
            or
            smenu.sh  (if you are in sh )

test_dev:/tmp/tt> 

                
Change directory to ./smenu and launch smenu.

 

Maintenance 

How to add Shortcuts :

    The shortcuts are used on the dot prompt. This is an alternate way of using Smenu. to add the shortcuts in your environment, exit Smenu, go to your SBIN directory, and just type ". ad" ( or . ./ad). Shortcuts works only in ksh.

The SBIN directory is the root directory where Smenu is installed

 Automated connection :

    Each time you launch a command or call a Shellscript that requires to connect to the Oracle DB, you must provide an Oracle account and a password. If you don't want to type the same user/password again and again, Smenu gives you the ability to save this information.

In order to save this information, launch Smenu (type 'sm' or smenu.sh in SBIN ) and go to module 1 option 2 to add a user and a password. Some shortcuts works only with the user 'SYS', but usualy they works using the default user of your SID.

Default user and customized default user:

    Smenu use a general default user (Defined in SM/1.1 and stored in SBIN/smenu.env). This user will be retrieved automatically by Smenu whenever it must connect to a DB. However, there are 4 exceptions to this rule :

     The command you launch requires Smenu to use 'SYS'. If SYS is not defined then the command failed to execute Any command that uses 'sqlplus / as sysdba' is executed whatever you set or not in you password file. (If you want to access a remote DB with SQL*Net, we recommend that you position the oraenv in this SID, even if it does not exists on this machine.) Smenu leaves you the ability to override the default user for each instance. Then for each program of Smenu you call, it will first try to fetch the default user for the corresponding ORACLE_SID. Thus it is important to position yourself in a target SID. Use 'oa' which is a nice and handy redefinition of the 'oraenv'.

This option is available in Smenu/1.3.

   Date           : 24/07-13:24         Host  : test_dvl
   Oracle SID     : DEV                 menu  : sm/1.3
   
   *************************************************************
   *                                                           *
   *       Maintain/defined a default user for each sid        *
   *                                                           *
   *************************************************************

                  Sid             Default User
               -----------   -----------------------
            1  : TEST             bibi         
            2  : DEV              bpa            
            3  : TEST_DVL         zz151            
            4  : SAPDEV           system         
 
 
 
         (n)d : Append d to row selection to remove it.
         a    : add
         e    : exit
 
   Selection ==>

 

How to create new shortcuts :

     It is possible to add your own shortcuts : type 'vp' to edit addpar.sh (in SBIN/scripts), add the shortcuts in one of the 4 sections. Any shortcuts before 'sec3' is not visible by any 'sp' (show parameter) commands. However it will be part of your environment. if you add a shortcuts after 'sec3' then run 'rgs' to regen the sp views.

Be aware that your own shortcuts will be lost when you update release, so we advise you to keep a separate copy of 'addpar.sh' and reinitialize after each refresh.

 

How to add Smenu to your environment

     If you don't want to put 'addpar.sh' (ad) in your environment, you may do the following to add quickly smenu just for you :
Add in you oracle (or what else is the owner of the DB) an alias called smd :

    alias smd='cd /$SBIN'

Where sbin is the Smenu root directory, and  next : '. ad'

It is worth consider making a symlink to addpar.sh or to 'ad' and type ". {mysymlink}

Use Smenu toward remote DB

The best way to achieve this, is to add a dummy entry in your oratab (so that you can use 'oa' to switch). Add the sid in the tnsnames.ora on your local machine and set the password for the remote user in the form <passwd@<TNS_ENTRY> . This feature is very interesting to manage NT SID as if they were on Unix box or to setup a central Unix box. 

Troubleshooting after refresh smenu
   
If you want to install latest version of Smenu without loosing your current setting, you may run 'SBINS/refresh.sh'. This script suppose that you have a new version of Smenu, gzipped or not, in SBIN/.. After the operation you must type 'ad' to add all new shortcuts (refresh.sh automatically regen all shortcuts).

Verify that the first line of smenu.env is '#!/bin/ksh
Otherwise your problem lies in $SBINS/addpar.sh. edit this file and verify that 'SBIN=' is pointing to your path.

 Modify default parameters

Smenu does not provide a crypting function for password. If you have a crypting function in user, you must edit and replace the function 'smenu_get_passwd' in directory './smenu/scripts' with your own function or call.

'install.sh' create a file 'smenu.env' in the SBIN [./smenu] directory.
Here is the content of this file :

test_dev:/tmp/tt> cat ./smenu/smenu.env

#----------------------------------------------------------------
# Update the following variables :
#
#       - /tmp/tt/smenu
#
# Optional : GET_PASSWD
# SBIN is the directory where you put smenu.sh.
# for Sun solaris, TR should be set to UCB
SBIN=/tmp/tt/smenu
SBINS=/tmp/tt/smenu/scripts
S_USER=system
NAWK=/usr/bin/awk
USER=SYSTEM
HOST=test_dev
MAIL_PRG=mailx
MAIL_DEF_LIST=/tmp/tt/smenu/module4/.mail_def_list.txt
GET_PASSWD=/tmp/tt/smenu/scripts/smenu_get_passwd
VERSION=4.10.05
COMPRESS_PRG=gzip


export SBIN USER NAWK SBINS HOST MAIL_PRG MAIL_DEF_LIST 
       GET_PASSWD


 

Email: bpolarsk@yahoo.com Last Update : 20-November-2005