User login |
DatabasesMy Oracle NotesHere are some quick memos about Oracle. They are mostly here to be a place where I can refresh my memory. Start a Oracle databse instance* Setup paths and SID * Start TNS Listner * Startup the instance $ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.8.0 - Production on Mon Dec 3 11:51:25 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to an idle instance. SQL> startup JDBCInfoHere is a small Java application which connects to a database using JDBC and prints some information. import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; public class JDBCInfo { private Connection conn; public JDBCInfo(String driver, String url) { if (driver != null) { try { Class.forName(driver); System.out.println("Registered JDBC driver '" + driver + "'"); } catch (ClassNotFoundException e) { |