Friday, October 19, 2012

sudo: /etc/sudoers is mode 0640, should be 0440

If you encounter the following error, it is likely because you ran the su command while your current folder is /etc and the sudo is in the same folder.


Wednesday, October 17, 2012

Retrieving JDBC version information

The following is how you can retrieve the jdbc version:

import oracle.jdbc.OracleConnection;
import oracle.jdbc.pool.OracleDataSource;
import java.sql.SQLException;
import java.sql.DatabaseMetaData;
import java.util.Properties;
public class JDBCVersionInfo {
  public static void main(String[] args) {
    try {
      // Set up user connection properties
      Properties prop = new Properties();
      // open the connection
      OracleDataSource ods = new OracleDataSource();
      OracleConnection ocon = (OracleConnection)ods.getConnection();
      DatabaseMetaData dbmd = ocon.getMetaData();
      System.out.println("Driver Name: " + dbmd.getDriverName());
      System.out.println("Driver Version: " + dbmd.getDriverVersion());
    } catch(SQLException e) {
Reference from the following url: