How to specify the instance in SQL * more command line?

Hello

I'm learning to Oracle. I currently have 2 instances of database running. I wanted to connect to one of the bodies and used the following command from the command line:
sqlplus system as sysdba/abc123@ocp11gsid

where 1234 is the password for the system user in the ocp11gsys instance.
When I run the command above, SQL * more ask me the password. I do not understand why he asks me the password because I provided on the command line.

What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)

Thank you for your help,

John.

John,

This is how it works.

E:\Documents and Settings\aristadba>sqlplus system/oracle as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:49:25 2010

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

And now it ask the password,

E:\Documents and Settings\aristadba>sqlplus system as sysdba/oracle

SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:50:42 2010

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

Spot the difference?

The user name and password must unite. What you are to provide the password with the role where it will not be considered.

Update
I missed that part,

What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)

The only thing that you can specify is the user name and password. The SID must be defined by you, either explicitly using the export or oraenv command if you are on the local system and do not use the TNS to connect to the instance. If you use the TNS, then an appropriate entry should be there which would connect to the required database.

HTH
Aman...

Published by: Aman... on August 2, 2010 22:54

Tags: Database

Similar Questions

  • How to change the languages of programming or command line

    How to change the languages of programming or command line?

    Everything you need to go through the control panal do. Click on tab "language". Its pretty self explainable there.

  • Database demo of vision: how to access the database through SQL * more?

    I'm totally new in this space, so forgive my beginner questions.

    What I want to do, is to integrate EBS with APEX. To get there I downloaded (of delivery) and installed the Vision database unique node in a VirtualBox. To do this, I followed this video on YouTube: https://www.youtube.com/watch?v=8JgxMDPsd6s

    Now I want to install APEX and for this I need to access my database as SYS. Now for my questions:

    1. How can I use SQL * more in the VirtualBox?

    2. What is the default password for SYS with this demo database?

    Thanks, Alex

    File under $ORACLE_HOME and the owner is the user 'oracle '.

    You will need to source the file VISION_ebs.env , and then deliver "env | fate"and you should see the set env variables. You can connect as sysdba.

    Thank you

    Hussein

  • How to see the result in sql * more

    Hello
    IAM running a procedure to sql * more...
    I put quite a few DBMS .put line-out inside the proc for purporse debugging
    before running, I said set serveroutput on;
    the procedure is done correctly, but I don't see any output

    It just displays the procedure completed successfully

    How can I see the output

    concerning
    REDA

    Hello reda,.

    You are absolutely sure that the procedure actually runs one of these DBMS_OUTPUTs, that is, you are sure that alternate paths through your procedure are not taken?

    To confirm, put a DBMS_OUTPUT at the very beginning of your procedure, to see if that print, which should be if you set serveroutput on it.

  • By specifying the container to connect with command line utilities (sqlplus/expdp etc.)

    Hello

    To inaugurate this forum I was play multitenant/pluggable has 12 c and I have a general question about connections to the database of the container - it is clear from what I've tried so far (and what I've read) there is no way to connect to a database from the container without using a sqlnet connection. For example:

    Export ORACLE_HOME, ORACLE_SID etc.

    sqlplus username/password - it can only connect to the database of the container? (once you are in you can alter the session to switch to the plugable database but cannot do so directly to the connection)

    to connect to a database that is connected is always through sqlnet

    sqlpus username/password@pluggable

    There is no option to say something like:

    export ORACLE_SID = container

    Export ORACLE_CONTAINER = pluggable

    and then do sqlplus username/password?

    additional command line switch or as

    export ORACLE_SID = container

    sqlplus-container = name of user and password pluggable

    This understanding is correct or have I missed something in the documentation?

    Kind regards

    Harry

    http://dbaharrison.blogspot.com


    Hello Richard,.

    In Oracle Multitenant, the only way to connect to a PDB file is by specifying a service.

    However, there's a shortcut you can use - TWO_TASK, you will find described elsewhere.

    This allows you to specify the default service to serve--think of it as being silently added to your specification by name of user and password. I hope this helps.

    Best regards, Patrick

  • How to generate the report object list of command line BACK under 10g

    In the past, under 6i. I was able to generate a list of object using IFCMP60report. How do I get 10g?

    Thank you

    I guess it works as it does under 6i with the difference that the forms compiler renamed in frmcmp

    So (not tested) is the setting of forms_doc ?

    And by the way: you can display all available command line and switches with

    frmcmp help=Y
    

    This has also worked in 6i (help ifcmp60 = Y)

    see you soon

  • SQL * more command line

    Hello, is there a way to run a SQL directly from the sqlplus command line? For example:

    sqlplus usr1/usr1@srv1 select sysdate double

    Thank you

    ~ David

    Another way in Windows:

    c:\>echo select * from dual; | sqlplus scott/tiger@test_db
    
    SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 25 14:41:17 2009
    
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    
    SQL>
    D
    -
    X
    
    SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    
    c:\>
    
  • How to access the disk HARD recovery from command line?

    Hello.

    I have a little trouble with my toshiba Satellite. My system crashed and I forgot to create the system recovery dvd.
    I can't access the "Toshiba HDD Recovery" when I start from another DVD Windows-7, but io accesses the recovery of HARD drive on drive D: with the command line. Is it possible to start the drive HARD recovery manually?

    Kind regards
    Marco

    I know something like this isn't possible.
    If you did not create a recovery disk and you cannot start the HDD recovery procedure, you can order the new Arvato recovery disk

  • How to understand the format of hyperic shell command line?

    I logged on the hyperic shell and I just wanted to check on the orders and their
    output.  Im having trouble understanding the syntax I do a list alert and get:

    alert list
    org.hyperic.util.shell.ShellCommandExecException: error getting alerts
    In undeclared throwable was: java.lang.ClassNotFoundException: org.hibernate
    .collection. PersistentBag (no security manager: RMI class loader disabled)

    When I use the "list alertdef" command it comes back with: ""
    list of alertdef <-group | -plate-forme | -Server | -service > < resource > [-activated |-disabled]

    Replace - platform with linux - say? or a particular computer Devils name
    what they are referring to with resource? is the agent HQ a resource?

    What is necessary and what is not. . Cant seen to get anything to work.
    An example of this command is all I need.

    You will see many orders with a syntax similar to the alertdef list.  You
    do not replace the '-' keywords with anything, it has the 
    that you would replace it.  The can be the ID of the
    resource (if you know it) or the name (use quotes if there is)
    (spaces).  For example, I can do:

    alertdef list - server 10001

    or

    list of alertdef - HQ Agent server 'hq.hyperic.com '.

    In addition, as shown in my example, the central administration Agent is indeed a resource.
    It is a server.

    Charles

  • How to specify the tablespace for a India primary key in create table statement

    How to specify the storage space for a primary key index in a create table statement?
    Does the following statement is true?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE, 
                "IP_ADDRESS" VARCHAR2(32 BYTE), 
                "EQUIPMENT_ID" VARCHAR2(32 BYTE), 
                "PACKET_DT" DATE, 
                "PACKET" VARCHAR2(255 BYTE), 
                "PACKET_FORMAT" VARCHAR2(32 BYTE), 
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP, 
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 )            
                 TABLESPACE "SBM_DATA";   
    Thank you

    Published by: qkc November 9, 2009 13:42

    As orafad noted, you can use the documentation using ESCALATION clause, i.e.

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
     10               )
     11*              TABLESPACE "USERS"
    SQL> /
    
    Table created.
    

    Justin

  • PAPI - how to retrieve the instance

    I have a puncture and assign him to all.

    If I use PAPI, how to recover the instance selected in a specified activity?

    The following code is used to get a list of activities.

    ActivityList activitylist = ActivityList.create ();
    activitylist = session.instanceGrabbableFrom (IST);

    The code below is used to get a list of instance
    InstanceInfoList instanceinfolist = InstanceInfoList.create ();
    instanceinfolist = session.activityGetGrabbableInstances ("shenheN" "" / GDHZdemoprocess #Default - 1.0 "");

    Use Constant field values, and how to use them?

    fuego.processmodel.Activity GRAB
    fuego.papi.ProcessInstanceState GRABBED

    Hello

    I use the following to the courts using PAPI

    InstanceInfo instanceInfo = papisession.processGetInstance (instanceId);
    Even InstanceActivityPairSet = InstanceActivityPairSet.create ();
    pairSet.add (instanceInfo);
    papisession.instancesGrab (even, "GrabActivityName");

    Here instanceId is the body which must be entered. It may currently be in any activity... My activity of Grab a grasp of all.
    GrabActivityName is the name of the activity of grab

    HTH

  • How to specify the custom application BB10 WebWorks category

    How to specify the custom in BB10 WebWorks app category. If tried, but it seems that this does not work for me. What shoul I do it.

    Hello.

    I think the element of config.xml standard tag would be the rim: category, as in the example of documentation:

    
    

    but it seems not be supported yet for BB10. You can ask a question to the github repo, I think that the BB10 Packer must be at the right place.

  • How to specify the 'static' or 'dynamic' text in Flash CS5?

    Hmmm. things have moved in the CS5 version! How to specify the text 'static' or 'dynamic '? Can't find the selection in the Properties palette.

    Thank you-

    Should be right at the top of the properties panel. First, make sure you select your text box. In addition, change TLF text in classic text.

  • How to specify the color for LR space?

    How to specify the color for LR space?

    chlonini said:

    How to specify the color for LR space?

    LR only uses the ProPhoto RGB color space. You cannot specify any other

    color space (work). When you export pictures, you can specify a

    different color space to convert. Or if you use an external editor.

    You can choose what color space to send to the external editor.

  • How to generate Trace files in SQL * more

    Hi friends,

    How to generate Trace files in SQL * more?

    I have no idea



    Thank you

    REDA

    http://www.orafaq.com/wiki/SQL_Trace

Maybe you are looking for