DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: cannot connect as sys

  1. #1
    Join Date
    May 2002
    Posts
    193

    cannot connect as sys

    Dear Sir,

    Could anyone point out the reason for the errors that I get:

    SQL> sho user
    user is "DCBL"
    SQL> connect sys/change_on_install@dcbl as sysdba
    ERROR:
    ORA-12154: TNS:could not resolve service name


    Warning: You are no longer connected to ORACLE.
    SQL> connect dcbl/dcbl@dcbl
    Connected.


    You can see that Iam not able to connect as sysdba but as user DCBL for the same service. This happens while trying to connect through SQLPLUS on my PC(Windows).

    When I do it through telnet, I get the same error:

    SQL> connect dcbl/dcbl@dcbl
    ERROR:
    ORA-12154: TNS:could not resolve service name


    Warning: You are no longer connected to ORACLE.



    But through telnet I cannot connect even as the user DCBL as I did so in the previous case.


    Could anyone throw some light on this.

    Regards,

    K.Diwakar

  2. #2
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hi, look here ...

    SQL*Plus: Release 9.2.0.2.0 - Production on Wed Mar 19 09:14:10 2003

    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

    Enter user-name: system/manager

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.2.0 - Production

    SQL> connect sys@db1.win as sysdba
    Enter password:
    Connected.
    SQL>


    the diff is that i entered the pwd later.
    Orca



  3. #3
    Join Date
    Sep 2000
    Location
    Chennai, India
    Posts
    865

    Re: cannot connect as sys

    Originally posted by diwakar

    When I do it through telnet, I get the same error:

    SQL> connect dcbl/dcbl@dcbl
    ERROR:
    ORA-12154: TNS:could not resolve service name


    Warning: You are no longer connected to ORACLE.

    When you telnet to the box hosting the database, you need not give the connect string (provided you have only one service on the box).

    Just give...

    connect dcbl/dcbl


    HTH.

  4. #4
    Join Date
    May 2002
    Posts
    193
    Dear Sir,
    Even your option had been tried before and the output is as follows:


    SQL> connect sys@dcbl as sysdba
    Enter password:
    Connected to an idle instance.
    SQL> select * from v$instance;
    select * from v$instance
    *
    ERROR at line 1:
    ORA-01012: not logged on


    SQL>


    So how to go about from this point??

    Regards,

    K.Diwakar

  5. #5
    Join Date
    Sep 2000
    Location
    Chennai, India
    Posts
    865
    Originally posted by diwakar
    SQL> connect sys@dcbl as sysdba
    Enter password:
    Connected to an idle instance.
    Give ...

    startup

    HTH.

  6. #6
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Originally posted by diwakar
    Dear Sir,
    Even your option had been tried before and the output is as follows:


    SQL> connect sys@dcbl as sysdba
    Enter password:
    Connected to an idle instance.
    SQL> select * from v$instance;
    select * from v$instance
    *
    ERROR at line 1:
    ORA-01012: not logged on


    SQL>


    So how to go about from this point??

    Regards,

    K.Diwakar
    Your connected to an idle instance, start the DB before you select from DD views.

    HTH
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  7. #7
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hi,
    First : thank you for your politness but just call me ORCA;

    Second : TELNET
    It could be that telnet starts another shell then your local unix-console. due to this the environment for oracle could be unkown, so be sure that your oracle-environment is the same via local or telnet-session!

    on unix-shell :
    Code:
     set | grep -i oracle
    Orca



  8. #8
    Join Date
    Sep 2000
    Posts
    305
    check the service name "dcbl" again
    c:\> tnsping dcbl and see wheather it is working or not?


    Shailendra

  9. #9
    Join Date
    May 2002
    Posts
    108

    Check your client connect string !

    Diwakar,

    Through telnet getting connected to an idle instance via SYS means, your DB is not started yet. Pls check if the connect string 'dbcl' in the client is pointing to the right database. If the instance has not been started, you can in no way get connected from a client as connect dcbl/dcbl@dcbl


    - Nandu
    Never give up !

    Nanda Kumar - Vellore

  10. #10
    Join Date
    May 2002
    Posts
    193
    Mr Jovery,

    I think you have not read the previous section of my post. I have clearly stated that Iam able to login as user DCBL which means that the database is up.

    Iam not able to connect as any user through telnet, able to connect as user DCBL through SQLPLUS directly.

    Dear Orca777,

    Iam pasting the output of the command: set | grep -i oracle
    What I could infer from this is that the SID is OASIS and not DCBL. But I have given the command: export oracle_sid=dcbl. But this is of no use. I have little knowledge on UNIX. Pls advice me on the same :


    $ set | grep -i oracle
    IST_DBUSED=oracle
    LD_LIBRARY_PATH=/oasis/ist73/lib:/oracle/oracle9/app/oracle/product/9.0.1/lib:/u
    sr/openbin/lib:/oasis/ist73/lib:/usr/devlpr/ist/lib:
    ORACLE_BASE=/oracle/oracle9
    ORACLE_HOME=/oracle/oracle9/app/oracle/product/9.0.1
    ORACLE_SID=oasis
    PATH=/oasis/ist73/ositeroot/bin:/usr/local/bin:/opt/SUNWspro/bin:.:/oasis/ist73/
    bin:.:/bin:/etc:/usr/bin:/usr/sbin:/opt/rsc/bin:/usr/ccs/bin:/usr/ucb:/oracle/or
    acle9/app/oracle/product/9.0.1/bin:/oracle/oracle9/app/oracle/product/9.0.1/lib:
    /usr/openwin/bin:/usr/dt/bin:/oasis/ist73/bin:/oasis/ist73/lib:/oasis/ist73/form
    s:/oasis/ist73/sql:/usr/4lib:/oasis/ist73:/usr/local/bin:/oasis/ist73/ositeroot/
    bin:/oasis/ist73/ositeroot/cfg:/usr/sbin:/opt/SUNWspro/bin:/usr/bin:
    _=oracle_sid=oasis
    oracle_sid=oasis
    $



    Regards,

    K.Diwakar

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