RE: SQL0289N Unable to allocate new pages in table space "USERSPACE1

RE: SQL0289N Unable to allocate new pages in table space "USERSPACE1

 

  

Probably there will not be any free pages in that tablespace.

Issue the following command:

Db2 "list tablespaces show detail"

Thanks,

Jayaprakash.

-----Original Message-----
From: Iswariya Vasan
[mailto:db2udbdba-ezmlmshield-x530082.[Email address protected]
Sent: Thursday, March 31, 2005 2:46 PM
To: LazyDBA Discussion
Subject: SQL0289N Unable to allocate new pages in table space
"USERSPACE1



Hi All,

I've a procedure which when executed will generate a receipt number and
will insert this generated number into header and detail tables. But
when I call this procedure, Iam facing the following problem :-

SQL0289N Unable to allocate new pages in table space "USERSPACE1

Can anybody sort me out please??. Its quite urgent.

Procedure :-

CREATE PROCEDURE LOAD_SMETRO_TABLES
(
IN COUNTER INT
)
dynamic result sets 1
language sql
BEGIN

DECLARE COUNTER_TMP INT;

Declare errorid int;
declare recp_no varchar(20);
declare single_receiptnumber varchar(20);
DECLARE I INT;
declare temp1 etwhdncontrol1;
declare temp2 etwhdncontrol1;
declare inc_num int;


SET ERRORID=-915;
set temp1 = 'A';
set temp2 = 'B';


SET COUNTER_TMP=COUNTER;
SET I=1;

WHILE I<= COUNTER_TMP DO

--The following procedure will generate a new receipt number and is
stored in recp_no parameter.
call rrs_autogen_num (2,
cast('RRSUSER' as ctxt_user),
cast('ETWRRSFOBC' as etwrrsfunction),
cast('ETWRRS_A_RECMTRPT' as
etwrrsactivity),
cast('t' as etwhdncontrol1),
temp1,
temp2,
recp_no,
errorid);

set single_receiptnumber = recp_no;


insert into etw_rrs_smetro_hdr
( account_number,
transaction_date,
location_code,
receipt_number,
account_override,
days_delay,
remarks,
amt_due,
amt_paying,
novel_user_id,
receipt_status,
cash_tendered,
cash_paying,
timestamp,
createddate,
createdby,
login_role)
values( ucase(cast('83011396313' as varchar(20))),
current date,
2,
ucase(cast(single_receiptnumber as varchar(20))),
0,
0,
CAST('PERFORMANCE TESTING' AS VARCHAR(50)),
2000,
2000,
cast('RRSUSER' AS CTXT_USER),
ucase('REC'),
2000,
2000,
0,
current timestamp,
cast('RRSUSER' as ctxt_user),
cast('CASHIER' AS ctxt_role));
insert into etw_rrs_smetro_dtl
( receipt_number,
location_code,
transaction_date,
increment_number,
payment_mode,
payment_amount,
cheque_number,
cheque_date,
drawers_name,
bank_code,
cheque_dep_status,
timestamp ,
createddate,
createdby,
login_role)
values( cast(single_receiptnumber as varchar(20)),
2,
current date,
1,
cast('CHQ' as varchar(50)),
100,
cast('PERFTEST1' as varchar(20)),
CURRENT DATE,
cast('PERF TESTER' as varchar(100)),
'STD',
cast('N' as etwrrshdncode),
0,
CURRENT TIMESTAMP,
CAST('RRSUSER' AS ctxt_user),
cast('CASHIER' AS ctxt_role)
);


END WHILE;
END

Regards
Iswariya Vasan



---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

DB2 & UDB email list listserv db2-l LazyDBA home page