DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: How to set Environment Variable from sqlplus

  1. #1
    Join Date
    Feb 2000
    Location
    Philadelphia, PA 19102
    Posts
    8

    How to set Environment Variable from sqlplus

    Hi Everyone,
    Can anyone please let me know how to set Environment variable from SQLPLUS .... or

    tell me how to suppress Connected. message when using
    connect / as sysoper
    and also
    supress the following messages when supplying value for bind variable
    old 1: select to_char
    new 1: select to_char


    I have tried to set heading off echo off feedback off

    ...
    ..
    .

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    sqlplus -s invokes "silent" mode.

    "set verify off" hides the old/new
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Any sql commends that you put in C:\oracle\ora92\sqlplus\admin\glogin.sql get run everytime you startup sqlplus. So if you want to set any environment variables, then put them here.

  4. #4
    Join Date
    May 2002
    Posts
    2,645
    Oracle will also look in the starting directory (where you launch SQL*Plus) for login.sql. As mentioned, you can set global login parameters in glogin.sql. When you start SQL*Plus, the environment variables that were in existence when you started stay in existence for that window. You can host out (>! UNIX command or >host UNIX command or simply >host) to do something in your shell window. However, you cannot effect a change with respect to environment variables in your SQL*Plus session.

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by stecal
    Oracle will also look in the starting directory (where you launch SQL*Plus) for login.sql.
    If we want to be 100% correct, we'd say "sqlplus looks for login.sql in your $SQLPATH".
    Last edited by marist89; 10-31-2002 at 02:42 PM.
    Jeff Hunter

  6. #6
    Join Date
    May 2002
    Posts
    2,645
    Originally posted by marist89
    If we want to be 100% correct, we'd say "sqlplus looks for .login in your $SQLPATH".
    If login.sql is in the directory where you invoke the command, it will run, and that is without setting the SQLPATH variable. If you want login.sql to run from anywhere, SQLPATH variable, like the PATH variable, will do the trick.

  7. #7
    Join Date
    Feb 2000
    Location
    Philadelphia, PA 19102
    Posts
    8
    Originally posted by slimdave
    sqlplus -s invokes "silent" mode.

    "set verify off" hides the old/new
    Hi thanks for the verify tip ... I was using -s to invoke silent mode, but still get the Connected. message

Posting Permissions

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


Click Here to Expand Forum to Full Width