Loading shapefiles into Oracle Spatial

Fellow Oracle Spatiallers!
Currently we edit Oracle Spatial data by checking data out into a shapefile,
making our changes off-line, and reloading the shapefile back into Oracle.
Instead of using the Oracle Spatial supplied tool, we decided to purchase
a utility called the "Spatial Loader" from a company called Geometry Pty Ltd
(http://www.geometryit.com). There are a number of reasons why we decided to
go that way which might become evident from the command line parameters of
this utility:
Usage: Shp2Spt [Arguments] [Options]
OR
Usage: Java com.geometryit.spatialloader.oracle.AdvancedJavaSpatialTranslator [Arguments] [Options]
[Arguments] must specify these values:
-o create
type of operation to perform
create creates a new table, must not exist already
recreate creates a new table, may exist already
init drops existing table, creates a new one
append appends data onto existing table
-f <shape_file>
the shape file or project to translate
-l <table,column>
target table and column for the geometry data
-D <database>
target database name
-u <username>
username for RDBMS
-p <password>
password for RDBMS
[Options] values are not necessarily required:
-s <server_name>
name of server with database
-port <port_number>
the port to connect to on the server
-ufi <column_name>
specify the name of the UFI field (unique ID)
-seq <sequence_name>
specify the sequence to use for the spatial data unique IDs
-a none
attributes mode
none no attributes will be transferred
all all attribtues will be transfered as found
file= file containing lines of the form:
<shape_attribute><space/tab><rdbms_column>
where
<shape_attribute> selects the column to be output
<rdbms_column> name of the column in RDBMS
-srid <id>
specify the Spatial Reference ID for the spatial data
(this must be set to use Spatial Reference Transformations)
-i [<level>] or -i rtree
create an index for the generated table
the <level> parameter is an optional integer
representing the depth of the quadtree created
if rtree is specified, the index created will be
an rtree
-c <commit_interval>
number of rows to commit after
-t <tolerance>
tolerance value for metadata
-r none
used to determine number of decimal places to round vertices to
if you use the tolerance-parameter option, specify the -t parameter before -r
-igc
ignore geometry collections
-sgc
split geometry collections
-sgd f
split geometry direction [forward | reverse]
-update-metadata <true/false>
update the Oracle Spatial Metadata table after loading data
-validate <true/false>
perform Oracle Spatial validation after loading data
-v
verbose mode on
-h or -?
display this help message
The main things I like about this tool are:
1. One step (no conversion to sqlloader form followed by a call to the sqlloader).
2. The ability to round the coordinates of the shapes in the shapefile by applying
the XY tolerance values held in the SDO_GEOM_METADATA table.
This is quite important because our editing package - due to double/single precision
issues - can actually move coordinates but those movements are sub the precision of
the actual data. By rounding to the nominate precision we can detect situations where
no actual change to the shape (and its attributes) was made and thus not create superfluous
revisions within the database.
3. It will correctly re-wind the coordinates of the outer/inner shells of polygons. This is
important as ESRI shapefiles are agnostic on the winding order: an outer shell coordinates
can be listed in either clockwise or anti-clockwise order.
4. You can specify the primary key (UFI) column (numeric) and an Oracle Sequence number such
that each new shape loaded can have its UFI assigned from that sequence.
Because of this flexibility, and the excellent support (it is a purchasable product) from the
developers, I can heartily recommend this loader to fellow Spatiallers. It is worth every
penny I spent on it. Try the free version on their website and if, like me, you like it,
purchase it!
regards
Simon

Hi Shuan,
As part of the zip file created for the next training course to be posted for Oracle Spatial on OTN (within the next few weeks) there is a free (unsupported, undocumented) version of a shape to sdo converter. This should work, but it is unsupported. It will create a layer that then needs to be migrated into 8.1.6 format.
If you need it quite soon send email to [email protected] and I can get it to you.
Hope this helps,
dan

Similar Messages

  • Could not find or load main class oracle.spatial.util.SampleShapefileToJGeomFeature?

    Hi,
    Am getting below error while performing ESRI shapefile into oracle database table.,
    C:\>java -cp G:\app\product\11.2.0\dbhome_1\jdbc\lib\ojdbc14.jar;G:\app\product\
    11.2.0\dbhome_1\md\jlib\sdoutl-1.0.jar;\G:\app\product\11.2.0\dbhome_1\md\jlib\s
    doapi-1.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p
    1521 -sn orcl -u MDSYS -d selva -t shapes -f F:\saptial\Africa.shp -r 8307 -g ge
    ometry
    Error: Could not find or load main class oracle.spatial.util.SampleShapefileToJGeomFeature
    Am using java version as ,
    C:\>java -version
    java version "1.7.0_51"
    Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
    And also tried in MapBuilder its working fine.,but i need to import using java utility can any help me too this.,

    i had tried below this way and problem got solved .,
    Before i have downloaded
    sdoutl-11.2.0.jar and sdoapi-11.2.0.jar used it for import shp file ..
    C:\>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1
    C:\Users\SELVA>cd downloads
    C:\Users\SELVA\Downloads>cd statplanet_zambia
    C:\Users\SELVA\Downloads\StatPlanet_Zambia>cd map
    located into particular path and set my oracle home
    C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1
    C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>java -classpath %ORACLE_HOME%\jdb
    c\lib\ojdbc5.jar;%ORACLE_HOME%\md\jlib\sdoutl-11.2.0.jar;%ORACLE_HOME%\md\jlib\sdoapi-11.2.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p 1521 -s orcl -u MDSYS -d selva -t zambia -f map -r 8307 -g geometry
    host: localhost
    port: 1521
    sid: orcl
    db_username: MDSYS
    db_password: selva
    db_tablename: zambia
    shapefile_name: map
    SRID: 8307
    db_geometry_column: geometry
    Connecting to Oracle10g using...
    localhost, 1521, orcl, MDSYS, selva, zambia, map, null, 8307
    Dropping old table...
    java.sql.SQLException: ORA-00942: table or view does not exist
    Creating new table...
    9 record(s) converted.
    Done.
    Thanks
    Selva

  • Open an Excel file to read and load it into Oracle - Oracle COM Automation

    Hello All,
    Please I need your help for this problem:
    I need to load Excel sheet data (read the data) and load it into Oracle database (insert into a table), the excel file created and has data before, and saved with xls format. and I need to do that using the Oracle® COM Automation (ordcom package). The examples I found open and create a new workbook and deletes the old saved data, so I need to open (edit) the sheet just for reading.
    I appreciate ans sample code to help me do that, Please help me out. This is very urgent.
    Thanks alot and best regards,
    Nabil

    For reading from Excel, there are some easy ways like Oracle Heterogenious Services. If you want to use COM then:
    My orawpcom.dll file exists in the directory C:\oracle\product\10.2.0\db_2\bin
    C:\oracle\product\10.2.0\db_2\bin>dir orawpco*.dll
    Volume in drive C is C_Drive
    Volume Serial Number is 8A93-1441
    Directory of C:\oracle\product\10.2.0\db_2\bin
    03/20/2006  05:06 PM            61,440 orawpcom.dll
    10/11/2006  03:20 PM            81,920 orawpcom10.dll
                   2 File(s)        143,360 bytes
                   0 Dir(s)  65,407,717,376 bytes free
    C:\oracle\product\10.2.0\db_2\bin>Information about my database version.
    SQL> /* My databaser version */
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> Preparing the user SCOTT for COM automation.
    Now, I will run comwrap.sql from scott user. I have edited the comwrap.sql to adjust my library path here:
    create library utils_lib as 'C:\oracle\product\10.2.0\db_3\bin\orawpcom.dll';Running comwrap.sql and ExcelSolution.sql .....
    SQL> conn scott@orclsb
    Enter password: *****
    Connected.
    SQL> @c:\comwrap.sql
    drop library utils_lib
    ERROR at line 1:
    ORA-04043: object UTILS_LIB does not exist
    Library created.
    drop package ORDCOM
    ERROR at line 1:
    ORA-04043: object ORDCOM does not exist
    drop TYPE OAArgTable
    ERROR at line 1:
    ORA-04043: object OAARGTABLE does not exist
    Type created.
    drop TYPE OAArgTypeTable
    ERROR at line 1:
    ORA-04043: object OAARGTYPETABLE does not exist
    Type created.
    drop function OAgetNumber
    ERROR at line 1:
    ORA-04043: object OAGETNUMBER does not exist
    Function created.
    drop function OAgetStr
    ERROR at line 1:
    ORA-04043: object OAGETSTR does not exist
    Function created.
    drop function OAgetBool
    ERROR at line 1:
    ORA-04043: object OAGETBOOL does not exist
    Function created.
    drop function OAsetNumber
    ERROR at line 1:
    ORA-04043: object OASETNUMBER does not exist
    Function created.
    drop function OAsetString
    ERROR at line 1:
    ORA-04043: object OASETSTRING does not exist
    Function created.
    drop function OAsetBoolean
    ERROR at line 1:
    ORA-04043: object OASETBOOLEAN does not exist
    Function created.
    drop function OAInvokeDouble
    ERROR at line 1:
    ORA-04043: object OAINVOKEDOUBLE does not exist
    Function created.
    drop function OAInvokeBoolean
    ERROR at line 1:
    ORA-04043: object OAINVOKEBOOLEAN does not exist
    Function created.
    drop function OAInvokeString
    ERROR at line 1:
    ORA-04043: object OAINVOKESTRING does not exist
    Function created.
    drop function OACreate
    ERROR at line 1:
    ORA-04043: object OACREATE does not exist
    Function created.
    drop function OADestroy
    ERROR at line 1:
    ORA-04043: object OADESTROY does not exist
    Function created.
    drop function OAGetLastError
    ERROR at line 1:
    ORA-04043: object OAGETLASTERROR does not exist
    Function created.
    drop function OAQueryMethods
    ERROR at line 1:
    ORA-04043: object OAQUERYMETHODS does not exist
    Function created.
    Package created.
    Package body created.
    SQL>
    SQL> @c:\ExcelSolution.sql
    drop package ORDExcel
    ERROR at line 1:
    ORA-04043: object ORDEXCEL does not exist
    Package created.
    Package body created.
    SQL>
    I have modified ORDExcel a little bit and renamed it as ORDExcelSB. You need this version for reading the excel.
    SQL> @C:\ExcelSolutionSB.sql
    Package dropped.
    Package created.
    Package body created.
    SQL> The actual code of ORDExcelSB (ExcelSolutionSB.sql) Is:
    set serveroutput on;
    drop package ORDExcelSB;
    CREATE PACKAGE ORDExcelSB AS
       /* Declare externally callable subprograms. */
       FUNCTION CreateExcelApplication(servername VARCHAR2) RETURN binary_integer;
       FUNCTION OpenExcelFile(filename VARCHAR2, sheetname VARCHAR2) RETURN binary_integer;
       FUNCTION CreateExcelWorkSheet(servername varchar2) return binary_integer;
       FUNCTION InsertData(range varchar2, data binary_integer, type varchar2) return binary_integer;
       FUNCTION InsertDataReal(range varchar2, data double precision, type varchar2) return binary_integer;
       FUNCTION GetDataNum(range varchar2) return binary_integer;
       FUNCTION GetDataStr(range varchar2) return varchar2;
       FUNCTION GetDataReal(range varchar2) return double precision;
       FUNCTION GetDataDate(range varchar2) return date;
       FUNCTION InsertData(range varchar2, data varchar2, type varchar2) return binary_integer;
       FUNCTION InsertData(range varchar2, data Date, type varchar2) return binary_integer;
       FUNCTION InsertChart(xpos binary_integer, ypos binary_integer, width binary_integer,
                                  height binary_integer, range varchar2, type varchar2) return binary_integer;
       FUNCTION SaveExcelFile(filename varchar2) return binary_integer;
       FUNCTION ExitExcel return binary_integer;
    END ORDExcelSB;
    CREATE PACKAGE BODY ORDExcelSB AS
       DummyToken          binary_integer;     
       applicationToken binary_integer:=-1;
       WorkBooksToken     binary_integer:=-1;
       WorkBookToken     binary_integer:=-1;
       WorkSheetToken     binary_integer:=-1;
       WorkSheetToken1     binary_integer:=-1;
       RangeToken          binary_integer:=-1;
       ChartObjectToken     binary_integer:=-1;
       ChartObject1          binary_integer:=-1;
       Chart1Token          binary_integer:=-1;
       i                    binary_integer;
       retNum               binary_integer;
       retReal               double precision;
       retStr               varchar2(255);
       retDate               DATE;
    error_src varchar2(255);
    error_description varchar2(255);
    error_helpfile varchar2(255);
    error_helpID binary_integer;
    FUNCTION CreateExcelApplication(servername VARCHAR2) RETURN binary_integer IS
      BEGIN
        dbms_output.put_line('Creating Excel application...');
        i := OrdCOM.CreateObject('Excel.Application',
                                 0,
                                 servername,
                                 applicationToken);
        IF (i != 0) THEN
          ORDCOM.GetLastError(error_src,
                              error_description,
                              error_helpfile,
                              error_helpID);
          dbms_output.put_line(error_src);
          dbms_output.put_line(error_description);
          dbms_output.put_line(error_helpfile);
        END IF;
        dbms_output.put_line('Invoking Workbooks...');
        i := ORDCOM.GetProperty(applicationToken,
                                'WorkBooks',
                                0,
                                WorkBooksToken);
        IF (i != 0) THEN
          ORDCOM.GetLastError(error_src,
                              error_description,
                              error_helpfile,
                              error_helpID);
          dbms_output.put_line(error_src);
          dbms_output.put_line(error_description);
          dbms_output.put_line(error_helpfile);
        END IF;
        RETURN i;
      END CreateExcelApplication;
      FUNCTION OpenExcelFile(filename VARCHAR2, sheetname VARCHAR2)
        RETURN binary_integer IS
      BEGIN
        dbms_output.put_line('Opening Excel file ' || filename || ' ...');
        ORDCOM.InitArg();
        ORDCOM.SetArg(filename, 'BSTR');
        i := ORDCOM.Invoke(WorkBooksToken, 'Open', 1, DummyToken);
        IF (i != 0) THEN
          ORDCOM.GetLastError(error_src,
                              error_description,
                              error_helpfile,
                              error_helpID);
          dbms_output.put_line(error_src);
          dbms_output.put_line(error_description);
          dbms_output.put_line(error_helpfile);
        END IF;
        dbms_output.put_line('Opening WorkBook');
        i := ORDCOM.GetProperty(applicationToken,
                                'ActiveWorkbook',
                                0,
                                WorkBookToken);
        IF (i != 0) THEN
          ORDCOM.GetLastError(error_src,
                              error_description,
                              error_helpfile,
                              error_helpID);
          dbms_output.put_line(error_src);
          dbms_output.put_line(error_description);
          dbms_output.put_line(error_helpfile);
        END IF;
        dbms_output.put_line('Invoking WorkSheets..');
        i := ORDCOM.GetProperty(applicationToken,
                                'WorkSheets',
                                0,
                                WorkSheetToken1);
        IF (i != 0) THEN
          ORDCOM.GetLastError(error_src,
                              error_description,
                              error_helpfile,
                              error_helpID);
          dbms_output.put_line(error_src);
          dbms_output.put_line(error_description);
          dbms_output.put_line(error_helpfile);
        END IF;
        dbms_output.put_line('Invoking WorkSheet');
        ORDCOM.InitArg();
        ORDCOM.SetArg(sheetname, 'BSTR');
        i := ORDCOM.GetProperty(WorkBookToken, 'Sheets', 1, WorkSheetToken);
        IF (i != 0) THEN
          ORDCOM.GetLastError(error_src,
                              error_description,
                              error_helpfile,
                              error_helpID);
          dbms_output.put_line(error_src);
          dbms_output.put_line(error_description);
          dbms_output.put_line(error_helpfile);
        END IF;
        dbms_output.put_line('Opened ');
        RETURN i;
      END OpenExcelFile;
    * Invoke the Excel Automation Server and create a Workbook object as
    * well as a worksheet object
    FUNCTION CreateExcelWorkSheet(servername varchar2) return binary_integer IS
    BEGIN
         dbms_output.put_line('Creating Excel application...');
         i:=ORDCOM.CreateObject('Excel.Application', 0, servername,applicationToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         dbms_output.put_line('Invoking Workbooks...');
         /*i:=ORDCOM.Invoke(applicationToken, 'WorkBooks',0, WorkBooksToken);*/
         i:=ORDCOM.GetProperty(applicationToken, 'WorkBooks', 0, WorkBooksToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         dbms_output.put_line('Invoking Add to WorkBooks...');
         ORDCOM.InitArg();
         ORDCOM.SetArg(-4167,'I4');
         i:=ORDCOM.Invoke(WorkBooksToken, 'Add', 1, WorkBookToken);
    IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         dbms_output.put_line('Invoking WorkSheets..');
         ORDCOM.InitArg();
         ORDCOM.SetArg('Sheet 1','BSTR');
    /*     i:=ORDCOM.Invoke(applicationToken, 'WorkSheets', 1, WorkSheetToken);*/
    i:=ORDCOM.GetProperty(applicationToken, 'WorkSheets', 0, WorkSheetToken1);
    IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
    i:=ORDCOM.Invoke(WorkSheetToken1, 'Add', 0, WorkSheetToken);
    IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         return i;
    END CreateExcelWorkSheet;
    * Invoke the Range method to obtain a range token. Then set the property value
    * at the specified range to the data required
    FUNCTION InsertData( range varchar2,
                             data binary_integer,
                             type varchar2)
                             RETURN binary_integer IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
         IF (i=0) THEN
               i:=ORDCOM.SetProperty(RangeToken, 'ColumnWidth', 15, 'I2');
         END IF;
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN i;
    END InsertData;
    * Invoke the Range method to obtain a range token. Then set the property value
    * at the specified range to the data required
    FUNCTION GetDataNum( range varchar2)
                             RETURN binary_integer IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retNum);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN retNum;
    END GetDataNum;
    FUNCTION GetDataReal( range varchar2)
                             RETURN double precision IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retReal);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN retReal;
    END GetDataReal;
    FUNCTION GetDataStr( range varchar2)
                             RETURN varchar2 IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retStr);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN retStr;
    END GetDataStr;
    FUNCTION GetDataDate( range varchar2)
                             RETURN Date IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.GetProperty(RangeToken, 'Value', 0, retDate);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN retDate;
    END GetDataDate;
    FUNCTION InsertData( range varchar2,
                             data DATE,
                             type varchar2)
                             RETURN binary_integer IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN i;
    END InsertData;
    FUNCTION InsertDataReal( range varchar2,
                             data double precision,
                             type varchar2)
                             RETURN binary_integer IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN i;
    END InsertDataReal;
    FUNCTION InsertData( range varchar2,
                             data varchar2,
                             type varchar2)
                             RETURN binary_integer IS
    BEGIN
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken, 'Range', 1, RangeToken);
         i:=ORDCOM.SetProperty(RangeToken, 'Value', data, type);
         i:=ORDCOM.DestroyObject(RangeToken);
         RETURN i;
    END InsertData;
    * Insert a chart at the x and y position of the spreadsheet with the desired
    * height and width. Then also uses the ChartWizard to draw the graph with data
    * in a specified range area with a specified charting type.
    FUNCTION InsertChart(xpos binary_integer, ypos binary_integer,
                              width binary_integer, height binary_integer,
                              range varchar2, type varchar2) RETURN binary_integer IS
         charttype binary_integer:= -4099;
    BEGIN
         ORDCOM.InitArg();
         i:=ORDCOM.GetProperty(WorkSheetToken, 'ChartObjects', 0, ChartObjectToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         ORDCOM.InitArg();
         ORDCOM.SetArg(xpos,'I2');
         ORDCOM.SetArg(ypos,'I2');
         ORDCOM.SetArg(width,'I2');
         ORDCOM.SetArg(height,'I2');
         i:=ORDCOM.Invoke(ChartObjectToken, 'Add', 4, ChartObject1);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.GetProperty(ChartObject1, 'Chart', 0,Chart1Token);
         ORDCOM.InitArg();
         ORDCOM.SetArg(range, 'BSTR');
         i:=ORDCOM.GetProperty(WorkSheetToken,'Range', 1, RangeToken);
         ORDCOM.InitArg();
         ORDCOM.SetArg(RangeToken, 'DISPATCH');
         IF type='xlPie' THEN
              charttype := -4102;
         ELSIF type='xl3DBar' THEN
              charttype := -4099;
         ELSIF type='xlBar' THEN
              charttype := 2;
         ELSIF type='xl3dLine' THEN
              charttype:= -4101;
         END IF;
         ORDCOM.SetArg(charttype,'I4');
         i:=ORDCOM.Invoke(Chart1Token,'ChartWizard', 2, DummyToken);
         i:=ORDCOM.DestroyObject(RangeToken);
         i:=ORDCOM.DestroyObject(ChartObjectToken);
         i:=ORDCOM.DestroyObject(ChartObject1);
         i:=ORDCOM.DestroyObject(Chart1Token);
         RETURN i;
    END InsertChart;
    * Save the Excel File. WARNING: Do not specify a filename that already exist
    * since there is no graphical context, Oracle would not be able to pop
    * out a warning message for existing file. This causes Excel to hang
    FUNCTION SaveExcelFile(filename varchar2) return binary_integer IS
    BEGIN
         dbms_output.put_line('Saving Excel file...');
         ORDCOM.InitArg();
         ORDCOM.SetArg(filename,'BSTR');
         i:=ORDCOM.Invoke(WorkBookToken, 'SaveAs', 1, DummyToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         RETURN i;     
    END SaveExcelFile;
    * Close the Excel spreadsheet and exit from it
    FUNCTION ExitExcel return binary_integer is
    BEGIN
         dbms_output.put_line('Closing workbook and quitting...');
         ORDCOM.InitArg();
         ORDCOM.InitArg();
         ORDCOM.SetArg(FALSE,'BOOL');
         dbms_output.put_line('Closing workbook...');
         i:=ORDCOM.Invoke(WorkBookToken, 'Close', 0, DummyToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(WorkBookToken);     
         ORDCOM.InitArg();
         dbms_output.put_line('Closing workbooks...');
         i:=ORDCOM.Invoke(WorkBooksToken, 'Close', 0, DummyToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(WorkBooksToken);
         i:=ORDCOM.Invoke(applicationToken, 'Quit', 0, DummyToken);
         IF (i!=0) THEN
         ORDCOM.GetLastError(error_src, error_description, error_helpfile, error_helpID);
         dbms_output.put_line(error_src);
         dbms_output.put_line(error_description);
         dbms_output.put_line(error_helpfile);
         END IF;
         i:=ORDCOM.DestroyObject(WorkSheetToken);     
         i:=ORDCOM.DestroyObject(WorkSheetToken1);     
         i:=ORDCOM.DestroyObject(applicationToken);
         i:=ORDCOM.DestroyObject(ChartObjectToken);
         i:=ORDCOM.DestroyObject(Chart1Token);
         i:=ORDCOM.DestroyObject(ChartObject1);
         i:=ORDCOM.DestroyObject(dummyToken);
         RETURN i;
    END ExitExcel;
    END ORDExcelSB;
    /I have created an excel named as C:\Example.xls.
    Name     SlNo     Job     Dept     Salary     Bonus
    Saubhik Banerjee     706090     IT Specialist     GBS     100     10
    Partha S Mohanty     706091     Pogrmmer     APPS     70     20
    Partha Sarkar     889300     Condultant     FIN     200     30
    Useless     98009     PM     PM     900     90
    SQL> SET SERVEROUT ON
    SQL> DECLARE
      2 
      3    v_Name          varchar2(90);
      4    v_SlNo          varchar2(100);
      5    v_Job           varchar2(200);
      6    v_Dept          varchar2(100);
      7    v_recon_remark  varchar2(50);
      8    v_sal_amt_usd   number;
      9    v_Bonus_amt_usd number;
    10 
    11    result INTEGER;
    12 
    13    i        binary_integer;
    14    filename varchar2(255);
    15 
    16  BEGIN
    17 
    18    filename := 'C:\Example.xls';
    19 
    20    result := ORDExcelSB.CreateExcelApplication('');
    21    result := ORDExcelSB.OpenExcelFile(filename, 'Sheet1');
    22 
    23    /* Excluding the header row and reading the first 5 row */
    24    FOR n in 2 .. 5 LOOP
    25   
    26      v_Name          := ORDExcelSB.GetDataStr('A' || n);
    27      v_SlNo          := ORDExcelSB.GetDataReal('B' || n);
    28      v_Job           := ORDExcelSB.GetDataStr('C' || n);
    29      v_Dept          := ORDExcelSB.GetDataStr('D' || n);
    30      v_sal_amt_usd   := ORDExcelSB.GetDataNum('E' || n);
    31      v_Bonus_amt_usd := ORDExcelSB.GetDataNum('F' || n);
    32   
    33      dbms_output.put_line(v_Name || '  ' || v_SlNo || '  ' || v_Job || '  ' ||
    34                           v_Dept || '  ' || v_sal_amt_usd || '  ' ||
    35                           v_Bonus_amt_usd);
    36   
    37    END LOOP;
    38 
    39    result := ORDExcelSB.ExitExcel();
    40  EXCEPTION
    41    WHEN OTHERS THEN
    42      result := ORDExcelSB.ExitExcel();
    43      RAISE;
    44  END;
    45  /
    Creating Excel application...
    Invoking Workbooks...
    Opening Excel file C:\Example.xls ...
    Opening WorkBook
    Invoking WorkSheets..
    Invoking WorkSheet
    Opened
    Saubhik Banerjee  706090  IT Specialist  GBS  100  10
    Partha S Mohanty  706091  Pogrmmer  APPS  70  20
    Partha Sarkar  889300  Condultant  FIN  200  30
    Useless  98009  PM  PM  900  90
    Closing workbook and quitting...
    Closing workbook...
    Closing workbooks...
    PL/SQL procedure successfully completed.
    SQL> Although, You haven't asked, but you can use this code to write to excel file (.xls)
    DECLARE
    CURSOR c1 IS     
         SELECT empno, ename, dname, sal, hiredate
         FROM emp e, dept d
         WHERE e.deptno = d.deptno;
    error_message varchar2(1200);
    n binary_integer:=2;
    i binary_integer;
    filename varchar2(255);
    cellIndex varchar2(40);
    cellValue varchar2(40);
    cellColumn varchar2(10);
    returnedTime varchar2(20);
    currencyvalue double precision;
    datevalue DATE;
    empno binary_integer;
    looptext varchar2(20);
    error_src varchar2(255);
    error_description varchar2(255);
    error_helpfile varchar2(255);
    error_helpID binary_integer;
    begin
    filename:='c:\example2.xls';
    i:=ORDExcel.CreateExcelWorkSheet('');
    i:=ORDExcel.InsertData('A1', 'EmpNo', 'BSTR');
    i:=ORDExcel.InsertData('B1', 'Name', 'BSTR');
    i:=ORDExcel.InsertData('C1', 'Dept', 'BSTR');
    i:=ORDExcel.InsertData('D1', 'Salary', 'BSTR');
    i:=ORDExcel.InsertData('E1', 'HireDate', 'BSTR');
    For c1_rec IN c1 LOOP
    cellColumn:=TO_CHAR(n);
    cellIndex:=CONCAT('A',cellColumn);
    cellValue:=TO_CHAR(c1_rec.empno);
    empno:=cellValue;
    i:=ORDExcel.InsertData(cellIndex, empno, 'I2');
    cellIndex:=CONCAT('B',cellColumn);
    cellValue:=c1_rec.ename;
    i:=ORDExcel.InsertData(cellIndex, cellValue, 'BSTR');
    cellIndex:=CONCAT('C',cellColumn);
    cellValue:=c1_rec.dname;
    i:=ORDExcel.InsertData(cellIndex, cellValue, 'BSTR');
    cellIndex:=CONCAT('D',cellColumn);
    cellValue:=c1_rec.sal;
    currencyValue:=cellValue;
    i:=ORDExcel.InsertData(cellIndex, currencyValue, 'CY');
    cellIndex:=CONCAT('E',cellColumn);
    dateValue:=c1_rec.hiredate;
    i:=ORDExcel.InsertData(cellIndex, dateValue, 'DATE');
    n:=n+1;
    END LOOP;
    i:=ORDExcel.SaveExcelFile(filename);
    i:=ORDExcel.ExitExcel();
    EXCEPTION
    WHEN OTHERS THEN
      i:=ORDExcel.ExitExcel();
      RAISE;
    END;

  • Extraction of data from Planning and load it into Oracle/SQL server (RDBMS)

    Hi All,
    ODI can extract data from Oracle/SQL server RDBMS and load it into Hyperion planning, but I wanted to know if it is possible to extract data from Hyperion Planning through ODI and load it into Oracle or SQL server RDMBS i.e the other way round.
    Kindly let me know if that is possible or not,If yes then please let me know what is the exact process to achieve this through ODI.
    Thanks & Regrads,
    Gurpreet

    Yes this can be done. Remember that Planning data is actually stored in Essbase so the Knowledge module you will need to use is LKM Essbase to SQL (DATA)

  • Conversion of a shapefile to oracle spatial format

    hi,
    I have got installed oracle9i, arcgis9 and sde9 on my system. I am using direct connection technique. i have tried to export shapefile to geodatabase with the use of SDO_GEOMETRY configuration keyword. But when i am checking at the backend there is no srid value for the exported shapefile in mdsys.sdo_geom_metadatatable.

    Hello Vaneeza:
    We also have the software versions that you mention. how did you load your data from the shapefile to your Oracle database? Did you use the shp2sdo.exe program? If so, then you need to complete this data load by logging into Oracle as the same account used to load the shapefile data and execute a SQL statement (INSERT...) to insert the metadata into the USER_SDO_GEOM_METADATA table. See the Oracle Spatial Users Guide and Reference for more information. I believe the book "Pro Oracle Spatial" covers this topic also. I think you will also have to register the table with ArcSDE, there is an ArcSDE command for this. By default, ArcSDE has something called "autoregistration" turned on, so unless you have changed that setting, then ESRI client apps like ArcMap will "discover" the table in your Oracle database by reading the Oracle metadata.
    R Clement

  • I want to load data into Oracle using XML & Java - hints??

    I have a XML files that are created on a timed basis....they describe a photo and point to a dir where the photo is stored...like...
    <image>
    <user>bill</user>
    <img>photo.jpg</img>
    <img_dir>'/tmp/photos'</img_dir>
    </image>
    I'd like to write a Java program that parses the XML and loads the images, data into Oracle.
    Suggestions on Oracle tools, downloads that will help me accomplish this???
    Thanks!

    Depending on whether you want assistance in doing the insert into the database or whether you don't mind writing the JDBC code to perform the insert, you can get by with only our XML Parser for Java v2, which implements SAX, DOM, XPath, and XSLT standards. The latest beta release (2.1.0) supports SAX2 and DOM2.
    If you want help inserting the XML into tables, then in addition to this, you might want our XML SQL Utility as well.
    http://technet.oracle.com/tech/xml
    Steve Muench
    Lead Product Manager for BC4J and Lead XML Evangelist
    Author, Building Oracle XML Applications
    null

  • Convert shapefile to oracle spatial

    Hi All,
    I have a road network which is shapefile format and i want to export it to oracle spatial format using any free tool, any suggestion or guidance would be highy appretiated. I am using arcgis 9.3.1 and Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bi,
    Best Regards,
    Mich

    Hi Mich,
    That must be one of the most commonly asked questions on this forum, so have a search for "shape" and you won't be short of ideas.
    A Google search will also give you countless suggestions. https://www.google.com/search?q=oracle+spatial+shape+file
    For a GUI driven tool, I would recommend using the GeoRaptor plugin for SQLDeveloper which has an excellent shape file importer/exporter (http://sourceforge.net/projects/georaptor/).
    John

  • Load file into Oracle without staging area

    Is it possible to change LKM to do this?
    Thanks

    Yes it is.
    You can set the 'Work Schema' (staging) of your topology object to the same as your target (Data Schema), then all objects will be created in the target (C$ I$ etc), therefore no staging area is required - although this is not best practice.
    If you want to remove the staging tables altogether, then you can alter the knowledge module to load directly into the target in your LKM. It depends on the method you are using (external tables, sqlloader for example). You IKM will also need amending to basically do nothing, but has to be present for the interface to work.
    Cheers
    Bos
    Edited by: Bos on Apr 7, 2011 8:54 AM

  • Fastest way to load csv into oracle BE table

    I have csv file which is having 10 million records in it . what is the fastest approach to load this data to oracle BE table .
    I am using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options .
    csv format
    first_name,last_name,occupation,address
    above all the fields are of varchar data type.
    I have tried to use external table while inserting its taking too much time .
    Thanks

    hi,
    You can use sql loader.
    options (skip=1)
    LOAD DATA
    INFILE 'csv file path'
    truncate /append
    INTO table table_name
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    trailing nullcols
    column name ,
    column name,
    column name
    {code}
    Create this file as ctl(control file.) on the lcoation where your csv file is.
    Execute it by goint to the path where your csv file resides.
    {code}
    cmd
    cd path where your csv file resides
    sqllder userid=username/password@database name control=your_control_file_name
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Is there a feature to load XML into Oracle 9 ?

    Hello,
    I receive some XML files containing error messages from an external vendor, so i want to load these files into my database, yet i never worked with xml for import, so i dont really know if oracle has a build in feature like sqlldr, that i could make use of.
    I run Solaris 5.8, so i could surely build a shellscript to do the job, as files are consistent. Just i wanted to use oracles tool, if there is any :)
    regards
    thva

    See e.g. XML DB FAQ

  • Error while loading data into Oracle db using SSIS

    Hi,
    Can somebody help regarding the following error message:
    Message
    Error: 2013-07-21 03:23:50.76     Code: 0xC0202009     Source: Data Flow Task 25 Destination 121 - BUSINESSFLOWLOG 1 [466]     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE DB record is available.  Source: "OraOLEDB"  Hresult: 0x80004005  Description: "ROW-00060: Internal error: [dainsert,16]`? ".  End Error  Error: 2013-07-21 03:23:50.76     Code: 0xC0209029     Source: Data Flow Task 25 Destination 121 - BUSINESSFLOWLOG 1 [466]     Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "Destination Input" (479)" failed because error code 0xC020907B occurred, and the error row disposition on "input "Destination Input" (479)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.  End Error  Error: 2013-07-21 03:23:50.76     Code: 0xC0047022     Source: Data Flow Task 25 SSIS.Pipeline     Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination 121 - BUSINESSFLOWLOG 1" (466) failed with error code 0xC0209029 while processing input "Destination Input" (479). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.  End Error  Error: 2013-07-21 03:23:50.78     Code: 0xC02020C4     Source: Data Flow Task 25 Source 121 - BUSINESSFLOWLOG 1 [511]     Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.  End Error  Error: 2013-07-21 03:23:50.78     Code: 0xC0047038     Source: Data Flow Task 25 SSIS.Pipeline     Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source 121 - BUSINESSFLOWLOG 1" (511) returned error code 0xC02020C4.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  03:00  Finished: 03:23  Elapsed:  1431.06 seconds.  The package execution failed.  The step failed.
    THANKS.

    I don't see any Oracle related error.
    Consider posting this on any SSIS forum

  • Want to open an Excel file and load it into Oracle - Oracle COM Automation

    I'm doing some test and I got the following errors in the dbms output:
    Creating Excel application...
    COM-0004: The registered CLSID for the ProgID is invalid.
    Invoking Workbooks...
    COM-0004: The registered CLSID for the ProgID is invalid.
    Invoking Add to WorkBooks...
    COM-0002: Invalid Token or no interface for token
    I tried to register the orawpcom10.dll on the server but I could not.
    I changed the orawpcom10.dll file for a newer one, but I got the same error.
    I tried to google the error messages, but I did not find any solution.
    Could you give me any idea?
    Thanks again,
    Javier
    Edited by: 882807 on 01-sep-2011 6:01

    Sorry, I was a little bit busy at work. You can see my answers below:
    1. Post your database version from v$version.
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL>2. The path where orawpcomxx.dll stored (preferably with dir command from command prompt).
    C:\oracle\product\10.2.0\db_1\BIN>dir orawpco*.dll
    El volumen de la unidad C no tiene etiqueta.
    El número de serie del volumen es: E0C2-001B
    Directorio de C:\oracle\product\10.2.0\db_1\BIN
    22/06/2010  17:40            81.920 orawpcom10.dll
                   1 archivos         81.920 bytes
                   0 dirs  31.090.524.160 bytes libres
    C:\oracle\product\10.2.0\db_1\BIN>3. Definition (CREATE statement) of UTILS_LIB
    create library utils_lib as 'C:\oracle\product\10.2.0\db_1\BIN\orawpcom10.dll';4. Relevant portion of TNSNAMES.ora and LISTNER.ora.
    TNSNAMES.ORA
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
      )LISTENER.ORA
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = vsdwh1.AD.SMS.CARM.ES)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (PROGRAM = extproc)
    ...5. Status (valid/invalid) of ORDExcelSB from all/dba/user_objects.
    SQL> select object_name,object_type,status from all_objects where object_name =
    'ORDEXCELSB';
    OBJECT_NAME                    OBJECT_TYPE         STATUS
    ORDEXCELSB                     PACKAGE             VALID
    ORDEXCELSB                     PACKAGE BODY        VALID
    SQL>6. How you are calling and the actual error (copy paste from SQL prompt).
    SQL> SET SERVEROUT ON
    SQL> DECLARE
      2  v_Name          varchar2(90);
      3  v_SlNo          varchar2(100);
      4  v_Job           varchar2(200);
      5  v_Dept          varchar2(100);
      6  v_recon_remark  varchar2(50);
      7  v_sal_amt_usd   number;
      8  v_Bonus_amt_usd number;
      9  result INTEGER;
    10
    11  i        binary_integer;
    12  filename varchar2(255);
    13  BEGIN
    14
    15  filename := 'C:\Example.xls';
    16
    17  result := ORDExcelSB.CreateExcelApplication('');
    18  result := ORDExcelSB.OpenExcelFile(filename, 'Sheet1');
    19
    20  /* Excluding the header row and reading the first 5 row */
    21  FOR n in 2 .. 5 LOOP
    22
    23  v_Name          := ORDExcelSB.GetDataStr('A' || n);
    24  v_SlNo          := ORDExcelSB.GetDataReal('B' || n);
    25  v_Job           := ORDExcelSB.GetDataStr('C' || n);
    26  v_Dept          := ORDExcelSB.GetDataStr('D' || n);
    27  v_sal_amt_usd   := ORDExcelSB.GetDataNum('E' || n);
    28  v_Bonus_amt_usd := ORDExcelSB.GetDataNum('F' || n);
    29
    30  dbms_output.put_line(v_Name || '  ' || v_SlNo || '  ' || v_Job || '  ' ||
    31  v_Dept || '  ' || v_sal_amt_usd || '  ' ||
    32  v_Bonus_amt_usd);
    33
    34  END LOOP;
    35
    36  result := ORDExcelSB.ExitExcel();
    37  EXCEPTION
    38  WHEN OTHERS THEN
    39  result := ORDExcelSB.ExitExcel();
    40  RAISE;
    41  END;
    42  /
    Creating Excel application...
    COM-0004: The registered CLSID for the ProgID is invalid.
    Invoking Workbooks...
    COM-0004: The registered CLSID for the ProgID is invalid.
    Opening Excel file C:\Example.xls ...
    COM-0002: Invalid Token or no interface for token
    Opening WorkBook
    COM-0002: Invalid Token or no interface for token
    Invoking WorkSheets..
    COM-0002: Invalid Token or no interface for token
    Invoking WorkSheet
    COM-0002: Invalid Token or no interface for token
    Opened
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    0      0  0
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    0      0  0
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    0      0  0
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    0      0  0
    Closing workbook and quitting...
    Closing workbook...
    COM-0002: Invalid Token or no interface for token
    Closing workbooks...
    COM-0002: Invalid Token or no interface for token
    COM-0002: Invalid Token or no interface for token
    PL/SQL procedure successfully completed.
    SQL>Thanks again for your interest.
    Javier

  • Is Oracle Spatial, Mapbuilder and Mapviewer supports TTF(True Type Fonts)

    Hi to all,
    Is Oracle Spatial, Mapbuilder and Mapviewer Supports TTF,How to load TTF into Oracle Spatial and how to assign TTF to Point Data,
    i think Map Builder had option,but how load using map builder,
    is any Oracle script to load TTF,pl provide help.
    Regards,
    Ramakrishna.V

    You can only use ttf symbols for markers.
    in MapBuilder click on Tools menu, click on Import Truetype font.
    Use the mapbuilder that is part of the latest kit on OTN. It contains some fixes for TTF handling.

  • Is Oracle Spatial or Oracle Mapbuilder supports TTF(True Type Fonts)

    Hi to all,
    Is Oracle Spatial or Mapbuilder Supports TTF,How to load TTF into Oracle Spatial and how to assign TTF to Point Data,
    i think Map Builder had option,but how load using map builder,
    is any Oracle script to load TTF.pl provide help.
    Regards,
    Ramakrishna.V

    You can only use ttf symbols for markers.
    in MapBuilder click on Tools menu, click on Import Truetype font.
    Use the mapbuilder that is part of the latest kit on OTN. It contains some fixes for TTF handling.

  • How to load XML files into oracle

    I am new to XML.I have a few XML files.I want to load them into oracle.I have oracle client on my win2000 machine version 8.1.6.3.
    I cannot find Loadjava.jar file in ORACLE_HOME\bin directory.
    Where is the XSU-dsl and the XDK utility?Do i need to down load it?

    This forum is dedicated to the XML Features of 9iR2, and to a lesser extent 9i. Questions related to XML and earlier versions of the database should be posted in Technologies -> General -> XML...
    I will move this thread to the appropriate forum if required.

Maybe you are looking for

  • Itunes can not locate my music files.

    I have just moved the whole of 'My Documents' to a new internal drive as i was running out of space in the old drive. Then after doing this, i deleted my original 'My Documents' off the old drive. However, now about 80% of my music all needs locating

  • Editing base value or excise duty during Posting of Excise invoice

    Hi, System is getting greyed out and not allowing to change the base value or Excise duty values during posting of excise invoice, where as it is allowing during capturing the excise invoice. How to change this? We require facility during posting. Is

  • Problems Editing in iPhoto 6.04

    When I try to edit photos in iPhoto, they will load just fine, but if I try to do anything to them (including zooming, cropping, applying an effect, etc...) the picture becomes invisible. I can actually make the changes to the picture, I just can't s

  • HT1338 kernel panic crashes mac book pro

    I have a duo mac book pro 2.93 late 2008/early 2009 I took it to apple because it crashes a lot. They told me that the hardware was fine and did not need repair the hardware. I changed the HDD as it had flaws and reinstalled lion. I mistakenly upgrad

  • Web Based Utiliies for WRT300N

    I forgot my username and password. Is there a way to reset, or is there any other way I can get into my utilities?