what does IBM DB2 z/os JDBC emulateParameterMetaDataForZCalls do? - jdbc

When i use IBM data Studio to connect to our db2 v8 z/os database the JDBC connection url generated is this.
jdbc:db2://host:port/LOCATION:retrieveMessagesFromServerOnGetMessage=true;emulateParameterMetaDataForZCalls=1;
contains this parameter setting: emulateParameterMetaDataForZCalls=1
What does this setting do? Why do i need it?

This parameter enables the use of the method PreparedStatement.getParameterMetaData() against a DB2 for z/OS data source.

Related

Tibco businessworks 6.6. JDBC Resource connection - Snowflake

Has anyone successfully created a JDBC Resource connection for the Snowflake database? I have a specific case, where I would like to connect directly, not through Snowflake plugin. I am stuck at database driver selection. Can't import snowflake-jdbc-3.13.24.jar to choose it in dropdown menu.
I already tried this, but it doesn't work:
https://docs.tibco.com/pub/activematrix_businessworks/6.2.1/doc/html/GUID-DF12A927-F788-46DC-ABA1-0A1BA797DE2F.html
I never worked with Snowflakes but the BusinessWorks 6.6 documentation provides updated explanations on how to set-up a custom JDBC driver in the BusinessWorks environment, you can check it at the following URL :
https://docs.tibco.com/pub/activematrix_businessworks/6.6.1/doc/html/GUID-DF12A927-F788-46DC-ABA1-0A1BA797DE2F.html

Only JDBC Generic driver option in driver template in sts, want SQL Server driver option also

Trying to achieve JDBC connection to reverse engineer from tables to hibernate using JBOSS tools, need JDBC connection for it, but the option for window->preference->Data Management-> Connectivity->Driver definitions shows only "Generic JDBC Driver" only for connection. Need SQL Server driver option.
screen shot

Connecting to Oracle12C database using standalone java client Vs Connecting through Websphere

Connection to Oracle 12c from a standalone java application succeeds when ojdbc6.jar or ojdbc5.jar is used.
Connection String : jdbc:oracle:thin:#serverName:port:sid
Whereas the same connection string fails when connecting through Websphere with the following exception.
java.sql.SQLException: ORA-28040: No matching authentication protocol
DSRA0010E: SQL State = 99999, Error Code = 28,040
Note : Tried ojdbc8.jar and ojdbc6.jar
The ORA-28040: No matching authentication protocol error generally indicates that you are using an older JDBC driver with a newer database. You should either update your JDBC driver so that it is the same version as the database or update your sqlnet.ora file with the appropriate SQLNET.ALLOWED_LOGON_VERSION_SERVER/SQLNET.ALLOWED_LOGON_VERSION_CLIENT values. See Oracle's SQLNET documentation for more information.
Note that if you think you are using the same version JDBC driver as the database it is possible that a different JDBC driver is being picked up in the WebSphere environment. If that is the case:
Check that there are no additional JDBC drivers packaged with your application.
Check if there are other Oracle JDBC Providers configured in WebSphere using an older JDBC driver. If so either modify your configuration so all of your providers are using the same version Oracle JDBC driver or you will need to Isolate your JDBC Providers.

Connect Oracle cloud Database using JDBC java

I have database username and password to access oracle db and also have service url like https://X-X.X.X.oraclecloudapps.com/apex/.
Can anybody know how to connect this db using JDBC connection.
I tried using oracle thin driver but somehow it failes.
Sample java code:
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:#//X.X.X.X.oraclecloudapps.com:1521/sid", "username", "****");
It throws
Exception in thread "main" java.sql.SQLRecoverableException: Io exception: The Network Adapter could not establish the connection
I don't know SID here, it would be helpful if anybody give steps to find SID/ServiceName from Oracle Cloud dashboard.
You can't use JDBC to connect to the Database Schema Service. You can connect using the API or tools that utilize the REST API. For data upload to Oracle Database Schema Service, use Oracle SQL Developer, the Oracle Application Express SQL Workshop Data Upload Utility or the Oracle Application Express Data Load utility. Read more here: http://docs.oracle.com/cloud/latest/dbcs_schema/CSDBU/GUID-3B14CF7A-637B-4019-AAA7-A6DC5FF3D2AE.htm#CSDBU177
There is only three way to connect Database Schema Service.
From an Oracle Application Express application running in Database Schema Service
From a Java application running in an Oracle Java Cloud Service
Through RESTful Web services
Try the following JDBC URL to resolve the issue
"jdbc:oracle:thin:#host-address:1521/sid";
Note / is used after port and Not :

JMeter and Oracle AQ

Anyone have any experience using JMeter and Oracle AQ? I'm trying to publish messages to the Oracle AQ queue using JMS Publisher but the only information I have is from a bindings file.
First, read this documentation (Oracle® Fusion Middleware Configuring and Managing JMS for Oracle WebLogic Server, Chapter 8: Interoperating with Oracle AQ JMS), it provides you what you need to know about AQ user permission grants, AQ JMS Connection Factories names, and AQ Remote JNDI JMS Destination names. It does say WebLogic, but they use the very same config we do.
Put Oracle JDBC jar (ojdbc6.jar) and Oracle AQ jar (aqapi.jar, found in Weblogic's $WL_HOME/server/lib) in JMeter's lib dir.
Create a jndi.properties file with the following entries:
java.naming.factory.initial=oracle.jms.AQjmsInitialContextFactory
db_url=Your Oracle DB instance JDBC URL
java.naming.security.principal=username_with_aq_permission_grants
java.naming.security.credentials=password
Put the jndi.properties into a jar with
jar cf my-jndi-properties.jar jndi.properties
and put it in that same JMeter lib dir.
Create a JMS Publisher in JMeter, and fill these:
Check "Use jndi.properties file"
Connection Factory: See Table 8-1 and put a AQ JMS Prefix Value. Don't use the generic factories.
Destination: Either Queues/Your_Queue_Name or Topics/Your_Topic_Name
Uncheck "Use Authorization?"
Fill out what else you need.
Have fun.
Thanks David L for the jndi.properties info.

Resources