How to change sqljdbc.jar file to sqljdbc4.jar in JDBC provider? - sql-server-2005

How to change sqljdbc.jar file to sqljdbc4.jar in JDBC provider in WebSphere Appliction Server? Because I'm putting that file in application, but where should I put it in Websphere to be visible by classpath in jdbc provider?

You should not put sqljdbc4.jar with your application. Create directory on file system where WebSphere Application Server is installed e.g. /drivers/mssql. Put your sqljdbc4.jar there.
Create new JDBC provider for MSSQL Server, if you don't already have one. If you have, can see its details in console via Resouces > JDBC > JDBC Providers. In the provider classpath you should see entry like this: ${MICROSOFT_JDBC_DRIVER_PATH}/sqljdbc4.jar. If you see sqljdbc.jar you might created DataDirect driver provider instead of MS SQL Server provider (in that case create new provider).
Then check your ${MICROSOFT_JDBC_DRIVER_PATH} variable via Environment > WebSphere variables and edit this variable to point to your /drivers/mssql folder.
If you had incorrect provider, you will need to recreate DataSources under your new provider.

Related

How to add new properties in Weblogic Server 11 JDBC Connection Pool

I need to include new properties in JDBC ConnectionPool.
On Payara Server 5, I can do it when accessing the menu Domain/Resources/JDBC/JDBC Connection Pools (below my configuration image in Payara Server 5)
How do I do this on the Weblogic Server 11?
I entered a setting "environment" in field "Parameters".
Would the configuration of additional parameters be like this?
How do I capture the environment information in java? Oracle's documentation is confusing about this.
Login to Weblogic Console. Navigate to DataSources. You can create a new one or modify an existing one. Refer to Oracle Documentation. That will help you.
Check out the blog for getting the JDBC connection working.

simple-jdin/jdbc.properties is ignored in pentaho-server 8.2

If we need to perform queries in pentaho data integration (IDE), we need to add manually the datasource in simple-jdin/jdbc.properties
MyDatabase/type=javax.sql.DataSource
MyDatabase/driver=org.hsqldb.jdbcDriver
MyDatabase/url=jdbc:hsqldb:hsql://localhost/sampledata
MyDatabase/user=pentaho_admin
MyDatabase/password=password
This works as expected in the ide known as pentaho data integration, spoon or kettle.
But, the same in pentaho server 8.2 does not works.
Steps to reproduce the error
deploy or upload the transformation(.ktr) in the pentaho-server 8.2
add manually the datasource in the server /../pentaho-server/pentaho-solutions/system/simple-jndi/jdbc.properties
executed the transformation using pentaho server web console : run in background or schedule options
error: datasource not found
Alternative
Create the datasource manually using web console of pentaho server instead of manually modification of file : /../pentaho-server/pentaho-solutions/system/simple-jndi/jdbc.properties
Question
simple-jndi/jdbc.properties works in server or is just for development purposes (pdi)?
are the settings available in jdbc.properties file on server can you verify the same by referring to the pentaho data integrator > simple-jndi folder.
also are you able to connect to the database from the server may be using a database client to confirm.
NOTE:whenever you work with databases make sure you relevant library files to connect to the respective database.
From my personal experience, I was not able to make the server pick JNDI connection definitions from the simple-jndi/jdbc.properties file when the Pentaho Server was running with Tomcat.
I was only able to use JNDI on the Pentaho Server by defining JNDI Datasources in the Tomcat configuration files.

User/Role List could not be obtained pentaho

I am installing pentaho 8.1 CE on ubuntu 16.04
have made change of bd from HSQLDB to Mysql, tables have been created, jackrabbit, hibernate and hibernate.
When starting the server, not login, I imagine that the users are missing or not created. ??
the error that throws me in
catalina.out
ERROR [CompositeUserRoleListService] User / Role List could not be obtained.
java.lang.IllegalStateException: Target of Bean was never resolved: org.springframework.security.core.userdetails.UserDetailsService
atorg.pentaho.platform.engine.core.system.objfac.spring.BeanBuilder$1.invoke(BeanBuilder.java:159)
at com.sun.proxy.$Proxy84.loadUserByUsername(Unknown Source)
..
..
Database Jackrabbit no created tables..
any idea?
When changing the back-end database, there's a few things you need to make sure you check.
repository.xml
quartz.properties
hibernate-settings.xml
[your-database].hibernate.cfg.xml
context.xml (in WEB-INF)
You'll need to confirm the settings for the connection to the new database has been properly configured in all of these different config files. Some additional details on how to config these files for MySQL specifically can be found in the documentation here: https://help.pentaho.com/Documentation/8.1/Setup/Installation/Archive/MySQL_Repository
Past that, make sure that you delete the "repository" directory inside of /pentaho-solutions/system/jackrabbit as this is an index of the repository. If you change your database back-end, then this index needs to be rebuilt. The index is rebuilt automatically if the server sees that "repository" directory doesn't exist at startup.
I've found the same issue on Windows Server 2016 and MySQL8.0, with Pentaho 8.0.2.
Starting Pentaho server from the start-pentaho.bat command, everything was fine.
The problem arise when I was using Tomcat.
The solution was to be sure that Tomcat service was running with the LOCAL SYSTEM account.
If the Tomcat service runs with lower privileges, maybe it can't access to the pentaho-solutions directory and it cannot load the required java beans.
if everything as per the document is configured correctly, then You might be missing the connection change in applicationContext-spring-security-hibernate.properties, please check that.

Configure TDWC v8.6 FP3 or v9.x for reporting using an Oracle database

Is there a concise set of steps available to allow Tivoli Dynamic Workload Console (TDWC) v8.6 FP3 or v9.x to successfully create reports when the Tivoli Workload Scheduler (TWS) master is using Oracle as the database vendor?
TDWC v8.6 FP3 and v9.x do not include the JDBC libraries that allow a Type 4 connection to an Oracle database. Here is a typical message returned when attempting to connect to an engine in DWC when the "Enable reporting" box is checked, but the configuration work has not been done:
Manage Engines AWSUI0803W Test connection to "ENGINENAME" : engine successful, database failed. AWSUI0346E Database failure. Check the database is available and the connection parameters are correct and retry:
database user: TWS_user, database JDBC URL:jdbc:oracle:thin:#//1.2.3.4:1521/DBNAME If the problem persists contact the Tivoli Workload Scheduler administrator. The database internal message is: No suitable driver found for jdbc:oracle:thin#//1.2.3.4:1621/DBNAME
The TWS online documentation includes the procedure to accomplish the needed configuration. There are, however, a couple of external links that must be used to make the modifications within WebSphere Application Server (WAS). The full details are described below:
Actions taken on Tivoli Workload Scheduler engine:
For Oracle, the IT administrator, or the Tivoli Workload Scheduler IT administrator, or both working together, perform the following steps:
Use the TWS Oracle user specified during the master domain manager installation or perform the following steps to create a new user:
a. Create a database user authorized to access the database and specify a password.
b. Launch the following script: /TWS/dbtools/Oracle/scripts/dbgrant.bat/.sh
where the variables are as follows:
The Tivoli Workload Automation instance directory
The ID of the user created in step 1.a, who is going to be granted the access to the reports
The name of the database, as created when the master domain manager was installed
The user ID and password of the database schema owner.
Define a valid connection string to the database:
a. Ensure that the following property is set in the TWSConfig.properties file to point to the Oracle JDBC URL: com.ibm.tws.webui.oracleJdbcURL
FP3: /eWAS/profiles/TIPProfile/properties/TWSConfig.properties 9.x: /WAS/TWSProfile/properties/TWSConfig.properties
For example:
com.ibm.tws.webui.oracleJdbcURL= jdbc:oracle:thin:#//9.132.235.7:1521/orcl
b. Restart the WebSphere Application Server.
Actions taken on the Dynamic Workload Console:
Download the JDBC drivers required by your Oracle server version.
Copy the JDBC drivers into a directory that is accessible by the WebSphere Application Server used by your Dynamic Workload Console.
Create a shared library on WebSphere Application Server specifying the path and filename of the JDBC drivers you have copied, as documented below:
a. Login to the WebSphere Admin Console for TDWC as the WebSphere Administrative user.
v8.6 FP3: The default https admin port is 31124.
v9.x: The default https admin port is 16316.
The URL will be similar to this: https://(hostname):16316/ibm/console
b. Select Environment > Shared libraries in the console navigation tree.
c. Select the following scope from the dropdown list:
v8.6 FP3: Node=TIPNode01, Server=server1
v9.x: Node=JazzSMNode01, Server=server1
...and select [New]
d. Specify a new name such as oraclelibs
e. Specify the path to the directory that holds the Oracle JDBC drivers in the Classpath field.
*Field Detail: If a path in the list is a file, the product searches the contents of that Java archive (JAR) or compressed .zip file. If a path in the list is a directory, then the product searches the contents of JAR and compressed files in that directory. Press Enter to separate class path entries.
f. Select [Apply]
*NOTE: The file that is updated by the above step is: libraries.xml
v8.6 FP3: /eWAS/profiles/TIPProfile/config/cells/TIPCell/nodes/TIPNode/servers/server1/libraries.xml
v9.x: cells/JazzSMNode01Cell/nodes/JazzSMNode01/servers/server1/libraries.xml
Associate the isc Enterprise Application to this shared library:
a. Still in the WebSphere Admin Console, in the console navigation tree to access the Shared library references page: Select Applications > Application Types > WebSphere enterprise applications > isc > Shared library references
b. Check the box for the application named isc. This should be the first box and the only box under the section in the table with the second column named "Application".
c. Select the [Reference shared libraries] button.
d. In the "Available" box select the name of the new shared library that you created in step 3. For example: oraclelibs. Then select the Add arrow button to move the shared library name from the Available to Selected box.
e. Select [Ok]
f. Select [Ok] on the "Shared library references" page.
g. Select the blue word Save at the top of the page in the Messages box.
*NOTE: The files that are noted as being updated in this scenario are:
v8.6 FP3: cells/TIPCell/nodes/TIPNode/serverindex.xml cells/TIPCell/applications/isc.ear/deltas/isc/delta-<#> cells/TIPCell/applications/isc.ear/deployments/isc/deployment.xml
v9.x: cells/JazzSMNode01Cell/nodes/JazzSMNode01/serverindex.xml cells/JazzSMNode01Cell/applications/isc.ear/deltas/isc/delta-<#> cells/JazzSMNode01Cell/applications/isc.ear/deployments/isc/deployment.xml
**NOTE: It is the file deployment.xml that has reference to the actual shared library name that was created in step 3.
***NOTE: Sample entry:
h. Restart the WebSphere Application Server.
Log on to the Dynamic Workload Console.
In Dashboard Application Services Hub navigation bar, select System Configuration > Manage Engines. The Manage Engines panels opens.
Select the engine you defined or create another engine. The Engine Connection properties panel is displayed.
In Database Configuration for Reporting, perform the following:
a. Check Enable Reporting to enable the engine connection you selected to run reports.
b. In Database User ID and Password, specify the database user and password that you authorized to access reports.

How to connect to SQL Server from WebLogic using Windows AD Kerberos Authentication?

I have WebLogic 11G (10.3.6) on Linux Server and SQL Server 2012 on Windows 2012. I would like to create the connection pool to SQL Server from WebLogic using Windows Active Directory Kerberos authentication.
I am looking for steps to accomplish the above. I found information in bits and pieces but looking for clear steps. Any help is greatly appreciated.
I have access to WebLogic 10.3.3. So all version numbers are according to that. But the principals are the same.
Login through the console
Lock and Edit. If this isn't a production mode server, you won't need to do this.
Go to Services > JDBC > Data Sources and click "New".
Give it a name and JNDI name. I probably don't need to mention that the JNDI name is the important one. Also, choose the "Database Type" as "MS SQL Server".
Next you'll have to choose the driver. I didn't observe anything about distribute transactions in your question. Thus, I'm assuming you won't need an "XA" driver.
Again, I didn't see anything about Global Transactions in your quesiotn. So in the next step, disable it.
Next is the information about your Database; its name, Host's IP, and Port. If you have a named instance, add the name after the IP like this: \\instance_name. Since you want to use Kerberos, don't enter the Username and Password.
In the next step, you need to tell your datasource to use kerberos. Add ";AuthenticationMethod=kerberos" to end of the URL field. Connection properties are separated with a ";". For example, jdbc:sqlserver://192.168.10.56:17888;AuthenticationMethod=kerberos
Next, specify which Servers in your Domain will have access to this DataSource. Basically, specifying the DataSource's target servers.
Side notes and other important settings:
When you specify the "AuthenticationMethod" connection property with the value of "kerberos", any username or password will be ignored.
Your database server must be administered by the same Domain Controller that administers the Weblogic server.
Under $WL_HOME/server/lib find krb5.conf (Kerberos configuration file containing values for the Kerberos realm and the KDC name for that realm) and open it in a text editor. Specify the system properties java.security.krb5.realm and java.security.krb5.kdc. In Windows Active Directory, the Kerberos realm name is the Windows domain name and the KDC name is the Windows domain controller name.
The application and driver code bases must be granted security permissions in the security policy file of the Java 2 Platform. Something like this:
grant codeBase "file:/WL_HOME/server/lib/-" {
permission javax.security.auth.AuthPermission
"createLoginContext.DDTEK-JDBC";
permission javax.security.auth.AuthPermission "doAs"
permission javax.security.auth.kerberos.ServicePermission
"krbtgt/your_realm#your_realm", "initiate";
permission javax.security.auth.kerberos.ServicePermission
"MSSQLSvc/db_hostname:SQLServer_port#your_realm", "initiate";
};
where:
WL_HOME is the directory in which you installed WebLogic Server.
your_realm is the Kerberos realm (or Windows Domain) to which the database host machine belongs.
db_hostname is the host name of the machine running the database.
SQLServer_port is the TCP/IP port on which the Microsoft SQL Server instance is listening.
I must say though I don't think you searched hard enough. Because almost everything I wrote here came from the online documentation:
http://docs.oracle.com/cd/E12839_01/web.1111/e13753/mssqlserver.htm