2 Replies Latest reply on Jan 23, 2019 2:25 PM by daniel_hauke

    Default Login in SQLCL

    2980262

      Hi All,

       

      When I login in sqlcl i have to type user name and password every time. Please let me know if there's any short way of login or auto login when I run sql command in command prompt.

        • 1. Re: Default Login in SQLCL
          Gaz in Oz

          ...who are you logging into sqlcl as?

          are you actually logging in to a database using sqlcl as the client front end?

           

          To access sqlcl without logging in to a database you can

             sql /nolog

          You can then login to a database with

             connect user/password@database

          To get sqlcl options

             sql -h

          You can use various means of supplying credentials:

          . Set up envronment variables to set up the database environment you want to login to via login script or shell script

          . Use OS authentication

          . Use Oracle Wallet

          . Using a shell script that has the login credentials hard coded - MAJOR SECURITY RISK.

           

          With OS authentication or Wallet you would be able to login using the "/"

             sql /

             sql /@db

           

          Please read this for options:

          https://docs.oracle.com/en/database/oracle/oracle-database/18/dbseg/index.html

          • 2. Re: Default Login in SQLCL
            daniel_hauke

            Hi,

             

            if you want to login as sysdba you can use sql / as sysdba.

            But keep in mind that you have to set your oracle_sid properly before using this command. And your OS User which is executing this command should be a member of the dba group (on linux) or the ORA_DBA group (on windows).

             

            Greetings Daniel