Deprecated: Assigning the return value of new by reference is deprecated in /home/jjonahha/public_html/oracle-internals/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/jjonahha/public_html/oracle-internals/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/jjonahha/public_html/oracle-internals/blog/wp-includes/theme.php on line 540
ORACLE INTERNALS » Open Source

Archive for the 'Open Source' Category

Oct 07 2008

SibylNet: An Open Source Wire-level Client Library for Oracle

As of a couple days ago, I informed Oracle of my plans for this project and wanted to update everyone regarding what I’ve been up to lately. While I’m waiting on a response, given that a majority of this information is already public, I’m hopeful that Oracle will be fine with this project and that I’ll be able to proceed with sharing some of my past work and research with the world. Now, without any further ado, the project!

As several of you know, years ago, I began to combine my various pieces of Oracle-related network protocol code into a single open-source client interoperability library for Oracle as FreeTDS/jTDS are to Sybase/SQL Server. Similar to FreeTDS, and other database companies, I’ll be including newly-written API-compatible wrapper libraries for ODBC, OCCI, and OCI 7/8. I am also including my own implementation of TNSAPI, which implements the old Net8 OPEN API (desupported in 8i). Items not included are my wrappers for SQLLIB or UPI; not only are they non-public APIs, but I only know limited pieces of them. Also excluded is any of my own server-side and listener code. The goal of this project is only to provide a free and open-source client library for Oracle. Like FreeTDS, it will never be as good or as complete as the official client libraries, but it’s a hobby of mine which I believe could benefit a large number of people. Oracle Database is an awesome product and a lot of people seem to be fascinated as to how it works. Perhaps this will help a few of them :)

Looking through my old code and emails, I originally started this project in February 2005. The oldest code it contains was written in 1999.

For my initial alpha release, I’m planning only to support the TCP/IP (ntt) and Bequeath (ntp) transports. As my development platform is Gentoo Linux, Linux will be the initially supported operating system.

Anyone with an in-depth knowledge of OCCI, OCI, ODBC, or those with experience writing solid database drivers/wrapper libraries would be helpful. All volunteers are welcome, however, unless I know you, you probably won’t get to work on the code pre-release.

All too often, people tell me, “all you have to do is decompile the JDBC drivers!” While that is one way you can do it, and you could argue it was for interoperability, it’s legally/ethically questionable, I do not support it in any way, and most certainly will not accept any code, concepts, or discussion derived from Oracle’s JDBC drivers.

If you want to provide assistance, please submit your own documented packets, network conversations, and research. Just to say it again, only publicly-available information will be incorporated into this project.

-Jonah

Code Snippet:

This should look a little familiar. SibylNet strives to be as Oracle-compatible as possible and can build a client specifically for your system using Oracle’s own tools (gennttab). If you want to use your Oracle’s generated ntcontab.c, you can simply ./configure –with-ntcontab=$ORACLE_HOME/network/lib/ntcontab.c, and it will configure itself around the adapters your version of Oracle supports.

The generic version I wrote, which is the one that ships with SibylNet, looks like the following:

/* ---------------------- Network Transport Adapters ----------------------- */

/*
 * Network Transport Configuration Table (for Protocol Adapters)
 *
 * In Oracle, this table is dynamically generated by the spiffy gennttab
 * shell script.  Basically, what gennttab does is build a list of all
 * compiled NT adapters it can find, organize them into a template, and
 * output it as a C file (ntcontab.c).  This file is then linked with
 * Oracle during installation or upgrade via relink to add newly supported
 * transport protocol adapters.
 *
 * Unlike Oracle, our users won't be relinking the library.  Instead, we'll
 * be deciding what transports to ship at build-time.  If this becomes an
 * issue, we should make the following table/support libraries dynamically
 * loadable.
 */
ntdrv ntcontab[] =
{
 /* DESIGNATOR  INIT FUNC   INIT FUNC NAME  DRV MOD   */
 /* ----------- ----------- --------------- --------- */
#ifdef ENABLE_NTUS_ADAPTER
    { "ipc",    ntusini,    "_NTUSINI",     "ntus"  },         /* IPC Driver */
#endif
#ifdef ENABLE_NTP_ADAPTER
    { "beq",    ntpini,     "_NTPINI",      "ntp"   },    /* Bequeath Driver */
#endif
#ifdef ENABLE_NTT_ADAPTER
    { "tcp",    nttini,     "NTTINI",       "ntt"   },      /* TCP/IP Driver */
#endif
#ifdef ENABLE_SDP_ADAPTER /* InfiniBand Socket Direct Protocol uses NTT */
    { "sdp",    nttsdpini,  "NTTSDPINI",    "ntt"   },      /* SDP/IB Driver */
#endif
#ifdef ENABLE_NTCPS_ADAPTER
    { "tcps",   ntzini,     "NTZINI",       "ntcps" },  /* TCP/IP SSL Driver */
#endif
#ifdef ENABLE_NTS_ADAPTER
    { "spx",    ntsini,     "_NTSINI",      "nts"   },         /* SPX Driver */
#endif
#ifdef ENABLE_NTD_ADAPTER
    { "dec",    ntdini,     "_NTDINI",      "ntd"   },      /* DECNet Driver */
#endif
#ifdef ENABLE_NTODR_ADAPTER
    { "dce",    ntodrini,   "_NTODRINI",    "ntodr" },         /* DCE Driver */
#endif
#ifdef ENABLE_NTL_ADAPTER
    { "lu62",   ntlini,     "_NTLINI",      "ntl"   },       /* LU6.2 Driver */
#endif

Current Source Tree:

sibyl-0.1.2/
sibyl-0.1.2/autom4te.cache
sibyl-0.1.2/doc
sibyl-0.1.2/doc/man
sibyl-0.1.2/doc/man/man3
sibyl-0.1.2/examples
sibyl-0.1.2/examples/occi
sibyl-0.1.2/examples/occi/10g
sibyl-0.1.2/examples/occi/10gr2
sibyl-0.1.2/examples/occi/11g
sibyl-0.1.2/examples/occi/9ir2
sibyl-0.1.2/examples/occi/plsql
sibyl-0.1.2/examples/occi/spatial
sibyl-0.1.2/examples/oci
sibyl-0.1.2/examples/oci/oci7
sibyl-0.1.2/examples/oci/oci8
sibyl-0.1.2/examples/odbc
sibyl-0.1.2/examples/tnsapi
sibyl-0.1.2/examples/tnsapi/finger
sibyl-0.1.2/examples/tnsapi/tftpd
sibyl-0.1.2/include
sibyl-0.1.2/include/ano
sibyl-0.1.2/include/nn
sibyl-0.1.2/include/nn/nnfh
sibyl-0.1.2/include/nn/nnfl
sibyl-0.1.2/include/nn/nnfo
sibyl-0.1.2/include/nn/nnft
sibyl-0.1.2/include/ns
sibyl-0.1.2/include/nt
sibyl-0.1.2/include/nt/ntasg
sibyl-0.1.2/include/nt/ntat
sibyl-0.1.2/include/nt/ntcps
sibyl-0.1.2/include/nt/ntd
sibyl-0.1.2/include/nt/nti
sibyl-0.1.2/include/nt/ntis
sibyl-0.1.2/include/nt/ntit
sibyl-0.1.2/include/nt/ntl
sibyl-0.1.2/include/nt/ntn
sibyl-0.1.2/include/nt/ntodr
sibyl-0.1.2/include/nt/ntp
sibyl-0.1.2/include/nt/ntr
sibyl-0.1.2/include/nt/nts
sibyl-0.1.2/include/nt/ntt
sibyl-0.1.2/include/nt/ntus
sibyl-0.1.2/include/nt/ntv
sibyl-0.1.2/include/ttc
sibyl-0.1.2/include/tti
sibyl-0.1.2/src
sibyl-0.1.2/src/ano
sibyl-0.1.2/src/nn
sibyl-0.1.2/src/nn/nnfh
sibyl-0.1.2/src/nn/nnfl
sibyl-0.1.2/src/nn/nnfo
sibyl-0.1.2/src/nn/nnft
sibyl-0.1.2/src/ns
sibyl-0.1.2/src/nt
sibyl-0.1.2/src/nt/ntasg
sibyl-0.1.2/src/nt/ntat
sibyl-0.1.2/src/nt/ntcps
sibyl-0.1.2/src/nt/ntd
sibyl-0.1.2/src/nt/nti
sibyl-0.1.2/src/nt/ntis
sibyl-0.1.2/src/nt/ntit
sibyl-0.1.2/src/nt/ntl
sibyl-0.1.2/src/nt/ntn
sibyl-0.1.2/src/nt/ntodr
sibyl-0.1.2/src/nt/ntp
sibyl-0.1.2/src/nt/ntr
sibyl-0.1.2/src/nt/nts
sibyl-0.1.2/src/nt/ntt
sibyl-0.1.2/src/nt/ntus
sibyl-0.1.2/src/nt/ntv
sibyl-0.1.2/src/progint
sibyl-0.1.2/src/progint/dotnet
sibyl-0.1.2/src/progint/jdbc
sibyl-0.1.2/src/progint/occi
sibyl-0.1.2/src/progint/oci
sibyl-0.1.2/src/progint/oci/oci7
sibyl-0.1.2/src/progint/oci/oci8
sibyl-0.1.2/src/progint/odbc
sibyl-0.1.2/src/progint/sqllib
sibyl-0.1.2/src/progint/tnsapi
sibyl-0.1.2/src/progint/upi
sibyl-0.1.2/src/ttc
sibyl-0.1.2/src/tti
sibyl-0.1.2/src/util
sibyl-0.1.2/tests
sibyl-0.1.2/tests/expected
sibyl-0.1.2/tests/output
sibyl-0.1.2/tests/src
sibyl-0.1.2/win32

2 responses so far

Jul 18 2008

Vincent Rogier’s New OCILIB Blog

Published by jonah.harris under General, Open Source, Tools

In several of my posts, I’ve referenced the awesome OCI wrapper library OCILIB.  It’s a great library for those who don’t want to take the time learning, or coding for, the direct OCI API.  Now, the author of OCILIB Vincent Rogier, has started a new blog.  So, if you’re interested in using OCILIB or have any questions about it, be sure to check it out!

No responses yet

« Prev - Next »