Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
Posted: Mon Mar 15, 2004 9:21 am Post subject: Fast unload error for partiotioned table space
Hi,
We are trying to unload data from a partitioned table space with the following query.
select col1,col2
FROM table1 PART 1,2,3,4,5,6,7,8,9,10,11,12
WHERE col2 < (CURRENT TIMESTAMP - 30 MONTHS)
;
But we are getting the error
FU073 - FUNCTION: "PART XXX" INVALID WITH THIS SELECT --
FU074 --THIS FUNCTION NOT AVAILABLE VIA SQL ACCESS, WHICH THIS SELECT REQUIRES
FU075 - INVALID SELECT STATEMENT - SEE DOCUMENTATION
Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
Posted: Mon Mar 15, 2004 11:30 am Post subject:
Hi Kolusu,
It worked. Thank you very much.
Could you please tell me what difference it makes bu putting SQL-ACCESS = NONE and why WHERE clause is not allowed with EXTENSION?
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Mon Mar 15, 2004 11:47 am Post subject:
Ranjish,
Here is an explanation about SQL ACCESS.
SQL-ACCESS specifies the type of access Fast Unload should use to unload the data.
If you use SQL-ACCESS to unload table data, only one SELECT statement is processed at a time, in the order specified in the Fast Unload control cards. No other SELECT statement using VSAM, EXCP or SQL-ACCESS are processed at the same time. The SELECT statements using VSAM or EXCP are processed first, followed by the SQL-ACCESS SELECTs, which are processed in the order specified in the Fast Unload control statements.
SQL-ACCESS None means Do not use SQL access. If Fast Unload cannot process the SELECT
statement using VSAM or EXCP, an error message is issued and processing ends.This is the default. You can set the default for this keyword with the SQL-ACCESS parameter of the PFU member of highlvl.PARMLIB. You must specify NONE to unload data from image copies, concurrent copies, and DSN1COPYs.
SQL-ACCESS ONLY means use only SQL access to unload the tablespaces. This option lets you use any valid SELECT statement. Only one SELECT statement is processed at a time.The statements using VSAM or EXCP is processed first, followed by the SQL ACCESS SELECT statements, which is processed in the order specified in the Fast Unload control statements. You cannot include an ORDER-CLUSTERED clause, or the PART or OBID parameter with this option. You must specify SQLACCESS ONLY to use TRIM with ASCII objects. With SQL-ACCESS ONLY, DB2 determines locking. To preserve data integrity, you must specify LOCKSIZE TABLE on the tablespace.
SQL-ACCESS EXTENSION means use EXCP or VSAM processing if possible; otherwise use SQL
access. If you specify SQL-ACCESS EXTENSION, only those SELECT statements that require SQL access use it; all other SELECT statements are multi-tasked and unloaded using VSAM or EXCP. If you specify SQL-ACCESS EXTENSION with the PART or OBID parameter, and SQL-ACCESS is required, an error message is issued and processing terminates. Fast Unload performs the sort for an ORDER clause provided the ORDER specification uses column numbers or simple names. DB2 performs the sort for ORDER clauses that include column names with correlation variables.
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue Mar 16, 2004 3:52 am Post subject:
Ranjish,
In your example shown only one SELECT statement is processed at a time, in the order specified in the Fast Unload control cards. But in your very first sql you are clubbing all the partitions of the table in a single sql statement which is internally is combo of mutiple sql's. Each part consitute to a single a sql.SELECT statements are multi-tasked and unloaded using VSAM or EXCP.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum