Forum Stats

  • 3,734,162 Users
  • 2,246,899 Discussions
  • 7,857,143 Comments

Discussions

Default Login in SQLCL

User_ZUUOD
User_ZUUOD Member Posts: 795 Bronze Badge
edited Jan 23, 2019 9:25AM in SQLcl

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.

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,776 Bronze Crown
    edited Jan 7, 2019 9:08PM

    ...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/[email protected]

    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

  • daniel_hauke
    daniel_hauke Member Posts: 211 Bronze Badge
    edited Jan 23, 2019 9:25AM

    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

Sign In or Register to comment.