I want to connect to Sybase IQ server. I got connected Sybase ASE thru ASE CLient but I am not able to connect to Sybase IQ. I read on net that one need to connect thru SQL Anywhere for IQ servers.
I tried the same but my connection is getting dropped because of the error message
the server may not be SQL Anywhere Server.
The connection code that I am using for SQLAnywhere(Version 16) is :
SAConnection conn = new SAConnection("host=IQServerIPAddress:IQServerPort Number;UID='MyUserNAme';PWD='My Password';");
conn.Open();
The connection code that I am using for ASE is :
public AseConnection con = new AseConnection();
string conn = "Data Source=IQServerAddress";Port=IQServerPort;UID='MyUserNAme';PWD='My Password';");
con.ConnectionString = conn;
con.Open();
Immediate help is required.
Thanks!!
Related
While Working on a legacy application that first file date back to year 2005.
It used to create connection pool that is mapped to DataSource that application connects with,
URL: jdbc:oracle:thin:#host.test.intranet:1521:service_name
Driver Classname:oracle.jdbc.driver.OracleDriver
Properties(key=value):
user=makeduser
password=maskedpassword
dll=ocijdbc8
protocol=thin
ACLName: null
Recently, the db got rehosted and the new connection details changed from SID to Service_name
While trying to use same format "host"port:sid"
The error that it returns when weblogic server is started
Cannot startup connection pool "veroPool" weblogic.common.ResourceException:Could not >create pool connection. The DBMS driver exception was:java.sql.SQLException: Io exception: >Connection refused(DESCRIPTION=(TMP=)(VSNNUM=318767104)(ERR=12505)(ERROR_STACK=(ERROR=>(CODE=12505)(EMFI=4))))
And When trying to use following format:
jdbc:oracle:thin:#//NEWHOST.TEST.INTRANET:1521/NEW-SERVICE_NAME
Error returned is:
Cannot startup connection pool "veroPool" weblogic.common.ResourceException:Could not create pool connection. The DBMS driver exception was: java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid"
This driver version doesn't support the service name passed in the url in this format, so you have to use the SID. Try to connect to the DB and get the SID using the following query:
select sys_context('userenv','instance_name') from dual;
Then you can use the SID returned from the query in your connection url:
jdbc:oracle:thin:#host.test.intranet:1521:SID
Alternatively you can try with the following syntax to specify your connection which suports service name for this driver version:
jdbc:oracle:thin:#(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = <HOST>)(PORT = <PORT>))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = <SERVICE_NAME>)))
We are trying to connect Salesforce through soapUI but getting below error, can someone help with detailed solution which is working.
Got the Salesforce JDBC driver and connection string from https://github.com/ascendix/salesforce-jdbc
Driver: com.ascendix.jdbc.salesforce.ForceDriver
Connection string: jdbc:ascendix:salesforce://;user=username;password=password
soapUI open source 5.4.0
Error:
Can not get the connection for specified properties;
java.sql.SQLException: [LoginFault [ApiFault exceptionCode =
'INVALID_LOGIN' exceptionMessage = 'Username, password, or invalid
security token, or locked user.' extendedErrorDetails = '{[0]}']]
How to write connection string for vbscript and oracle connection?
connstr = "Provider=SQLNCLI;Data Source=server\instance;User ID=username;
Password=password;Initial Catalog=database_name;"
If you're using the OraOLEDB driver. More info
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
Or the Microsoft driver. More info
Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
Apologies for a newbie question, but that's me - new to Oracle.
My client and oracle server are separated by a firewall. A limited set of IP addresses can be routed through this firewall. One routable IP is the address of a SCAN listener, which redirects to oracle servers that have non-routable IPs.
I am able to connect SQL Developer to my database, but not a simple ODP.Net client.
Using wireshark, I see that when SQL Developer connects to the SCAN listener, SCAN replies with a redirect to a random port on the SCAN IP, which it presumably then proxies to the actual Oracle server. Wireshark reveals that when ODP.Net tries to connect, SCAN replies with a redirect to the actual IP of the back-end server, which IP is not routable.
I'm looking for advice on how to get ODP.Net to enjoy the behavior that SCAN is offering SQL Developer.
I attempted to use the same connection string, completely bypassing tnsnames.ora for simplicity. In SQL Developer, I configured a connection using just IP address, port and service name. I then used wireshark to observe the connection string that SQL Developer sent to the server (yes, SQL Dev repeats the CID section):
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=10.130.X.Y)(PORT=1521))
(CONNECT_DATA=
(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=myusername))
(SERVICE_NAME=myservice)
(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=myusername))))
I plugged this same connection string into an OracleConnection
var bldr = new Oracle.DataAccess.Client.OracleConnectionStringBuilder();
bldr.DataSource = #"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.130.X.Y)(PORT=1521))(CONNECT_DATA=(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=myusername))(SERVICE_NAME=myservice)(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=myuser))))";
var connection = new Oracle.DataAccess.Client.OracleConnection(bldr.ConnectionString);
connection.Open();
connection.Close();
And instead of connecting I receive a timeout. Further examination of captured packets reveals the behavior detailed above: SCAN acts as a proxy for SQL Developer but not for ODP.
When connecting to oracle server from .NET application using ADO.NET for oracle, even if i closed the connection, the connection remains inactive at the Oracle server, so new connections could not be established because of the sessions per user limitation, is there is any way to make sure that all connections are closed? from Oracle server or from .NET application.
Thanks in advance
Could it be the connections stay open for a while due to connection pooling? Can you please paste some code showing how you close the connections? Also are you using ODP.NET or the Microsoft supplied classes?
You could try turning connection pooling off (add ;Pooling=false to the connection string in ODP.NET) to see if your issue is caused as a consequence of using it (just be aware that creating a new physical connection to the DB is an expensive operation, so you probably actually don't want to turn off connection pooling permantly).
Something similar to:
using (OracleConnection connection = new OracleConnection(connectionString))
{
OracleCommand command = new OracleCommand(queryString);
command.Connection = connection;
try
{
connection.Open();
command.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}