473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

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 5867
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
2
by: Samir Pandey | last post by:
I have a table which contains approx 3,00,000 records. I need to import this data into another table by executing a stored procedure. This stored procedure accepts the values from the table as...
5
by: Raquel | last post by:
This is a very simple DB2 SQLJ stored procedure. The problem is that it seems to run fine but returns NOTHING. I mean..as if nothing has happened..not resultset is returned. I am passing value...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
7
by: Jerry | last post by:
I'm trying to execute a stored procedure in a loop while paging through database table records but the stored procedure isn't running. I get the folowing error: The component 'adodb.connection'...
0
by: jabernet | last post by:
As importing/exporting data ist not directly supported for JDBC/SQLJ, we call a c-stored procedure which uses the administrative API for exporting/importing. Now with the newest DB2 8.1 Fixpack...
3
by: jynxxxed | last post by:
I've been reviewing some of the threads here and applying some of the advice and still getting the same error. 15:50:26,935 INFO java.sql.SQLException: Could not find stored procedure...
1
by: jynxxxed | last post by:
I've been reviewing some of the threads here and applying some of the advice and still getting the same error. 15:50:26,935 INFO java.sql.SQLException: Could not find stored procedure...
0
by: Geethu03 | last post by:
Hi I had a doubt in Mysql Stored procedure. i need to read a text file (that is stored in mysql database) using the Stored procedure. i know little bit about the Stored procedure but i am not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.