Connecting to oracle database:-
We can connect to oracle database by using multiple tools such as
command prompt, toad, oracle sql developer, sql*plus and many other third party
tools. We will try to connect to oracle database by using these 4 tools:-
COMMAND PROMPT: -
Type CMD (shortcut for command prompt) in RUN dialog box (windows key + R):-
Type SQLPLUS and hit ENTER. Now it will ask you for username and password. Provide username and password with database name or service name. I have also written a query to find to which database I am currently logged in and by which user:-
TOAD: -
TOAD is another tool which can talk to oracle database. We can install it on our machine or can directly open it by double clicking on TOAD.EXE file.
TOAD is another tool which can talk to oracle database. We can install it on our machine or can directly open it by double clicking on TOAD.EXE file.
TOAD will ask you three credentials, first is database name second is username and third is password. In database name textbox you must specify the database name, in my case it’s ORCL. Then I will have to type user name, i.e. SCOTT. And finally you will have to enter the password in password textbox.
Below is the process with the screen shots. Double click on the toad icon. It will land you on below screen:-
Select connect as Normal. Since we are programmers we can connect only as
normal (without sys privileges)as shown below:-
Click OK to connect.
Sql*plus:-
It’s another oracle supplied tool which gets install when you install oracle. It is similar to toad.
Let’s see how to connect to oracle by using sql*plus:-
Click on the START > ALL PROGRAMS > ORACLE > APPLICATION DEVELOPMENT > SQL PLUS.
Click OK.
Oracle's sql developer:-
Install oracle sql developer or click on sql developer.exe file, it will show you initialization process:-
Once you click onyou will land onto the
below screen. Type the name of the connection as you want, type the username,
password, and then click on save password checkbox, type host name or
ip_address of the machine, specify the port number and database SID or Service
name, after putting all the information click on test or you can directly click on connect button:-
Once you click on save button, the connection will be saved in the
connection tab so you can use it again and again. You can see below the name
CONNECTION_TO_SCOTT is present in the connection tab.
If you want to add more connection then just click onand put all the
required information. After you saved it, it will be listed in connection tab.
No comments:
Post a Comment