惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
PCI Perspectives
PCI Perspectives
Webroot Blog
Webroot Blog
罗磊的独立博客
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
Last Week in AI
Last Week in AI
美团技术团队
Help Net Security
Help Net Security
The Hacker News
The Hacker News
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
The Register - Security
The Register - Security
IT之家
IT之家
WordPress大学
WordPress大学
Jina AI
Jina AI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Help Net Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
NISL@THU
NISL@THU
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
Scott Helme
Scott Helme
V
Vulnerabilities – Threatpost
B
Blog
T
Tenable Blog
博客园 - 三生石上(FineUI控件)
T
The Exploit Database - CXSecurity.com
S
Security Affairs
小众软件
小众软件
Hacker News: Ask HN
Hacker News: Ask HN
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
W
WeLiveSecurity
A
Arctic Wolf
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence

博客园 - 南守拥

申请认证 java monitor file java mina unix client asp.net 跑 socket server epoll 多线程 服务器 PAZU 是4Fang 为配合“四方在线”软件于2004年开发的WEB打印控件,适用于各种WEB软件项目的打印。 jbpm表说明 7-1 6-3 6-2 6-1 同步机制摘要 3-3 - 南守拥 - 博客园 3-2 - 南守拥 - 博客园 3-1 2-6 - 南守拥 - 博客园 2-4 - 南守拥 - 博客园 2-3 - 南守拥 - 博客园 2-2 - 南守拥 - 博客园
DB2 sequence 迁移
南守拥 · 2013-01-10 · via 博客园 - 南守拥

DB2中批量导出Sequence

如下脚本,可以将某个用户的全部sequence查询出来,并拼成创建语句。

代码如下:

select  'CREATE OR REPLACE SEQUENCE ' ||SEQNAME||   

        ' AS INT '||       

         ( case  when LASTASSIGNEDVAL IS NULL  then ' START WITH '||CHAR(BIGINT(START)+1)  else ' START WITH '||CHAR(BIGINT(LASTASSIGNEDVAL)+1) end)||

        ' INCREMENT  BY ' ||INCREMENT||

        ' MINVALUE ' ||MINVALUE||   

        ' MAXVALUE ' ||MAXVALUE||

       ' ORDER '|| ';' 

from SYSIBM.SYSSEQUENCES where OWNER= 'DAGGER'   

注意:其中的DAGGER,是需要导出sequence的用户,貌似必须大写的说!并且使用该脚本的用户需要有访问SYSIBM.SYSSEQUENCES的权限。

说明:( case  when LASTASSIGNEDVAL IS NULL  then ' START WITH '||START else ' START WITH '||LASTASSIGNEDVAL end)

LASTASSIGNEDVAL 为null时,start with的取START值,否则取LASTASSIGNEDVAL

导出结果如下:

CREATE OR REPLACE SEQUENCE ETL_SCHE_EVENT_INST_SEQ AS INT  START WITH 21000 INCREMENT  BY 1 MINVALUE 1 MAXVALUE 2147483647 ORDER ;

CREATE OR REPLACE SEQUENCE ETL_SCHE_FILE_INST_SEQ AS INT  START WITH 21277 INCREMENT  BY 1 MINVALUE 1 MAXVALUE 2147483647 ORDER ;