Toad World® Forums

Configuring TOAD for Oracle 11g Database

Hello Friends,
i am new to oracle and toad,

i installed oracle 11g, and also installed “Toad for oracle11”

now i want to link my oracle database to TOAD.

how to do it?

Please help me friends.

Thanking You,

Regards,
Praveen.

Hi Praveen,

Hello Friends, i am new to oracle and toad, i installed oracle 11g, and
also installed “Toad for oracle11” now i want to link my oracle database
to TOAD. how to do it? Please help me friends. Thanking You, Regards,
Praveen.

Your database has been created yes? If so, it will have a name. This
name should be in the tnsnames.ora file located in
$ORACLE_HOME/network/admin.

Can you, from a command line session, run the following:

tnsping database_name

if you get an OK back at the end of that output, so far so good. Then try:

sqlplus system/password@database_name

You will need to replace password with whatever you defined at database
creation time.

If that all works fine, “exit” from sqlplus. Back in Toad, click
Session->New Session, enter a username of system, the password as above,
click on the TNS tab, and enter the database_name. Click ok.

After a few seconds, you should be connected. Create yourself a test
user and grant it some privs to allow you to use it. Log out of system
and login as your user.

Have fun.

Check out Oracle’s “2 dab dba” document which covers quite a lot of what
you need to know.


Cheers,
Norm. [TeamT]

Message from: gogulapraveenkumar87_843

Hi still its not connecting, how to configure tnsnames.ora??? help me Norm.


Historical Messages

Author: gogulapraveenkumar87_843
Date: Fri Sep 23 13:50:09 PDT 2011
Hi still its not connecting, how to configure tnsnames.ora??? help me Norm.
__

Author: Norman Dunbar
Date: Fri Sep 23 07:02:26 PDT 2011
Hi Praveen, > Hello Friends, i am new to oracle and toad, i installed oracle
11g, and > also installed “Toad for oracle11” now i want to link my oracle
database > to TOAD. how to do it? Please help me friends. Thanking You, Regards,

Praveen. Your database has been created yes? If so, it will have a name. This
name should be in the tnsnames.ora file located in $ORACLE_HOME/network/admin.
Can you, from a command line session, run the following: tnsping database_name
if you get an OK back at the end of that output, so far so good. Then try:
sqlplus system/password@database_name You will need to replace password with
whatever you defined at database creation time. If that all works fine, “exit”
from sqlplus. Back in Toad, click Session->New Session, enter a username of
system, the password as above, click on the TNS tab, and enter the
database_name. Click ok. After a few seconds, you should be connected. Create
yourself a test user and grant it some privs to allow you to use it. Log out of
system and login as your user. Have fun. Check out Oracle’s “2 dab dba” document
which covers quite a lot of what you need to know. – Cheers, Norm. [TeamT]
__

Author: gogulapraveenkumar87_843
Date: Fri Sep 23 06:28:58 PDT 2011
Hello Friends, i am new to oracle and toad, i installed oracle 11g, and also
installed “Toad for oracle11” now i want to link my oracle database to TOAD. how
to do it? Please help me friends. Thanking You, Regards, Praveen.
__


Hi still its not connecting,

how to configure tnsnames.ora???

help me Norm.

Hi Praveen,

Hi still its not connecting, how to configure tnsnames.ora??? help me Norm.

Ok, start from the very beginning…

  • When you installed Oracle 11g, did you either allow it to create a
    database, or did you subsequently run the DBCA (Database Creation
    Assistant) to create one?

If not, then you need to create a database.

  • There will most likely be a listener running, probably named LISTENER.
    You need to know where it is, so, in a command session, do this:

    lsnrctl status

Part of the output at the top will be the configuration file name
(usually ORACLE_HOME/network/admin/listener.ora) and, somewhere will be
listed a port number. You need the port number.

  • Go to ORACLE_HOME/network/admin and edit the file tnsnames.ora. Add
    the following entry which assumes that the database is running on the
    same desktop as Toad.

xxxx.world,xxxx =
(description =
(address_list =
(address = (protocol = tcp)(host =
localhost)(port = nnnn))
)
(connect_data = (service_name = dddd))
)

In case email has reformatted everything, the (address= line is the
longest and should be on one line, although you can have EVERYTHING on
one line if you wish.

Due to (old) bugs in Oracle, DO NOT put any of the ‘(’ or ‘)’ characters
in the first column, always indent with spaces or a tab.

Replace xxxx with your database name, or a user friendly alias for that
database.

Replace dddd with the actual database name.

Replace nnnn with the listener port number. Here’s one from my own Linux
server:

ant12.world,ant12 =
(description =
(address_list =
(address = (protocol = tcp)(host =
127.0.0.1)(port = 1541))
)
(connect_data = (service_name = ant12))
)

Save and exit.

  • If the listener was not running, then start it. You can do this via
    control panel->Services, look for the one(s) relating to your database.
    They all start with “Oracle” in the name.

  • tnsping xxxx (or xxxx.world if you like) and show me what response you
    get back. I expect to see something similar to the following:

[oracle@penguin ~]$ tnsping ant12

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on
24-SEP-2011 07:56:58

Copyright © 1997, 2010, Oracle. All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (description = (address_list = (address =
(protocol = tcp)(host = 127.0.0.1)(port = 1541))) (connect_data =
(service_name = ant12)))
TNS-12541: TNS:no listener

If you see the last line above saying no listener, you need to start the
listener, otherwise it will show something like the following:

[oracle@penguin ~]$ tnsping ant12

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on
24-SEP-2011 07:59:05

Copyright © 1997, 2010, Oracle. All rights reserved.

Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (description = (address_list = (address =
(protocol = tcp)(host = 127.0.0.1)(port = 1541))) (connect_data =
(service_name = ant12)))
OK (30 msec)

This is good, we have a listener and we should be able to connect now. So:

  • sqlplus system/password@xxxx should display something like the
    following if the database needs starting:

SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 24 08:00:47 2011
Copyright © 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL>

If the database is running, you will not see the line about “connected
to an idle instance”.

Type quit or exit to exit from SQL*Plus.

  • Now, go back to my email from previously and login to Toad as
    described there.

It is obvious that you are pretty much a beginner in using Oracle and/or
Toad. Oracle is a very complex bit of software and you need to do some
reading up and experimenting before you start using it for real!

Have fun.


Cheers,
Norm. [TeamT]