Re: Oracle SQLDBA
From: Jeff Stander <jstander_at_ml.csiro.au>
Date: Mon, 27 Dec 1993 02:10:47 GMT
Message-ID: <1993Dec27.021047.21363_at_ml.csiro.au>
Date: Mon, 27 Dec 1993 02:10:47 GMT
Message-ID: <1993Dec27.021047.21363_at_ml.csiro.au>
In article 14454_at_mlb.semi.harris.com, jatkinso_at_dw3sj.ess.harris.com (Gerald Atkinson) writes:
>
>Could someone please provide the options (environment variable setting,...)
> necessary to use the menu features of
>the SQLDBA program via a mouse. I am running the program on a Sparc 10 under
>SunOS 4.1.3 using Motif.
>
>Thanks
>Jerry Atkinson
I use the following PERL script to run SQLDBA in an xterm window on our Sun Sparc10.
--- ___________________________________________________________________________ Jeff.Stander_at_ml.csiro.au _--_|\ Database Analyst CSIRO Division Of Fisheries / \ Pelagic Fisheries Resources GPO Box 1538, Hobart \_.--._/ Tasmania 7001, Australia Aus Tel: 002-325-332 v Intl Tel: +61-02-325-332 Aus Fax: 002-325-000 Intl Fax: +61-02-325-000 ___________________________________________________________________________ #!/usr/local/bin/perl # _at_(#) runsqldba : calls sqldba in an Xterm window # _at_(#) SunOS deep sun4c (jstander) # _at_(#) $Revision 1.0 $ (jstander 01.07.93): new # synopsis: # runsqldba [ nsu_user ] # description: # Run SQL*DBA in an xterm window. # NSU to the user name given in the optional argument before executing. $run = "sqldba"; $host = $ENV{'HOST'}; $orahost = $ENV{'ORACLE_HOST'} || deep; if ( $host !~ /$orahost/ ) { print STDERR "Oracle not available from $host. You must be logged into $orahost\n"; exit; } require "getopts.pl"; &Getopts('l'); $LMODE="LMODE=Y" if $opt_l; if ( $#ARGV == 0 ) { $Nsu_user = $ARGV[0]; } else { $Nsu_user = $ENV{'USER'}; } #------------------------------------------------------------------------------ # If on Sun, open db in xterm window #------------------------------------------------------------------------------ if ( $ENV{'TERM'} =~ /sun-cmd/ ) { $ENV{'ORACLE_TERM'} = "xsun"; $ENV{'TK2DEV'} = "xsun"; $cmd="cd $dir; /usr/local/bin/X11/xterm -sf " . " -cr gold " . " -fg white -bg red " . "-fn '8x16' " . "-132 " . "-T \"SQL*DBA\" " . "-n \"SQL*DBA\" " . "-e $run $LMODE &"; } else { $cmd = "cd $dir; source /home/tuna/.setprompt; $run "; } #------------------------------------------------------------------------------ # Use 'nsu' to log on to database to if not already logged on #------------------------------------------------------------------------------ if ( $ENV{'USER'} !~ /$Nsu_user/ ) { exec ("/usr/etc/nsu $Nsu_user -c '$cmd'"); die "exec failure"; } exec ($cmd);Received on Mon Dec 27 1993 - 03:10:47 CET