|
|
|
Smenu Installation procedureConnect as user Oracle (Or the owner of the DB)
Change directory to ./smenu and launch smenu. Maintenance 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 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'.
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 : It is worth consider making a symlink to addpar.sh or to 'ad' and type ". {mysymlink} 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 smenuIf 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 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.
Email: bpolarsk@yahoo.com Last Update : 20-November-2005 |