how to write vbscript oracle connection string - vbscript

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;

Related

Connecting NiFi with Sybase database erroring

Could you please help me with the correct URL format to connect to Sybase using the DBCP connection pool of NiFi?
The URL format that I have tried is - jdbc:sybase:Tds://host:port
I keep getting this error - failed to create Poolable Connection Factory. Incorrect URL format.
Thank you in advance.

Connect Oracle DB using service_name instead of SID using ojdbc14.jar driver in WebLogic Server 6.1 SP1 with JDK 3

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>)))

How to specify oracle.jdbc.ReadTimeout in Oracle JDBC connection url?

I am new to oracle and I need to know whether I can specify the following properties in the connection URL itself and if you can how you can specify.
oracle.jdbc.ReadTimeout
oracle.net.CONNECT_TIMEOUT
Following is my JDBC connection string
jdbc:oracle:thin:#localost:1521/oracl
You can try like this jdbc:oracle:thin:#host:1521:< SID >:oracle.net.CONNECT_TIMEOUT=< timeout-value >;

JDBC connection error for HIVE while using SQL WorkbenchJ

I am trying to establish a JDBC connection to access HIVE via SQL workbenchJ. I have placed all the JARs needed for connection along with the connection URL. Am getting the error
[Amazon]HivejdbcDriver error initialized or created
transport for authentication:null
while testing the connection. Can anyone help me on this?

Connection to sybase IQ server from .net

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!!

Resources