顯示具有 DB2 標籤的文章。 顯示所有文章
顯示具有 DB2 標籤的文章。 顯示所有文章

2022年5月14日 星期六

IBM DB2 11.5 clients and drivers

https://www.ibm.com/support/pages/download-initial-version-115-clients-and-drivers?mhsrc=ibmsearch_a&mhq=IBM%20Data%20Server%20Driver%20Package

需先註冊成為IBM網站會員,註冊免費
沒有特殊需求請下載IBM Data Server Driver Package (DS Driver)


以下引自官網資料

Document Information

More support for:
IBM Data Server Client Packages

Software version:
11.5

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
387577

Modified date:
04 May 2022

2019年1月2日 星期三

不同資料庫SQL Script語法轉換器

線上版
http://www.sqlines.com/online

軟體版(免安裝)
http://www.sqlines.com/download
SQLines SQL Converter is an open source tool (Apache License 2.0) that helps you convert database schema (DDL), queries and DML statements, views, stored procedures, packages, functions and triggers.

原始碼
https://github.com/dmtolpeko/sqlines

2016年4月28日 星期四

在IBM Data Studio好像沒辦法使用DESCRIBE TABLE指令

Select distinct(name), ColType, Length, NULLS from Sysibm.syscolumns where tbname = 'employee';
IBM Data Studio好像沒辦法使用DESCRIBE TABLE指令
先改用這方式去查

資料來源:
How to view DB2 Table structure
http://stackoverflow.com/questions/2973186/how-to-view-db2-table-structure

2016年4月25日 星期一

2016年4月22日 星期五

check db2 version版本

http://stackoverflow.com/questions/3821795/how-to-check-db2-version

利用SSIS將DB2轉檔所需資料庫驅動程式

可以安裝IBM Data Server Driver Package (DS Driver)

設定ODBC Data Source選擇IBM DB2 ODBC DRIVER -IBMDBCLI
10.5的32位元版本安裝檔檔名:ibm_data_server_driver_package_win32_v10.5.exe
10.5的64位元版本安裝檔檔名:ibm_data_server_driver_package_win64_v10.5.exe
也可以使用Microsoft OLE DB Provider for DB2


2022/5/14更新
舊連結失效,請使用以下新連結(需先註冊成為IBM網站會員,註冊免費)
Download initial Version 11.5 clients and drivers
https://www.ibm.com/support/pages/download-initial-version-115-clients-and-drivers?mhsrc=ibmsearch_a&mhq=IBM%20Data%20Server%20Driver%20Package

 


2016年4月21日 星期四

db2cli.ini路徑

比如 C:\ProgramData\IBM\DB2\DB2COPY1\db2cli.ini

※db2cli.ini是以明碼存放密碼※

ref:
db2cli.ini initialization file
Tracing the CLI driver by using the db2cli.ini file

2016年4月16日 星期六

各種資料庫Select first rows的方式

SQL - Select first 10 rows only? - Stack Overflow
http://stackoverflow.com/questions/1891789/sql-select-first-10-rows-only

(小工具)依照TABLE清單產生SQL語法

因為最近有要將DB2資料庫所有的Table匯出成del檔
自己用C#寫了一個小工具去產生export語法
如有需要可以自行下載

專案網址:
https://bitbucket.org/rexhuang/c-_sqlstringconcatenate
執行檔位於\SQLStringConcatenate\bin\Release資料夾下

程式介面:

各種資料庫List All Tables

How to List All Tables and Describe Tables in Oracle, MySQL, DB2 and PostgreSQL
http://onewebsql.com/blog/list-all-tables

2016年4月15日 星期五

DB2列出資料庫所有Table的語法(利用export匯出成檔案)




搜尋關鍵字:
DB2 list all tables
DB2 get list of all tables

2012年8月13日 星期一

db2開機啟動


db2iauto -on db2inst1

2012年7月12日 星期四

db2move筆記

1.export和import可以不同db2版本
2.不用重新CREATE INDEX
3.要重新CREATE SEQUENCE
4.
重新CREATE VIEW

2012年7月5日 星期四

2012年7月4日 星期三

top 10 most active and update tables in db2 udb database

http://database.ittoolbox.com/groups/technical-functional/db2-l/how-to-grep-top-10-most-active-and-update-tables-in-db2-udb-database-4100480


select substr(abc.tabname,1,40) as TABNAME,abc.rows_written as rowswritten
from SYSIBMADM.snaptab abc
order by abc.rows_written desc fetch first 10 rows only; 

2012年7月2日 星期一

日誌空間大小

db2日誌空間大小由3個參數控制:logprimary、logsecond、logfilsiz
誌空間的最大限制是 ( logprimary + logsecond) * logfilsiz *4Klogprimary + logsecond不能超過255誌空間大小不能超過256 GB

2012年4月15日 星期日

ibmdefaultbp

db2預設的bufferpool,預設的pagesize是4K

DB2預設的Codeset

V9.5之前:不指定是根據系統的Locale
V9.5之後(含V9.5):UTF-8

p.s.1.UTF-8的Codepage是1208;BIG5的Codepage是950
p.s.2.Database建立後無法更改Codeset
p.s.3.Group分為single-byte ("S")、 double-byte ("D")和neutral ("N"),同Group的Codepage可以互相轉換。S及D可以轉為N;N不一定能轉成S及D。1208屬於N組;950是D組。

DB2 Tablespace 大小限制

V8:pagesize 32K => 256 GB
V9:pagesize 32K => 16 TB