Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7912125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:30:46+00:00 2026-06-03T13:30:46+00:00

I was wondering how sqlplus takes the username and password in connect statement sqlplus

  • 0

I was wondering how sqlplus takes the username and password in connect statement “sqlplus /”.

How can I change the configuration if i want to connect with “sqlplus /” with different user. It Might seems awkward but in my script “sqlplus /” is harcoded and we cannot change this. Just I want to connect with different user using same command.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:30:47+00:00Added an answer on June 3, 2026 at 1:30 pm

    From the Oracle documentation:

    /

    Represents a default logon using operating system authentication. In a default logon, SQL*Plus typically attempts to log you in using the username OPS$name, where name is your operating system username. Note that the prefix "OPS$" can be set to any other string of text.

    For example, you may wish to change the settings in your INIT.ORA parameters file to LOGONname or USERIDname. See the Oracle9i Database Administrator’s Guide for information about operating system authentication.

    So it uses your operating system details to construct your Oracle user name, meaning that you probably can’t set an arbitrary name.

    The Oracle initialisation parameter for specifying the prefix is OS_AUTHENT_PREFIX and its default value id OPS$.

    One thing you could do, if you cannot change the script which calls sqlplus, is to insert your own sqlplus script in the path before the Oracle one, along the lines of (not thoroughly tested):

    #!/bin/bash
    if [[ "$1" != "/" ]] ; then
        $ORACLE_HOME/bin/sqlplus "$@"
        exit
    fi
    shift
    $ORACLE_HOME/bin/sqlplus $MY_ORA_USER/$MY_ORA_PWD "$@"
    

    This would then be the one called by your script and it would check the first parameter to see if it was the simple /. If not, it would call the real sqlplus with the same parameters.

    Otherwise, it would replace the / with a user/password formed from the MY_ORA_* environment variables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wondering if I can conditionally concatenate LINQ query results from 4 different fields in
Wondering if anyone can suggest a good file replication tool that will replicate across
Wondering if I can speed up the search. I need to build a functionality
wondering how I can replace all special chars on my string like: hello this
Wondering if it's possible to change a value returned from a queryset before sending
Is it possible to do something like this? $ sqlplus -s user/pass select 1
Wondering if someone can tell me why this regular expression doesn't work. Expression ->
Wondering if anyone can help me. I'm trying to put together a weekly photo
Wondering if anyone can help me with this annoying but trivial (in terms of
Wondering what a continue statement does in a do...while(false) loop, I mocked up a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.