db2ilist用法和说明,以及一台机器上有多个版本的数据库,如何查看所有的实例 First try if the db2ilist command could be run as root. 1) su - root 2)
cd <install path>/instance 3) ./db2ilist
If you are able to
run this as root, and if it returns all the instances created for this install
path. Then check the permission on db2iset.
db2ilist internally calls
db2iset and db2iset should have the following permission. Only root should have
the permission to execute.
-r-xr--r-- 1 root root 173962 Oct 3 2007
db2iset
用root跑出来的db2ilist只能列出该版本的所有instance(v8除外)
显示某server所有的instance(unix/Linux) db2greg
-dump
OLEDB Provider需要你装DB2 CLIENT才会有,从你的描述来看,你是装的IBM Data Server Driver for ODBC and
CLI。。 既然是excel,用ODBC去访问岂不是更方便?我从来没尝试过让excel使用OLEDB PROVIDER去访问DB2数据库.
下面是我能想到的最简单的使用ODBC数据源访问SAMPLE的方法: C:>db2 catalog odbc data source
sample DB20000I CATALOG USER ODBC DATA SOURCE 命令成功完成。
C:>db2 list
odbc data source SQL0104N 在 "DATA" 后面找到异常标记
"source"。预期标记可能包括:"SOURCES"。 SQLSTATE=42601
C:>db2 list odbc data
sources 用户 ODBC 数据源
数据源名
描述 --------------------------------
---------------------------------------- MS Access Database
Microsoft Access Driver (*.mdb, *.accdb) Excel Files
Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) dBASE Files
Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx) sample
IBM DB2 ODBC DRIVER -
DB2COPY1 然后从excel新建查询,就能看到sample数据源并可以使用了。 如果你要保存用户名跟密码到cli文件,可以使用如下命令: C:>db2
update cli cfg for section sample using uid kelvin pwd xxxxx DB20000I UPDATE
CLI CONFIGURATION 命令成功完成。 cli文件的位置: C:Documents and SettingsAll
UsersApplication DataIBMDB2DB2COPY1>db2set -all|find
/i "instprof" [i] DB2INSTPROF=C:Documents and SettingsAll
UsersApplication DataIBMDB2DB2COPY1
添加新评论0 条评论