a.服务端安装 v11.1_win64_expc.zip 官网下载 b.客户端安装 Toad for DB2 Freeware 6.1 百度找找 1.建数据库 create database HRA_GF 2.建信道 catalog tcpip node gf remote 192.168.2.252 server 50000 3.1 别名 catalog database HRA_GF as hServer at node gf 3.2 数据库挂在信道上 catalog database HRA_GF at node gf 3.3 terminate 刷新 3.4 db2 4.连接数据库 connect to HRA_GF user db2admin using Hhgf2017 5.删除节点 uncatalog node gf 6. 获取序列下一个值 select nextval for BAS_MODULE_SEQ from sysibm.sysdummy1 7.创建函数结合序列值获取 CREATE function BAS_SEQ () RETURNS BIGINT LANGUAGE SQL CONTAINS SQL NO EXTERNAL ACTION DETERMINISTIC BEGIN ATOMIC Declare cd BIGINT; --时间 set cd=next value for BAS_MODULE_SEQ; RETURN cd; END ;
时间: 2024-10-26 06:56:31