Question about sqlreload in sqlcmd-87.00 utility f
Posted in 2011
Topics: Storage & Space Management, Migration, Import/Export & Data Conversion
Good morning. Quick question about the binary 'sqlreload' in the utility set sqlcmd-87.00.tgz from the iiug software repository: When I'm replacing data using Art's 'myimport' utility to replace data on my development db server from export file, does 'sqlreload' scan each row on individual tables for changes? Or does it do a delete * from <table> and then insert rows from the export file? Just curious how it's processing. Example of the myimport command I'm using: # myimport pomona_db -q -e -p -m -d dbspace1 -l nolog -i /net/dbexport Thank-you for any insight. Sincerely, Jonathan B. Smaby<http://www.facebook.com/photo.php?pid=392289&l=a2b304ccd3&id=1000008613412 48> Pomona College phone: (909) 621-8506 email: jonathan.smaby@pomona.edu http://wwww.facebook.com/JonathanSmaby ------------------------------------------------------------- This message has been scanned by Postini anti-virus software.
It doesn't do either. Myexport, whether using sqlreload, iploader, or
external tables, does exactly what dbimport would do, insert rows to the
table(s). The tool you are thinking of to perform an upsert or merge
operation where a give data row may or may not already exist is Jonathan's
sqlupload (also part of the sqlcmd package) which myimport does NOT use.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Fri, Mar 4, 2011 at 1:01 PM, Jonathan Smaby
<Jonathan.Smaby@pomona.edu>wrote:
> Good morning.
>
> Quick question about the binary 'sqlreload' in the utility set
> sqlcmd-87.00.tgz from the iiug software repository: When I'm replacing data
> using Art's 'myimport' utility to replace data on my development db server
> from export file, does 'sqlreload' scan each row on individual tables for
> changes? Or does it do a delete * from <table> and then insert rows from
> the
> export file? Just curious how it's processing.
>
> Example of the myimport command I'm using:
>
> # myimport pomona_db -q -e -p -m -d dbspace1 -l nolog -i /net/dbexport
>
> Thank-you for any insight.
>
> Sincerely,
>
> Jonathan B.
> Smaby<
> http://www.facebook.com/photo.php?pid=392289&l=a2b304ccd3&id=100000861341248
> >
> Pomona College
> phone: (909) 621-8506
> email: jonathan.smaby@pomona.edu
> http://wwww.facebook.com/JonathanSmaby
>
> -------------------------------------------------------------
> This message has been scanned by Postini anti-virus software.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf303a2c0f1ea52f049dac2b76
On Fri, Mar 4, 2011 at 10:01, Jonathan Smaby <Jonathan.Smaby@pomona.edu>wrote: > Quick question about the binary 'sqlreload' in the utility set > sqlcmd-87.00.tgz from the iiug software repository: When I'm replacing data > using Art's 'myimport' utility to replace data on my development db server > from export file, does 'sqlreload' scan each row on individual tables for > changes? Or does it do a delete * from <table> and then insert rows from > the > export file? Just curious how it's processing. > > Example of the myimport command I'm using: > > # myimport pomona_db -q -e -p -m -d dbspace1 -l nolog -i /net/dbexport > sqlreload is the exact opposite of sqlunload (and the same length of name); it could have been 'sqlload' but then the names aren't the same length. That means it simply inserts data and fails if the row is already present and there's a unique constraint violation. There is another program, sqlupload (separate binary; been in alpha state for the last 10 years or so) that looks to see if the record is already there and inserts or updates accordingly. To some extent, though, it has been superseded by the combination of the MERGE statement and the EXTERNAL TABLE feature. It may never progress out of alpha state. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." --00151747849e0a62f1049db1fcec