1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

SQL* PLUS Connection Problem

Discussion in 'General' started by pankaj25, Nov 3, 2009.

  1. pankaj25

    pankaj25 Active Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    80
    Hi,
    I m new to Oracle. When I installed Oracle on my system( Windows XP), a default database is created with named "Pankaj". I was using SQL * PLUS. Everything was working fine. I created one more DB named "test", using enterprise manager.
    After that when I tryied to run SQL * PLUS I got error message "Protocol Adapter error". For now i m using command prompt of windows. First I set ORACLE_SID to one of my DB and then run sql commands. Its working OK. But Still i m unable to use SQL*PLUS,
    due to error "Protocol Adapter Error". What should I do...?
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,345
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    If you can't use SQL*Plus to access these databases what ARE you using from the command prompt?
     
  3. seema

    seema Active Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    65
    go to your environment variale in windows i.e. my_computer-proeprties-advanced-environment_variable
    create new variable as varialble name ORACLE_SID
    and value will be the database you want to use i'e' Pankaj or test and click add
    that will be your default database.
     
    pankaj25 likes this.
  4. pankaj25

    pankaj25 Active Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    80
    Hello Seema,
    Great......... Thanks a lot... your solution worked for me well. For a long time I was searching for solution of my problem, somebody told me to Format the System OR Uninstall the Oracle. But being a developer I thought that it should be the last option to uninstall or format... Thanks again...
     
  5. salmankhalid

    salmankhalid Forum Advisor

    Messages:
    116
    Likes Received:
    6
    Trophy Points:
    260
    Location:
    Lahore, Pakistan
    i agree with you pankaj that being a developer its not the solution to format or reinstall ORACLE, but some times the registry of your system is corrupted enough to create a connection with the Database, so for that reason you have to reinstall ORACLE, also seema has same a very good information about it, try that one first......
     
  6. seema

    seema Active Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    65
    hello!
    wel come any time I agree that syscorruption can create problem but I think in oracle we have specific errors with specific messages we have to solve them not to format always or uninstall ..............
    seema
     
  7. pankaj25

    pankaj25 Active Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    80
    Hello,
    I have one more qurie. Basically I m working as a .net developer and use MS SQL Server for backend. But nw i m learing oracle and want to make my future in Oracle. While learning oracle, I always compare oracle with MS SQL. In MS SQL i can open and work on multiple database at a single time using Tabbed Pane in Management Studio(IDE). How can i do the same thing in Oracle. Can i work on multiple database at a time...means can i connect multiple database at a time...
     
  8. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,345
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    You're confusing a SQL SERVER 'database' with an Oracle database and they are not the same; a SQL Server database is equivalent to a schema in Oracle, so given you have the proper priveleges you can work on multiple schemas in Oracle at the same time.
     
  9. pankaj25

    pankaj25 Active Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    80
    OK, I got it nw...Thanks Zargon.....
     
  10. seema

    seema Active Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    65
    hi again
    for working on multiple database in oracle when you click on sqlplus login
    while giving username/password you have to give @db_name like
    sys/orcl@test as sysdba or sys/orcl@test1 as sysdba where test and test1 are two different databases,,,,,,,,,,,,,
     
  11. pankaj25

    pankaj25 Active Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    80
    Hello seema,
    Thanks again for this point. For nw I hv been using ORACLE_SID in Environment variable as described by u in prevoius answers." Hmmmm... ab ek or point add ho gaya meri Data Dictionary me...":).