Menu

#6 primary key constraint error

open
None
5
2002-12-16
2002-12-13
No

Using ArcSDE 8.2 with Oracle 9i on Solaris 8.

I'm running the dbms2sde -o point command
using the -stable option, to load into Oracle
Spatial. I'm receiving the following error:

SE_table_create_primarykey_constraint
encountered a -51 error: Underlying DBMS error.

I've tried it with and without a key column
defined, and I've tried both disabling and
enabling all constraints on the table in Oracle
prior to running.

SDE help is no help -- just reports a vague i/o
error. Any ideas?

Discussion

  • Mark Ohrenschall

    • assigned_to: nobody --> markaohrenschal
     
  • Mark Ohrenschall

    Logged In: YES
    user_id=586167

    Hi Gretchen,

    Can you copy and paste the dbms2sde command-line and screen output into another message? Can you also tell
    me if the table you're spatially enabling into already has a primary key defined -- if it was created by dbms2sde or
    what it's history is?

    Thanks

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks for getting back to me. Here is the output from two
    separate tables that I'm working with -- I'm using the point
    option with one and the quad option with the other. Also --
    both original tables (wpa_map and wpa_point) were originally
    csv files that I loaded into Oracle using SQL Loader. So both
    key fields haven't been specifically defined as primary keys
    that I'm aware of. Thanks!

    sun1:/edp4/sdeadmin % dbms2sde -o quad -l sde.wpabox -
    stable sde.wpa_map -coords
    "minx=DC_COVER13, miny=DC_COVER14,
    maxx=DC_COVER15, maxy=DC_COVER16" -G 4269
    -key RECORD -i 5151 -status statfile -progress progfile -
    summary sumfile -D sdb1
    -s sun1 -u sde -p sde -type Q

    DBMS2SDE release 0.341 Nov 19 2002 - an ArcSDE 8.1
    application

    sun1:/edp4/sdeadmin % more statfile
    For fastest performance, use -stable, -load, and -buffer.

    SE_table_create_primarykey_constraint encountered a -51
    error:
    Underlying DBMS error
    sun1:/edp4/sdeadmin %

    sun1:/edp4/sdeadmin % dbms2sde -o point -l sde.wpapt -
    stable sde.wpa_point
    -xname DC_COV_PL5 -yname DC_COV_PL6 -G 4269 -key
    OBJECTID -i 5151 -status
    statfile -progress progfile -summary sumfile -D sdb1 -s sun1 -
    u sde -p sde -load
    -buffer -type Q

    DBMS2SDE release 0.341 Nov 19 2002 - an ArcSDE 8.1
    application

    sun1:/edp4/sdeadmin % more statfile
    If an error occurs, re-run without -buffer for accurate row
    diagnostics.

    SE_table_create_primarykey_constraint encountered a -51
    error:
    Underlying DBMS error
    sun1:/edp4/sdeadmin %

     
  • Mark Ohrenschall

    Logged In: YES
    user_id=586167

    Can you upload the CSV files and the SQL Loader commands? I will debug this on my end.

     
  • Gretchen Baldus

    Gretchen Baldus - 2002-12-16

    Logged In: YES
    user_id=668188

    I'll attach three files: wpamap.csv, wpapoint.csv, and sqlldr.txt
    which contains both import.ctl files and table definitions for
    performing the sqlldr command. The syntax used for both is
    as follows:

    sun1% sqlldr userid=sde/sde control=import.ctl
    log=import.log bindsize=500000

     
  • Gretchen Baldus

    Gretchen Baldus - 2002-12-16

    point csv file

     
  • Gretchen Baldus

    Gretchen Baldus - 2002-12-16

    other csv file and sqlldr file

     
  • Mark Ohrenschall

    Logged In: YES
    user_id=586167

    I tested this against ArcSDE 8.1.2 and Oracle 8.1.7 and I didn't get an error, however, I would recommend against
    having a column name like "objectid" in your -stable which is a column that ArcSDE wants to create in the -l table

    To prevent this from happening again I may have to hard-code into dbms2sde something that disallows source
    table columns named "objectid". Can you tell me a little about what your intent was by putting this column into
    your source table?

    Did this error happen the very first time you ran dbms2sde, and the -l table did not previously exist?
    When you are making repeated attempts, are you deleting the -l table or "overwriting" (actually appending to) it?

    Would you run dbms2sde again on wpa_map and specify a table you know for sure does not exist the -l option,
    like sde.wpabox1217

    I realize this is a lot of questions -- you can email me privately (markaohrenschal@users.sourceforge.net) with a
    phone number if we should talk about this in person.

     

Log in to post a comment.