Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Loading External ODBC Data Source to Oracle Table via PL/SQL

Re: Loading External ODBC Data Source to Oracle Table via PL/SQL

From: Billy Verreynne <verreyb_at_telkom.co.za>
Date: Fri, 23 Aug 2002 09:26:15 +0200
Message-ID: <ak4o2v$ha8$1@ctb-nnrp2.saix.net>


PLSQLANDODBC wrote:

> I'd like to be able to take data from an external ODBC data source and
> load
> this into an Oracle table. Ideally I'd like to do this in a PL/SQL
> procedure.

PL/SQL does not support the ODBC API (unless you have some weird and wonderful ODBC external proc for Oracle that provides you with an API for ODBC). IOW, you can not make ODBC calls from within a PL/SQL procedure. In fact, you can not make any external calls (i.e. calls to the operating system, DLL's, SO's or whatever) from native PL/SQL. If you do want to do this, you need to first "extend" the PL/SQL language - like Oracle did by providing various PL/SQL packages such as the TCP/IP package (often via external procedures that in turn uses dynamic link libraries or shared objects).

PL/SQL is also not suited a a data loading tool. Yes, it can be done using something like UTL_FILE to read from a data file, or even use BFILES and doing raw reads. But why?

Oracle has a tool specifically designed for one purpose only - loading data. It is called SQL*Loader. I suggest you use that. I fail to see the logic in wanting or insisting to use PL/SQL.  

--
Billy
Received on Fri Aug 23 2002 - 02:26:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US