I have to connect to an external Oracle database. For this I use putty to create an ssh tunnel and then sqldeveloper as a client.
This is the connection from sqldeveloper and it works fine:
Now I have to consume this data from an ASP.NET application. I installed the oracle packages for entity framework but when I type "localhost" from the Server Explorer it tries to connect to a local instance of Oracle.
What can I do to fix it?
Related
On Windows Server 2012 R2, I have Oracle 11G and Oracle 12C installed.
Everyting is working as needed, I am able to use SQL Developer to connect to individual instances.
However, in addition to using SQL Developer, I need to use SQL Plus.
How do I specify which Instance to connect to using commands?
In the TNS file, each instance is on a separate port and has a different SID but uses the same IP.
Thanks
you can always
connect user/password#server:port/SID|SERVICE
Am a newbie to oracle, I've Oracle Database installed on my windows machine and I can connect to the database without any problem from my machine using the sqlPlus / SQL Developer. And I have a java application in my machine which needs to connect to the Database using JDBC driver. After downloading the ojdbc driver I can connect to the java application by providing the connection url as jdbc:oracle:thin:#127.0.0.1:1521:orcl
Now, I want to know how can I connect to my oracle database that is installed in my machine (ip address:10.0.xx.xx) from the java application which is running in another machine (ip address:10.0.yy.yy). BTW both the machines are connected in LAN.
Do I need to change anything in listener configuration or in tnsnames.ora file?
I checked these links for reference before posting this question:
How to connect to an Oracle DB from another system
also Cannot access oracle using sqlplus from another machine on the LAN
Please Suggest me how can I do this one. Thanks in advance.
The JDBC url has this form
jdbc:oracle:thin:#HOST:PORT:SID
So if you wanted to connect to an oracle server running on 10.1.2.3, on port 1521 (the default one), and on a database named 'stackoverflowdb' you'd use:
jdbc:oracle:thin:#10.1.2.3:1521:stackoverflowdb
I have to connect to a remote Oracle database. Connection will only work with a VPN access to the remote network. I have already setup the VPN, and that is working.
Remote team has passed TNS.ORA settings. I have hardly worked on configuring oracle and neither I am aware of the setup that I need to have on my machine. I just need to run few queries to test the data.
Can somebody guide me on the setup and the configuration I need to have on my windows 7 to connect to a remote Oracle database ?.
My first assumption was to download Oracle client. I downloaded Oracle Insta Client files, but I have no idea how to configure it to connect to a remote database. I couldn't even find any ORA file in the installed files of Insta client.
One you installed the instant client and installed it, you can conect to the remote database by using an easyconnect string. If you are in sqlplus you can do the following:
CONNECT username#[//]host[:port][/service_name][:server][/instance_name]
Lets assume your remote host is remote1 and the service_name is test (This can be retrieved from the tnsnames.ora)
connect username#//remote1/test
Recently we have developed an application which connects to oracle database for fetching records. For fetching records, we are using OLEDB for Oracle. Application runs fine on my machine by connectng properly with Oracle ,since i have oracle client installed on my machine. Now i tried to test application on another machine, which doesnot have any oracle instance/Client installed on his machine. Application fails to connect to oracle central DB Server. Is it necessary for users to install oracle client on their machine before the application communicates with Oracle.
Here is Connection string
connectionString="Provider=msdaora;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XYZ)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=abc.com)));Persist Security Info=False;User Id=mahens; Password=XXXXXXXXX" providerName="System.Data.SQLOLEDB"/>
The above code is for OLEDB for oracle. Is there any thing i required to install for connecting to central Oracle DB server from my windows application(.NET application installed on local machine).
If we try to use ODP.NET dll and include those dll's along within BIN directory,will that work?..Can any1 tell me a way wherein user need not install any oracle Client on their machine and communicate to server.
-Mahender
I believe you always need the oracle client installed as everything in .net ultimately uses ODP.NET. However, you can use the Oracle Instant Client to make your users' setup process easier.
This .NET application used to work. When it did we were using the Oracle ODBC 9i. We moved to 10 g did not work anymore. Now at 11g stills does not work. I have set SQL Command Timeouts all over the place. I have set the connection timeout and the query timeout in the linked server properties to 120. I can run the proc from SQL Server Management studio and it works. It just does not work within my .NEt application anymore. Should I create a second connection string( to linked server) in the .NET app? We are at SQL Server 2005. Any Ideas??
Has your server you're connecting to moved, or are there now firewalls in place between the two servers?
I would check connectivity between the two first.
Try connecting to the oracle server using telnet on port 1521.
Alternatively, try using ODAC and checking your tnsnames.ora is configured correctly.
(It depends what provider you're using though.)