By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,279 Members | 1,606 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,279 IT Pros & Developers. It's quick & easy.

Stored procedure for IMPORT

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.