| IP and reverse IP |
|---|
| Reverse IP lookup |
| Interfaces |
| C * Pro |
|
- Pro*C/C++ generates data structures and calls to its runtime library: SQLLIB. - Pro*C/C++ does NOT use Oracle Call Interface (OCI) |
| C* Pro syntax |
| Oracle-.NET forum |
| Xtractor XML DB engine |
| Comparisons |
|---|
| Oracle 10g vs. DB2 |
| Xtractor XML DB engine |
| [What's new in Oracle 11g] |
|---|
|
Following is an example of how to use the getConnection() method.
import java.sql.*;
...
DefaultContext ctx = new DefaultContext
("jdbc:oracle:thin:@localhost:1521/myservice", "scott", "tiger", true);
...
(SQLJ operations through SQLJ ctx connection context instance)
...
Connection conn = ctx.getConnection();
...
(JDBC operations through JDBC conn connection instance)
...
|
To retrieve the underlying JDBC connection of your default SQLJ connection, you can use getConnection() directly from
a DefaultContext.getDefaultContext() call, where getDefaultContext() returns a DefaultContext instance that you had
previously initialized as your default connection and getConnection() returns its underlying JDBC connection instance.
In this case, because you do not have to use the DefaultContext instance explicitly, you can also use
the Oracle.connect() method. This method implicitly creates the instance and makes it the default connection.
import java.sql.*;
...
Connection conn = Oracle.connect
("jdbc:oracle:thin:@localhost:1521/myservice",
"scott", "tiger").getConnection();
...
(JDBC operations through JDBC conn connection instance)
...
|
Example: JDBC and SQLJ Connection Interoperability for Dynamic SQL
Following is a sample method that uses the underlying JDBC connection
instance of the default SQLJ connection context instance
to perform dynamic SQL operations in JDBC. The dynamic operations are performed using JDBC java.sql.Connection,
java.sql.PreparedStatement, and java.sql.ResultSet objects.
Alternatively, you can use Oracle SQLJ extensions for dynamic SQL operations.
import java.sql.*;
public static void projectsDue(boolean dueThisMonth) throws SQLException {
// Get JDBC connection from previously initialized SQLJ DefaultContext.
Connection conn = DefaultContext.getDefaultContext().getConnection();
String query = "SELECT name, start_date + duration " +
"FROM projects WHERE start_date + duration >= sysdate";
if (dueThisMonth)
query += " AND to_char(start_date + duration, 'fmMonth') " +
" = to_char(sysdate, 'fmMonth') ";
PreparedStatement pstmt = conn.prepareStatement(query);
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
System.out.println("Project: " + rs.getString(1) + " Deadline: " +
rs.getDate(2));
}
rs.close();
pstmt.close();
}
|
| What's new in 10g |
|---|
|
| Oracle 9i SYNTAX | |
|---|---|
| PL/SQL commandline variable declaration | |
var v2 varchar2(200); | |
| PL/SQL logged user based security (column security) | |
create or replace view scott.emp_jp_viewJP Vijaykumar | |
| PL/SQL logged user based security (row security) | |
connect scott/tiger; | |
| PL/SQL make sequence and set counter | |
CREATE OR REPLACE PROCEDURE ABS.RETURN_LAST_TESTED( RTESTPLANRUN OUT INTEGER) | |
| PL/SQL extract metadata from Oracle 9i database | |
IS | |
| SQL frequent commands | |
TNSPING GREG1
| |
| Manual Database Creation Tasks when Copying existing database and keeping old database. | |
Oracle9i Database Administrator ´s Guide Release 2 (9.2) for Windows
[9i DBA Guide (local)] [10g Concepts (local)] |
| Eclipse | NetBeans |
|---|---|
| Target engine | |
| The NetBeans/Sun combination works well out of the box and lets you get started a little more quickly than the Eclipse/WebTools combination.NetBeans is a better choice if you use the Sun application server in production, while Eclipse works better with WebSphere. Network World Inc. | |
| Java & Hibernate vs. Ruby & ActiveRecord | |
|---|---|
| Hibernate | Ruby on Rails |
| Home | MVC, similar to Struts or Webwork but written in scripting language Ruby tutorials Home |
| |