发布网友 发布时间:2022-05-03 08:10
共3个回答
懂视网 时间:2022-04-11 23:56
DB2安装前需要修改配置内核参数,修改/etc/sysctl.conf shmall默认是8G,建议将此参数设置为DB2服务器物理内存的90%,如果内存是16G,就是(16*0.9*1024*1024)/4=3774873,当前环境的物理内存是2G,也就是(2*0.9*1024*1024)/4=471859 shmmax建议和系统物理内存
DB2安装前需要修改配置内核参数,修改/etc/sysctl.conf
shmall默认是8G,建议将此参数设置为DB2服务器物理内存的90%,如果内存是16G,就是(16*0.9*1024*1024)/4=3774873,当前环境的物理内存是2G,也就是(2*0.9*1024*1024)/4=471859
shmmax建议和系统物理内存相等,在64位系统上必须至少设置为1G,即1073741824
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 1024
kernel.shmmax = 2147483648
kernel.shmall = 471859
kernel.sem = 250 256000 32 1024
kernel.randomize_va_space = 0
创建libpam.so软链接,具体参考IBM DB2解决方案
IC87092: DB2PREREQCHECK GIVES WARNING "THE 32-BIT LIBRARY FILE LIBPAM.SO IS NOT FOUND ON THE SYSTEM." WHEN THE REQUIRED LIBPAM.SO.0 EXIST
[root@db2test server]# ln -s /lib/libpam.so.0.81.5 /lib/libpam.so
安装DB2软件
[root@db2test server]# ./db2setup
DBI1190I db2setup is preparing the DB2 Setup wizard which will guide
you through the program setup process. Please wait.
热心网友 时间:2022-04-11 21:04
CREATE PROCEDURE usp_client_insert追答CREATE PROCEDURE usp_client_insert
(
IN i_tradeSNVARCHAR(20),
IN i_scanSNVARCHAR(20),
out o_tradeID INT,
out ErroINT,
out Erro_msgVARCHAR(20)
)
language sql
specific SPOVERTIMEPAY
dynamic result sets 1
modifies sql data
BEGIN
DECLARE re_1 VARCHAR(20) default 'un';
declare exit handler for not found
begin
set Erro =99;
set vErro_msg = 'insert new trade record failed.';
end;
SET o_tradeID = 0;
if (i_tradeSN is null and i_scanSN is null) then
SET Erro =99;
SET Erro_msg = 'no record for insert.';
SIGNAL SQLSTATE '77880'
SET MESSAGE_TEXT = 'no record for insert.';
end if;
if i_tradeSN is null then
SELECT TRADEID INTO o_tradeID FROM TBLTRADES WHERE SCANSN = i_scanSN;
end if;
if i_scanSN is null then
SELECT TRADEID INTO o_tradeID FROM TBLTRADES WHERE TRADESN = i_tradeSN;
end if;
if o_tradeID = 0 then
INSERT INTO TBLTRADES (TRADESN, SCANSN, REMARKS) VALUES ( i_tradeSN,i_scanSN,re_1);
SELECT TRADEID INTO o_tradeID FROM TBLTRADES WHERE TRADESN = i_tradeSN and SCANSN = i_scanSN;
end if;
END;
再试试
热心网友 时间:2022-04-11 22:22
加QQ了