how to connect oracle client to a remote oracle server DB [message #588888] |
Sat, 29 June 2013 08:51 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/9fb625e9d37be5ebf2836371256a7772?s=64&d=mm&r=g) |
dancko
Messages: 108 Registered: June 2013 Location: italy
|
Senior Member |
|
|
Hi at all
I'm trying to connect a oracle client application on the client machine to a remote oracle server on the server machine but i get a connection fail.
On the server machine I configured oracle server in the following way:
- Installed oracle server.
- Created a database "DB_Test" with the database configuration assistant
- Created a LISTNER with the Oracle NET Manager with the following parameter:
- Protocol: TCP/IP
- HOST: server pc hostname (ENZOVAIO) or server machine address ip (192.168.0.71) in the network lan
- Port Number: 1521
- Created "dbtest" service with the Oracle NET Manager with with the following parameter:
- Service Name: "dbtest"
- Protocol: TCP/IP
- HOST: server pc hostname (ENZOVAIO) or server machine address ip (192.168.0.71) in the network lan
- Port Number: 1521
All services on the server machine are running and I opened port number (1521) in the router.
On the client machine I installed SQL PLUS and SQL Developer.
With SQL Plus as by the official documentation I have entered the following command:
CONNECT username/password@[//]host[:port][/service_name]. In my case is:
CONNECT SYSTEM/oracledb@//ENZOVAIO:1521/testdb.
With SQL Developer I have entered the same parameter.
But with both SQLPlus and SQL Developer the connection fails.
Can anyone help me?
regards.
[Updated on: Sat, 29 June 2013 08:53] Report message to a moderator
|
|
|
|
|
Re: how to connect client oracle to a remote oracle server DB [message #588892 is a reply to message #588889] |
Sat, 29 June 2013 09:13 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/9fb625e9d37be5ebf2836371256a7772?s=64&d=mm&r=g) |
dancko
Messages: 108 Registered: June 2013 Location: italy
|
Senior Member |
|
|
sqlnet.ora has this content
# sqlnet.ora Network Configuration File: C:\app\Fabio\product\11.2.0\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora has this content
# This file contains the syntax information for
# the entries to be put in any tnsnames.ora file
# The entries in this file are need based.
# There are no defaults for entries in this file
# that Sqlnet/Net3 use that need to be overridden
#
# Typically you could have two tnsnames.ora files
# in the system, one that is set for the entire system
# and is called the system tnsnames.ora file, and a
# second file that is used by each user locally so that
# he can override the definitions dictated by the system
# tnsnames.ora file.
# The entries in tnsnames.ora are an alternative to using
# the names server with the onames adapter.
# They are a collection of aliases for the addresses that
# the listener(s) is(are) listening for a database or
# several databases.
# The following is the general syntax for any entry in
# a tnsnames.ora file. There could be several such entries
# tailored to the user's needs.
<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
# one or more descriptions
# If there is just one description, unnecessary ]
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= # Optional depending on whether u have
# one or more addresses
# If there is just one address, unnecessary ]
(ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
[ (ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=decnet)
(NODE=<nodename>)
(OBJECT=<objectname>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST is used or not
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= ] # Optional depending on whether u have more
# than one address or not
# If there is just one address, unnecessary
(ADDRESS
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST
# is being used
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
... # More descriptions
[ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
|
|
|
|
Re: how to connect client oracle to a remote oracle server DB [message #588894 is a reply to message #588893] |
Sat, 29 June 2013 09:22 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/9fb625e9d37be5ebf2836371256a7772?s=64&d=mm&r=g) |
dancko
Messages: 108 Registered: June 2013 Location: italy
|
Senior Member |
|
|
BlackSwan wrote on Sat, 29 June 2013 09:16below shows proper syntax to use EZCONNECT
sqlplus user1/pass1@'dbserver_hostname:1521/oracle_sid'
Sorry I'm new with oracle databse.
Please, can you say me what's EZCONNET and how to use it?
In oracle net manager profile section of the server machine I have a EZCONNET and TNSNAMES voice in "selected method" part.
[Updated on: Sat, 29 June 2013 09:25] Report message to a moderator
|
|
|
|
Re: how to connect oracle client to a remote oracle server DB [message #588896 is a reply to message #588888] |
Sat, 29 June 2013 09:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You didn't give the error message, but I think it was probably an ORA-12514, the listener does not know of the requested service. If so, that will likely be because your database (and therefore the service) is named db_test but you are requesting a service testdb in your EZ connect string. So try this,
CONNECT SYSTEM/oracledb@//ENZOVAIO:1521/db_test
|
|
|
|
|
|
|
|
|
|