9 Replies Latest reply: Aug 2, 2011 9:19 AM by Rodney Barnett RSS

    can't get 11g express up and running

    876817
      i installed 11g express, and sql developer, or oracle did. all i did was hit next a few times. but when i tried (using sql developer) to create a connection it gave a listener error 12505 with sid of orcl, and invalid connection string format when tried to use service name of oracle. what is the correct connection string? how do i set a sid?
        • 1. Re: can't get 11g express up and running
          878776
          I am having the same problem. Installed 11g express, but cannot connect to the database using sql developer. Get error 12505 "TNS:listener does not currently know of SID given in connect descriptor." The only way that I can connect to database is by using sql plus command line.

          I am also not able to connect to the database with my web browser pointed to the database homepage http://127.0.0.1:8080/apex/f?p=4950. I think this issue and the one I mentioned already might be related, but I am not sure. I tried to use both internet explorer and firefox. I got this additional information from explorer: " '127.0.0.1' is not set up to establish a connection on port '8080' with this computer."

          I had 10g installed about a day ago and was having the same two issues at that time. I tried installing GlassFish Server. When I did that and then pointed my browser to the database home page http://127.0.0.1:8080/apex, I got a different message displayed in the web browser: "The requested resource () is not available." At that point I deinstalled 10g and installed 11g.

          So back to my current status with 11g. I have also looked at some network and listener values. When I log into the database as user system, I can get the following output from the DBMS_XDB package:

          SQL> select dbms_xdb.gethttpport, dbms_xdb.getftpport from dual;

          GETHTTPPORT GETFTPPORT
          8080 0

          So I guess the database is listening at port 8080. But then if I run 'netstat -n' from the operating system command line, there is no active connection shown for 127.0.0.1:8080.

          I have also looked at the files listener.ora and tnsnames.ora but I am not sure what to do with those. I have also ran the 'LSNRCTL services' command, and I did not see any service that corresponded to the SID 'XE'.
          • 2. Re: can't get 11g express up and running
            Rodney Barnett
            The SID for Express Edition is XE.

            Rodney
            • 3. Re: can't get 11g express up and running
              Rodney Barnett
              875773,

              You might want to add -a or -l to your netstat command to check for an application listening on 8080.

              Unfortunately nothing stands out in your post to suggest the source of the problem. However, if lsnrctl isn't reporting any services, that would certainly be a problem--possibly an installation problem.

              Have you searched for your operating system in this forum? There have been a number of threads about installation problems on various systems.

              There's a log file called alert_XE.log in /u01/app/oracle/diag/rdbms/xe/XE/trace on linux. It might help.

              Rodney
              • 4. Re: can't get 11g express up and running
                876817
                i had to use the sql command line and unlock the hr account, and used xe as the sid not orcl like my book showed. now it works fine with the sql developer after i created a hr connection. also created a system connections. i am a sql fool now! wish i could be more help.
                • 5. Re: can't get 11g express up and running
                  878776
                  Rodney,

                  Thank you for the information.

                  Added -a to my netstat command, good to know about that.

                  I am using Vista Home Premium with Service Pack 2. I think I require an OS upgrade, so I am probably going to upgrade to Windows 7 and then start over. The documentation does not list Vista as a supported OS, and I read in these forums that Vista Business works and Vista Home does NOT work. I am not sure if the specific issues I am having are caused by my operating system, but it makes sense for me to upgrade.
                  • 6. Re: can't get 11g express up and running
                    878776
                    I decided to try some more to get this to work on Vista. I think the problem might be the tnsnames.ora file, because there is no entry for port 8080.

                    When I go to database home page, http://127.0.0.1:8080/apex/f?p=4950, I get error " '127.0.0.1' is not set up to establish a connection on port '8080' with this computer."

                    When I log into database, the database shows activity on port 8080:
                    SQL> select dbms_xdb.gethttpport, from dual;
                    GETHTTPPORT
                    8080


                    Netstat shows nothing on 127.0.0.1:8080.

                    The following is my tnsnames.ora file and the results from LSNRCTL. Is tnsnames.ora correct? Anything else that could be a problem?

                    XE =
                    (DESCRIPTION =
                    (ADDRESS = (PROTOCOL = TCP)(HOST = MyName-PC)(PORT = 1521))
                    (CONNECT_DATA =
                    (SERVER = DEDICATED)
                    (SERVICE_NAME = XE)
                    )
                    )

                    EXTPROC_CONNECTION_DATA =
                    (DESCRIPTION =
                    (ADDRESS_LIST =
                    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
                    )
                    (CONNECT_DATA =
                    (SID = PLSExtProc)
                    (PRESENTATION = RO)
                    )
                    )

                    ORACLR_CONNECTION_DATA =
                    (DESCRIPTION =
                    (ADDRESS_LIST =
                    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
                    )
                    (CONNECT_DATA =
                    (SID = CLRExtProc)
                    (PRESENTATION = RO)
                    )
                    )


                    LSNRCTL> services
                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
                    Services Summary...
                    Service "CLRExtProc" has 1 instance(s).
                    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
                    Handler(s):
                    "DEDICATED" established:0 refused:0
                    LOCAL SERVER
                    Service "PLSExtProc" has 1 instance(s).
                    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
                    Handler(s):
                    "DEDICATED" established:0 refused:0
                    LOCAL SERVER
                    The command completed successfully
                    • 7. Re: can't get 11g express up and running
                      Rodney Barnett
                      I think the "...is not set up..." message merely means that IE thinks that nothing is listening on the socket. The netstat command confirms this. The DBMS_XDB.GETHTTPPORT indicates which socket the XMLDB component of the database is configured to listen on, not that there's any particular activity there. The XMLDB component is not controlled by the tnsnames.ora file. It's also an optional service of the database. Your problem seems to be more fundamental.

                      The lsnrctl output should have an entry for XE. Are all of the Oracle Windows services running according to the Windows service manager? If a service isn't running or the tnslistener can't find it, things won't work. The "MyName-PC" must be a resolvable name. You might try putting the IP address there temporarily to see if anything changes.

                      Have you found the logs? There should be an alert_xe.log file somewhere, but I don't know where in Windows. There might also be entries in the Windows event logs. The logs might provide some direct indication of what's wrong, so you don't have to guess.

                      I've seen some posts that indicate rather emphatically that the database won't work on Vista Home, but the ones I've found have all been short of technical details, so I don't know how much weight to give them.

                      Rodney
                      • 8. Re: can't get 11g express up and running
                        878776
                        Thank you for all your help.

                        I think (not sure) that I might be missing an entire entry that needs to go into the tnsnames.ora file.

                        When you say "try putting the IP address there temporarily to see if anything changes," what IP address should I use for "MyName-PC"? Is it 127.0.0.1?

                        No, not all of the Oracle Windows services were running according to the Windows services manager. Only two of the five Oracle services were started, so I started all of them (not sure if they need to be started), yet still the web page did not display.

                        Yes, I did find alert_xe.log, at C:\oraclexe\app\oracle\diag\rdbms\xe\xe\trace, and there was some good information there that came from the initial database creation as well as from activity after that. For example, here are a few parts of that file:
                        ~ Full restore complete of datafile 2 to datafile copy C:\ORACLEXE\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF.
                        ~ Errors in file C:\ORACLEXE\APP\ORACLE\diag\rdbms\xe\xe\trace\xe_ora_4164.trc:
                        ~ WARNING: The following temporary tablespaces contain no files...TEMP
                        ~ Fatal NI connect error 12638, connecting to: (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))...

                        The "restore complete of datafile" line (there were three more similar lines) is noteworthy because I deinstalled 10g and then installed 11g, so maybe stuff was left over from 10g and I need to do a complete deinstall of 11g, make sure everything is deleted, and then install 11g again. There were several lines that indicated I could find more errors in other trace files. The fatal NI connect error seems important too, but I have tried quite a few things over the last few days, so if I look into this, I will first reproduce it to get a current return of the error so I know the context of when it happens.


                        Here are some more details of the steps I took regarding the windows services. I went to Windows service manager (Control Panel > Administrative Tools > Services) and saw the following before I made any changes:
                        ~ OracleJobSchedulerXE.........................Disabled
                        ~ OracleMTSRecoveryService.....................Manual
                        ~ OracleServiceXE................Started.......Automatic
                        ~ OracleXEClrAgent.............................Manual
                        ~ OracleXETNSListener............Started.......Automatic

                        Next, I did this:
                        1. started OracleXEClrAgent
                        2. started OracleMTSRecoveryService
                        3. changed startup type of OracleJobSchedulerXE from Disabled to Manual
                        4. started OracleJobSchedulerXE

                        Next, I pointed browser to URL http://127.0.0.1:8080/apex/f?p=4950 ==> "Internet Explorer cannot display webpage"


                        Given all of the above, I think I might de-install, make SURE everything is definitely gone, and then re-install.

                        I think there is something missing from the tnsnames.ora file. If I try to put an IP address in the part that says "(HOST = MyName-PC)", what IP address should I use for "MyName-PC"?

                        Edited by: 875773 on Aug 1, 2011 11:46 AM
                        • 9. Re: can't get 11g express up and running
                          Rodney Barnett
                          Using 127.0.0.1 for the IP address instead of the name is one option for this test though I doubt it would be acceptable for normal use. The IP address of the Windows box would be better, but if that isn't stable, then it also would not be acceptable for normal use After changing, try restarting the database using the start menu options or reboot the computer. Check whether the listener is finding the XE service.

                          I think the three services that were not running are not required for your current situation. Since the database service is running and you have been able to connect to it with sqlplus, I think it's a problem with the tnslistener's ability to find the database service. This sounds like a simple thing, but Oracle has a complex protocol at this level that allows for a wide range of configurations.

                          At some point you might try restarting the tnslistener using the lsnrctl command and watch for errors when it starts.

                          Sorry I don't have a more exact diagnosis for you.

                          Rodney