4 Replies Latest reply: Mar 18, 2013 3:15 PM by EdStevens RSS

    can't access 11gr2 through neither sqlplus or OEM locally.

    943839
      i have a windows 2008r2 server [vm3]. i installed the Oracle 11gr2 on this server, the SID is [orclvm3]. (almost all default option)

      Now when i login the server [vm3], I can't access the database through sqlplus,
      c:\>sqlplus sys/syspassword@orclvm3 as sysdba
      error message: ORA-12154: TNS: could not resolve the connect identifier specified.

      On the server, i tried to open page https://localhost:1158/em. i can login, but i can't see the server status in 'home' tab, it shows: agent unreachable. strange enough, in 'server' and 'schema' tab, i can see all the tables and users.

      On another pc [pc1], i have no problem to query the tables through sqldeveloper!!! but same as open OEM from server locally, can't see server status in OEM page https://vm3:1158/em.

      can anyone please tell me what's wrong? i was thinking tnsname.ora, but someone told me access db locally doesn't use tns.
        • 1. Re: can't access 11gr2 through neither sqlplus or OEM locally.
          TSharma-Oracle
          i have a windows 2008r2 server [vm3]. i installed the Oracle 11gr2 on this server, the SID is [orclvm3]. (almost all default option)
          Now when i login the server [vm3], I can't access the database through sqlplus,
          c:\>sqlplus sys/syspassword@orclvm3 as sysdba
          error message: ORA-12154: TNS: could not resolve the connect identifier specified.

          On the server, i tried to open page https://localhost:1158/em. i can login, but i can't see the server status in 'home' tab, it shows: agent unreachable. strange enough, in 'server' and 'schema' tab, i can see all the tables and users.

          On another pc [pc1], i have no problem to query the tables through sqldeveloper!!! but same as open OEM from server locally, can't see server status in OEM page https://vm3:1158/em.

          can anyone please tell me what's wrong? i was thinking tnsname.ora, but someone told me access db locally doesn't use tns.
          >

          There are two ways of access database on a server itself. One uses tnsames.ora and other don't.

          If you do not want to use tnsnames.ora, you should not be using @
          Do this,
          set oracle_sid=orclvm3
          sqlplus sys as sysdba
          password:


          If you want to use sys/syspassword@orclvm3 , then you have to create listener and tnsnames.ora.
          • 2. Re: can't access 11gr2 through neither sqlplus or OEM locally.
            943839
            i did what you said, it works. but i can't always login the server and do my stuff. can you please tell me how to make OEM work(locally and remotely), also be able to connect through sqlplus with @.
            • 3. Re: can't access 11gr2 through neither sqlplus or OEM locally.
              TSharma-Oracle
              You have to create a listener and tnsnames.ora files if you want to login as a client.

              Listener on the server and tnsnames.ora on the client machine where you want to connect from.

              http://pic.dhe.ibm.com/infocenter/clmhelp/v3r0m1/index.jsp?topic=%2Fcom.ibm.rational.rcpr.help.doc%2Ftopics%2Ft_create_oracle_service_listener.html

              Please mark your question answered if you got your solution.
              • 4. Re: can't access 11gr2 through neither sqlplus or OEM locally.
                EdStevens
                new4oracle wrote:
                i did what you said, it works. but i can't always login the server and do my stuff. can you please tell me how to make OEM work(locally and remotely), also be able to connect through sqlplus with @.
                see: [url http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/] Help! I can’t connect to my database
                see: [url http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/] Help! I can’t connect to my database (part duex)
                see: [url http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/] ora-12154 TNS:could not resolve the connect identifier specified


                And NO network request of any kind that references 'localhost' or ip address 127.0.0.1 will ever leave the machine from which such request is made.