0

I am running Ubuntu 18.04 I have installed Oracle JAVA 8, SQL Developer 4.1.5 and SQL client 11.2 with SQL plus 11.2.

I have some SQL files ready to go but cannot make a connection via localhost so cannot run any commands inside developer.

SQL Plus is working from the command line but I have no username or password so cannot login. I have shown Developer the path to Oracle Instant Client and checked the box to use it to use (Tools -> Preferences -> Database -> Advanced), I have tested this and it works. I have set all my paths and SID is xe. The port in tnsnames.ora and listener.ora is set to 1521 which is what I am trying to set up in the Developer connection. I either get an I/O error : the network adapter is unable to set up a connection or Tns is not resolved error depending on what type of connection I try.

I believe the main issue is not knowing the exact (or default) username and password to use for the new connection or what exact method to use (Local, Local Bequeth,TNS, etc).

My questions are: Do I need to get access and setup a database at the command line with SQL plus?, or does SQL Developer just source the files that it contains. If yes what is the default password I should use to actual get to the SQL> prompt?

Which connection type do I Use?, in the past I know I had no virtual server, VM or anything of the like but just cannot remember. I know it was the simplest set up possible, this is all I need enough to build tables and run queries, and it definitely didn't cause this much grief back then when I knew a lot less.

I did have this running a few years ago but have not used it and forgotten the procedure for a local connection. I was wondering if anyone could shed some light on what I might have missed or which setting to use, and of course if I need to do anything in SQL Plus or if it just needs to be there?

I have scoured most related questions here and the Oracle Documentation but seem to have either found nothing related missed a step during install and config.

If anyone could help or give me some advice it would be much appreciated.

  • Edit your question and post the result of command lsnrctl status. I hope that you have already set $ORACLE_HOME. However, please also post the output of commands echo $ORACLE_HOME and echo $ ORACLE_SID – Marmayogi Apr 2 at 11:54
  • output of echo $ORACLE_HOME is ~/Desktop/Oracle_sqlPlus_instantClient/instantclient_12_1 and echo $ORACLE_SID is xe. I know this is not the best place but I was just doing it the same way as last time when it did work. lsnrctl status is not an option this is not recognised (not on the system). As far as I can remember this was the case the first time around also. – michael Apr 2 at 12:28
1

You haven't said that you have a database yet.

SQLPlus and SQL Developer are just clients you use to connect to a database.

You have to already have a database, or you need to create one.

When you create a database you set a password for the admin users (sys and system).

I talk about this more here

0

Thanks @thatjeffsmith. Got me thinking about the service in the background which was in place but not adequate. I didn't say I had a database yet because I wasn't sure. I had to actually re-install Oracle XE because for some reason the password needs to be oracle and not just what I had put in during the configuration stage. I followed these steps How to install Oracle 11gR2 on Ubuntu 14.04? which come from Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit , the remove & redo instructions and explanation of common problems are here Trouble-shooting oracle 11g installation on Ubuntu which explain the password issue. NB- In Ubuntu 18.04 I did not need to create a separate swap partition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.