I'm trying to set up a ColdFusion 8 data source using JDBC on a CLSE5 Linux server. I've downloaded the JDBC drivers from Oracle for both 10g and 11g and placed the JAR files in %CF_INSTALL_Folder%/runtime/lib. I verified that this folder is in the class path on the CF admin settings summary page. According to this Oracle JDBC wiki, the JDBC URL should be:
jdbc:oracle:thin:#[HOST][:PORT]:SID
If I want to use different drivers for different connections, How do I differentiate between them on the data source connection form?
You specify which JDBC driver to use by specifying the JAR's class name in the Driver Class field on the data source administration page. However, this requires that your two JAR files have unique class names.
I would assume that you could use the 11g drivers to connect to your 10g database without any problems unless you are needing to use something specifically deprecated with the 11g drivers. I would at least try that first and see if any issues crop up.
Here is a link to some documentation that describes the different fields on the data source administration page: Connecting to other data sources
Driver Class
The fully qualified class name of the driver. For example, com.inet.tds.TdsDriver. The JAR file that contains this class must be in a directory defined in the ColdFusion classpath.
Related
Getting below response on connecting to DB2 database:
"Cannot create PoolableConnectionFactory ([jcc][t4][10109][10354][3.59.81] The version of the IBM Universal JDBC driver in use is not licensed for connectivity to QDB2 databases. To connect to this server, please obtain a licensed copy of the IBM DB2 Universal Driver for JDBC and SQLJ.
An appropriate license file db2jcc_license_.jar for this target platform must be installed to the application class path. Connectivity to QDB2 databases is enabled by any of the following license files: [ db2jcc_license_cisuz.jar ]. ERRORCODE=-4472, SQLSTATE=42968)"*
db2jcc.jar and db2jcc_license_cisuz.jar already added in JMeter(3.2)'s lib folder.
My configuration:
Screenshot of the jmeter/lib folder:
Although the message seems to indicate a license issue , I see an error in your configuration on Validation Query.
Can you try to fix it and see if you still get the error ?
Change it to:
select 1 from sysibm.sysdummy1
Also can you show a screenshot of the jmeter/lib folder and highlight the presence of the 2 jars for DB2 ?
The error you're getting is about mismatch of the DB2 JDBC Driver you are trying to use with JMeter and DB2 version on the server.
See IBM data server client and driver types IBM KB article for more information on JDBC driver types.
Personally I would recommend obtaining JDBC driver directly from your DB2 installation, it normally lives under java or jdbc folder in the DB2 server installation root.
So I would recommend copying the following files somewhere to JMeter Classpath (normally "lib" folder of your JMeter installation)
db2jcc4.jar
db2jcc_license_cu.jar
(depending on your DB2 version and type you might need other files as well)
JMeter restart will be required to pick the .jars up.
See The Real Secret to Building a Database Test Plan With JMeter article to learn more about databases load testing concept using JMeter.
the documentation of WSO2 Data services server say you can read any database with a JDBC driver, and I found that there are some JDBC libraries for .DBF files.
DSS documentation: http://wso2.com/products/data-services-server/
JDBC for DBF files: http://www.csv-jdbc.com/stels_dbf_jdbc.htm
Someone has already done or did something similar?
I would appreciate your help
Yes, WSO2 DSS supports any RDBMS datasource type, provided a compatible driver is copied to the product. You can follow the below steps.
You can add the JDBC driver to the $DSS_HOME/repository/component/lib folder and start the server.
Create a dataservice by following the this doc
Add an RDBMS type datasource, as DBF is not listed in the pre-defined datasource types, select 'Generic' and give the driver class name, connection url, username and password according to the DBF specified
Add query and then an operation. Our official documentation has all the necessary steps.
Please note that, we have not tested with this driver, therefore, to use in a production environment, a comprehensive testing cycle will be needed (including load tests, long running tests .. etc).
I want to know if is there a way of change the driver used by Microsoft Access to extract data (only use select like querys) from Oracle 9i data base.
The Access to Oracle connection is made using an external data source (linked table) and usually the default Access driver is ODBC for ORACLE, but I want to change that and use a JDBC driver for ORACLE instead.
Thanks in advance.
The Access to Oracle connection is made using an external data source (linked table) and usually the default Access driver is ODBC for ORACLE, but I want to change that and use a JDBC driver for ORACLE instead.
I'm fairly certain that this is impossible. Access linked tables connect via Jet/ACE (for links to another Access database), or ODBC (for all other data sources). JDBC is not an option.
This question already has answers here:
How to use SQLDeveloper to connect to embedded Derby database
(4 answers)
Closed 5 years ago.
I've been trying to connect to an Apache Derby/JavaDB embedded database using Oracle SQL Developer but without much success.
I've tried to create a new connection using the following JDBC URL:
jdbc:derby:/path/to/file/database.derby;create=true
which resulted in an error:
Status : Failure -Test failed: Invalid connection info specified. Verify the URL format for the specified driver.
Previously I've added derby.jar through Tools > Preferences > Database > Third Party JDBC Drivers.
Given that JavaDB is now a supported Oracle product I'm not understanding why is not better integrated with its development tools.
Any guidance will be much appreciated. Thanks in advance.
Your derby url seems wrong. You need to point the url to the directory of the database, not the database itself.
jdbc:derby:/path/to/file/;create=true
Have a look at the examples.
jdbc:derby:/reference/phrases/french
Open a connection to the database /reference/phrases/french.
On a UNIX system, this would be the path of the directory. On a
Windows system, the path would be C:\reference\phrases\french if the
current drive were C. If a jar file storing databases were in the
user's classpath, this could also be a path within the jar file.
From the docs:
The connection URL syntax is as follows:
jdbc:derby:[subsubprotocol:][databaseName][;attribute=value]
Subsubprotocol, which is not typically specified, determines how Derby
looks for a database: in a directory, in memory, in a class path, or
in a jar file. Subsubprotocol is one of the following:
directory: The default. Specify this explicitly only to distinguish a database that might be ambiguous with one on the class
path.
try connecting to the Derby DB using the Eclipse Java EE IDE for Web Developers instead of Oracle SQL Developer. In the latest versions it is has the full integrations.
I used to use currentSchema=MYSCHEMA; in my JDBC URL connection, but the version of DB2 we're using no longer supports that, showing the error 'The "currentSchema" property is not allowed on the target server'. I've tried using hibernate.default_schema, but it's not automatically adding the schema to my table names. I don't want to set the schema on every #Table annotation since I'll need to change it between test and production. Is there another way to set on the connection or via Hibernate?
Update: it must have been a driver version issue. I upgraded to later drivers and currentSchema worked.
With DB2 JDBC type 4 driver (com.ibm.db2.jcc.DB2Driver), I'm using this URL to connect :
jdbc:db2://<HOST>:<PORT>/<DATABASE>:currentSchema=<SCHEMA>;
Source: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvdsprp.htm
All the properties for the 9.7 (Latest) db are here...
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.apdv.java.doc/doc/r0052607.html
use:
currentSchema
Specifies the default schema name that is used to qualify unqualified database objects in dynamically prepared SQL statements. The value of this property sets the value in the CURRENT SCHEMA special register on the database server. The schema name is case-sensitive, and must be specified in uppercase characters.