469,649 Members | 1,177 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,649 developers. It's quick & easy.

Stored procedure for IMPORT

DB2 now comes with a stored procedure called SYSPROC.DB2LOAD that can
execute a LOAD, but the IMPORT syntax does not work using the SP. This
seems curious to me since a stored procedure is most likely to be used
from an application program and the LOAD command requires sysadm,
dbadm, or load authority on the entire database. Whereas, IMPORT
authority can be granted on an individual table only (with CONTROL).
Therefore, an application program would most likely do an IMPORT since
granting authority for a LOAD is usually unacceptable.

Is there a stored procedure that will execute an IMPORT or any CLI
command?

Aug 14 '06 #1
5 5735
Mark A wrote:
DB2 now comes with a stored procedure called SYSPROC.DB2LOAD that can
execute a LOAD, but the IMPORT syntax does not work using the SP. This
seems curious to me since a stored procedure is most likely to be used
from an application program and the LOAD command requires sysadm,
dbadm, or load authority on the entire database. Whereas, IMPORT
authority can be granted on an individual table only (with CONTROL).
Therefore, an application program would most likely do an IMPORT since
granting authority for a LOAD is usually unacceptable.

Is there a stored procedure that will execute an IMPORT or any CLI
command?
The procedure described here also uses the db2Load() API, but you can easily
adjust it to do an IMPORT instead:
http://www-128.ibm.com/developerwork...dm-0505stolze/

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Aug 14 '06 #2
Knut Stolze wrote:
The procedure described here also uses the db2Load() API, but you can easily
adjust it to do an IMPORT instead:
http://www-128.ibm.com/developerwork...dm-0505stolze/

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
How about IBM adjusting it?

Aug 14 '06 #3
Mark,

Try the admin_cmd() procedure.
http://publib.boulder.ibm.com/infoce...c/r0012547.htm
Import has been supported with it since DB2 V8.2 I think.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 14 '06 #4
Mark A wrote:
Knut Stolze wrote:
>The procedure described here also uses the db2Load() API, but you can
easily adjust it to do an IMPORT instead:
http://www-128.ibm.com/developerwork...dm-0505stolze/
>>

How about IBM adjusting it?
You are talking about the article? Because V9 handles import via the
ADMIN_CMD procedure alreadp

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Aug 14 '06 #5
Serge Rielau wrote:
Mark,

Try the admin_cmd() procedure.
http://publib.boulder.ibm.com/infoce...c/r0012547.htm
Import has been supported with it since DB2 V8.2 I think.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
I am still using V8.2. According to the 8.2 doc, the ADMIN_CMD
procedure currently supports the following CLP commands:

DESCRIBE
EXPORT
PRUNE
HISTORY/LOGFILE
REORG INDEXES/TABLE
RUNSTATS
UPDATE DATABASE CONFIGURATION

But it is good to know that it will support IMPORT in V9.

Aug 14 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Jerry | last post: by
reply views Thread by jabernet | last post: by
3 posts views Thread by jynxxxed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.