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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to update Oracle database from Access database ?

Re: How to update Oracle database from Access database ?

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 28 Feb 2003 01:13:28 GMT
Message-ID: <MPG.18c8578fe39e81ce9896d6@news.la.sbcglobal.net>


damorgan_at_exesolutions.com said...
> sean wrote:
>
> > I have huge amount of data in Access (on Win98) that I need to update
> > to Oracle 7.3.4 database. But first I need to clear /delete the
> > content of each tables in the Oracle. I've tried using "delete * from
> > my_table" under SQL*Plus or svrmgr23 but doesnt work.
> >
> > I know I can use Msaccess to delete and append data to oracle, via
> > linked tables. But its taking hours...
> >
> > Appreciate any help.
> > sean
>
> Use
>
> TRUNCATE TABLE <table_name>;
>
> The correct delete statement, which I would advise against using, is:
>
> DELETE FROM <table_name>;
>
> And get yourself out of server manager. You have no business doing
> anything there except DBA specific functions that can not be done as
> another user. Keep this up and you will likely trash the entire database.
>
> Daniel Morgan
>
>

One caveat on TRUNCATE TABLE:

If you have FK constraints enabled, you'll get "ORA-02266: unique/primary keys in table referenced by enabled foreign keys" when you try to truncate the table (even if the table is empty).

Just ran into that today when I suggested a developer use TRUNCATE since it moves the highwater mark to the beginning of the data area.

-- 
/Karsten
DBA > retired > DBA
Received on Thu Feb 27 2003 - 19:13:28 CST

Original text of this message

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