I have been trying to access an Oracle Database from Visual Studio 2010.
I am confused about how to configure the tnsnames.ora, sqlnet.ora and listener.ora. I know they have to be moved into the Network/Admin folder of both the client and server but I don't know how and where to provide the instance name,user id and password of my specific database.
This is the information given in my Oracle Databse control window
Status Up Up Since Jun 1, 2011 8:37:15 AM CDT Instance Name lorac Version 10.2.0.1.0 Host localhost.localdomain Listener LISTENER_localhost.lo开发者_开发知识库caldomain
The DBA admin has also given me the following information:
host: Lorac.chem.tamu.edu
instance: Stockroom2
user/password: Inventory_mgmt/invmgmt
I am very confused as to which data to include in tnsnames.ora,listener.ora and sqlnet.ora.
Please do help me out.
You would need to properly add a addres name to your TNSNAMES.ORA, for example:
MYCONNECTION.TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Lorac.chem.tamu.edu)(PORT = your server port))
)
(CONNECT_DATA =
(SERVICE_NAME = your ORACLE server SID)
)
)
I don't know if your instance means the Schema name or the SID of the SERVER, if it's the SID you should put it in the text before as:
(SERVICE_NAME = Stockroom2)
like shown here Configuring TNSNAMES.ora
then in your app you use a connection string like this:
<add name="MyDatabase" connectionString="Data Source=MYCONNECTION.TEST;User Id=Inventory_mgmt;Password=invmgmt;Integrated Security=no;"/>
精彩评论