Using Squirrel SQL client to Connect to Oracle 10G in ubuntu
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1 • Share •
Using Squirrel SQL client to Connect to Oracle 10G in ubuntu
I just found the way
First of all, Squirrel is a very lite Toad like software. However, its
advantage is that it is only 20 MB in size and it is actually a jar file
which can be used as an installer in any system. it can be used in
mac, windows, and linux
Here is the screenshot of My Squirrel:

Note: The image is the squirrel after severe modification in several settings. After installation, it might not look as good as this.
Setting it up:
Download it from here
now, open it using the command in terminal:
it will ask you where to install it. As my username is lordamit, I installed it in /home/lordamit/squirrel-sql-3.1.2/
Optional Plugins I have choosen for Installation:
Data Import
DBCopy
DB2
MySQL
OracleSmart Tools
SQL Parametrisation
SQL Replace
SQL validator
It will be installed very quickly. Continue clicking on Next until you see installation finished successfully.
Showing it the JDBC Driver of Oracle:
We are going to use Oracle thin JDBC driver. There are many versions available. I am going to use the classes12.jar driver which I downloaded from here
Configuring Squirrel:
After you install it, it will create menu entries on desktop and on the applications menu. The desktop entry will look like a text file because it doesn't have the permission to be executed as a program. Anyway, open squirrel from application > Squirrel SQL client.
there, You will see many things. Look left. there are two submenus, called alias and driver. Click on driver. Use the scroll bar to find out the
Oracle Thin Driver entry.

Double click on it. It will show you another window, details about the oracle thin driver.Now, click on the extra class path. Click on add.

Show the classes12.jar file so that it becomes like:

Click on list drivers. Look at the drop down menu below. Select oracle.jdbc.driver.OracleDriver and press Ok.
We need to find your oracle configuration for client connection.Open terminal and type:
NOTICE THE $ORACLE_HOME. It is not oracle_home or $oracle_home.
type
it will give you something like:
Here, we can find some important things. Match your tnsnames.ora file and note the following details like me:
Database-name : XE
Server / Host = lordamit-laptop
Port: 1521
Remember, these are case sensitive. close the tnsnames.ora file. Now, once again. get back to squirrel. From the left menu, select Aliases. Click on the plus button to add a new alias.
now, make the following configurations:

Name: myHR (change it if you want)
Driver: Oracle Thin driver
URL: jdbc:oracle:thin:@lordamit-laptop:1521:XE (replace it with the info you got from tnsnames.ora)
Username: HR
password: iit123
now, press ok. It will be saved. You can now press Connect to connect to your oracle
(you need to start database from the applications> oracle of course) database
)
NOTE:
I have checked and double checked the instructions myself. I went to the trouble of uninstalling Squirrel and then reinstalling it again so that i can take the screenshots in each steps. If it does not work for you, there is probably something wrong. And remember, starting database is a lengthy process. Wait at least 2 minutes before you panic and start shouting "HELP! it is not working!! I can't connect!!" .
Go to http://127.0.0.1:8080/apex and see if your page loads. If it does not load, It means your oracle database is still being opened, mounted, instantiated etc etc.
In case you want to uninstall it, there is a folder called uninstall inside the squirell installation directory.
First of all, Squirrel is a very lite Toad like software. However, its
advantage is that it is only 20 MB in size and it is actually a jar file
which can be used as an installer in any system. it can be used in
mac, windows, and linux

Here is the screenshot of My Squirrel:

Note: The image is the squirrel after severe modification in several settings. After installation, it might not look as good as this.
Setting it up:
Download it from here
now, open it using the command in terminal:
- Code:
java -jar squirrel-sql-3.1.2-install.jar
it will ask you where to install it. As my username is lordamit, I installed it in /home/lordamit/squirrel-sql-3.1.2/
Optional Plugins I have choosen for Installation:
Data Import
DBCopy
DB2
MySQL
OracleSmart Tools
SQL Parametrisation
SQL Replace
SQL validator
It will be installed very quickly. Continue clicking on Next until you see installation finished successfully.
Showing it the JDBC Driver of Oracle:
We are going to use Oracle thin JDBC driver. There are many versions available. I am going to use the classes12.jar driver which I downloaded from here
Configuring Squirrel:
After you install it, it will create menu entries on desktop and on the applications menu. The desktop entry will look like a text file because it doesn't have the permission to be executed as a program. Anyway, open squirrel from application > Squirrel SQL client.
there, You will see many things. Look left. there are two submenus, called alias and driver. Click on driver. Use the scroll bar to find out the
Oracle Thin Driver entry.

Double click on it. It will show you another window, details about the oracle thin driver.Now, click on the extra class path. Click on add.

Show the classes12.jar file so that it becomes like:

Click on list drivers. Look at the drop down menu below. Select oracle.jdbc.driver.OracleDriver and press Ok.
We need to find your oracle configuration for client connection.Open terminal and type:
- Code:
cd $ORACLE_HOME/network/admin
NOTICE THE $ORACLE_HOME. It is not oracle_home or $oracle_home.
type
- Code:
gedit tnsnames.ora
it will give you something like:
- Code:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lordamit-laptop)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
Here, we can find some important things. Match your tnsnames.ora file and note the following details like me:
Database-name : XE
Server / Host = lordamit-laptop
Port: 1521
Remember, these are case sensitive. close the tnsnames.ora file. Now, once again. get back to squirrel. From the left menu, select Aliases. Click on the plus button to add a new alias.
now, make the following configurations:

Name: myHR (change it if you want)
Driver: Oracle Thin driver
URL: jdbc:oracle:thin:@lordamit-laptop:1521:XE (replace it with the info you got from tnsnames.ora)
Username: HR
password: iit123
now, press ok. It will be saved. You can now press Connect to connect to your oracle
(you need to start database from the applications> oracle of course) database
)NOTE:
I have checked and double checked the instructions myself. I went to the trouble of uninstalling Squirrel and then reinstalling it again so that i can take the screenshots in each steps. If it does not work for you, there is probably something wrong. And remember, starting database is a lengthy process. Wait at least 2 minutes before you panic and start shouting "HELP! it is not working!! I can't connect!!" .
Go to http://127.0.0.1:8080/apex and see if your page loads. If it does not load, It means your oracle database is still being opened, mounted, instantiated etc etc.
In case you want to uninstall it, there is a folder called uninstall inside the squirell installation directory.
_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.
|About me|My Blog|

BIT0122-Amit- Founder

- Course(s):
- BIT
Blood Group: O+
Posts: 4187
Points: 6601

Re: Using Squirrel SQL client to Connect to Oracle 10G in ubuntu
nicely explained. keep up the good work 


BIT0103-Ovid- Release Candidate

- Course(s):
- BIT
Blood Group: O-
Posts: 150
Points: 261
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Active Topics!

» Understanding Timestamp Based Protocol
» Hi from Newbie
» Compare an image from a list of images in the sql database....tell which image is matching
» Sending email without email ID
» teach yourself c by herbert schildt pdf
» .NET MVC3: Unable to find the requested .Net Framework Data Provider. It may not be installed.
» SAD Slides: 4.1, 4.2
» QA topic Presentation - Urgent Notice