當前位置:首頁 » 數據倉庫 » linuxdb2查看資料庫
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

linuxdb2查看資料庫

發布時間: 2022-07-11 02:24:08

① 在windows平台上查看linux上的db2資料庫

看就是了啊...用工具啊...linux工具(如SecureCRT等)..資料庫工具(quest)皆可...

② linux 查看db2 資料庫使用了多少空間

Linux下操作db2資料庫的用戶,就是Linux系統用戶,Linux下有多少用戶,就有多少可以操作db2的,不過在操作之前,要配置用戶目錄下.bashrc文件,且要將資料庫的連接許可權放給用戶

③ 怎樣設置linux上db2資料庫的遠程訪問許可權

DB2連接遠程資料庫實例的步驟 一: 開始菜單--------運行--------輸入地db2cmd地,進入DB2命令行處理器,如下圖: 二:輸入地db2地,進入命令處理狀態,如下圖: 三:輸入 CATALOG TCPIP NODE nodeone REMOTE 192.9.107.64 SERVER 50000 remote_instance db2admin 注:其中nodeone為自己取的節點名稱,192.9.107.64為遠程資料庫的IP地址,db2admin為遠程資料庫的實例.結果如下: 四:輸入 CATALOG DB RONESERV AS testdb AT NODE nodeone 注:其中RONESERV為遠程資料庫的名稱,testdb為該遠程資料庫在本地機器上的別名,nodeone為步驟三中我們建立的節點名稱 五:此時即可像操作本地資料庫一樣操作遠程資料庫了,輸入: connect to testdb user db2admin using lianxi 注:其中testdb為我們在步驟四中為遠程資料庫指定的別名,db2admin為遠程資料庫的用戶名,lianxi為遠程資料庫的密碼 此時您可看到,DB2的控制中心能像操作本地資料庫一樣操作遠程資料庫了.

④ 如何查看linux中db2資料庫佔了裸設備多少空間

如要清除日誌,直接刪掉不就行了,找到log文件後直接刪除 log 的存放路徑用下邊的命令查看: db2 get db cfg for dbname 其中有Path to log files 一行顯示了log 的存放路徑

⑤ linux下用命令怎麼顯示db2資料庫的所有表

導出命令我記得是這個形式,xxx是表名,你需要把所有表都導出來。會有N條找IBM的工程師協助你弄。。 1連接到資料庫(linux) 2用db2look生成,FRXmEI

⑥ 如何查看DB2資料庫所用的埠號

DB2數據查看佔用的埠號,分為windows和linux系統查看方式,如下:
一、linux系統查看DB2佔用埠號:
1.db2start啟動了資料庫管理器,並且通訊方式配置為TCP/IP。
2.首先切換到db2inst1用戶 su - db2inst1
3.查找TCP/IP Service name db2 get dbm cfg | grep -i service
4.通過上一句命令的輸出(如db2c_db2inst1)在/etc/services文件中找對應的埠號 grep db2c_db2inst1 /etc/services
輸出 db2c_db2inst1 50000/tcp
#其中50000就是db2資料庫所佔用的埠號
二、windows系統查看DB2佔用埠號方式如下:
1、使用命令 db2 get dbm cfg
找到"SVCENAME" 查找到TCP/IP 服務名
www.2cto.com
2、到系統配置文件里找到service name 對應的 port number
windows:查看 c:\windows\system32\drivers\etc\services
aix: 查看 /etc/services
如下:
DB2_DB2 60000/tcp
DB2_DB2_1 60001/tcp
DB2_DB2_2 60002/tcp
DB2_DB2_END 60003/tcp
db2c_DB2 50000/tcp

⑦ db2資料庫不能訪問(linux系統)

下面說的方法需要你自己動手去排查:
1、確定服務是否運行正常,簡單,把訪問程序放到資料庫所在機器直接測試,如果不ok,屬於資料庫本身有問題,此處排查你應該可以控制,自行查找錯誤。如果不ok執行下面幾步。
2、確認linux防火牆是否開著,如果開著,看訪問規則是否對,要允許你配置的埠往外發數據,同時要允許想訪問服務的ip數據包可以發過來。還要注意別把埠給禁止掉。此處很簡單是不是防火牆影響,暫時把防火牆服務關閉掉。如:iptables service iptables stop。
3、第二步如果還不行,考慮你的網路是否經過某些特定的防火牆,你自己又控制不了,協調網路管理人員重設防火牆規則。讓該訪問的機器都能訪問到。你要用的應用埠也得打開。大公司,一般會把web伺服器或應用伺服器放到dmz區,該區的防火牆控制級別相當高。
Connection refused,屬於TCP錯誤,能報出此錯誤說明機器是通的。埠不可用的幾率很大,埠不可用分兩種:
a、應用服務沒啟動活沒在特定的埠啟動;可以這樣確認,netstat -a ,看你啟動的埠是否真是你期望的。
b、應用伺服器啟動出錯,導致網路監聽服務沒啟動,看資料庫日誌。
c、各級防火牆不允許訪問你期望的埠。解決方法如上2、3步驟。
如果還解決不了,網路上,應該沒人有那本事再幫你。

⑧ DB2資料庫在linux操作系統的指令有哪些

DB2資料庫命令簡介 1.啟動資料庫 DB2start 2.停止資料庫 DB2stop DB2資料庫在linux相關指令之3.連接資料庫 DB2 connect to o_yd user DB2 using pwd 4.讀資料庫管理程序配置 DB2 get dbm cfg 5.寫資料庫管理程序配置 DB2 update dbm cfg using 參數名 參數值 6.讀資料庫的配置 DB2 connect to o_yd user DB2 using pwd DB2 get db cfg for o_yd 7.寫資料庫的配置 DB2 connect to o_yd user DB2 using pwd DB2 update db cfg for o_yd using 參數名 參數值 8.關閉所有應用連接 DB2 force application all DB2 force application ID1,ID2,,,Idn MODE ASYNC (DB2 list application for db o_yd show detail) 9.備份資料庫 DB2 force application all DB2 backup db o_yd to d: (DB2 initialize tape on \.tape0) (DB2 rewind tape on \.tape0) DB2 backup db o_yd to \.tape0 10.恢復資料庫 DB2 restore db o_yd from d: to d: DB2 restore db o_yd from \.tape0 to d: DB2資料庫在linux相關指令之11.綁定存儲過程 DB2 connect to o_yd user DB2 using pwd DB2 bind c:dfplus.bnd 拷貝存儲過程到伺服器上的C:sqllibfunction目錄中 12.整理表 DB2 connect to o_yd user DB2 using pwd DB2 reorg table ydd DB2 runstats on table ydd with distribution and indexes all 13.導出表數據 DB2 export to c:dftz.txt of del select * from dftz DB2 export to c:dftz.ixf of ixf select * from dftz 14.導入表數據 import from c:123.txt of del insert into ylbx.czyxx DB2 import to c:dftz.txt of del commitcount 5000 messages c:dftz.msg insert into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 messages c:dftz.msg insert into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 insert into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 insert_update into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 replace into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 create into dftz (僅IXF) DB2 import to c:dftz.ixf of ixf commitcount 5000 replace_create into dftz (僅IXF) 15.執行一個批處理文件 DB2 -tf 批處理文件名 (文件中每一條命令用 ;結束) 16.自動生成批處理文件 建文本文件:temp.sql select 'runstats on table DB2.' || tabname || ' with distribution and detailed indexes all;' from syscat.tables where tabschema='DB2' and type='T'; DB2 -tf temp.sql>runstats.sql 17.自動生成建表(視圖)語句 在伺服器上:C:sqllibmisc目錄中 DB2 connect to o_yd user DB2 using pwd DB2look -d o_yd -u DB2 -e -p -c c:o_yd.txt DB2資料庫在linux相關指令之18.其他命令 grant dbadm on database to user bb 19select * from czyxx fetch first 1 rows only 20DB2look -d ylbx -u DB2admin -w -asd -a -e -o a.txt21. 顯示當前用戶所有表 list tables 22.列出所有的系統表 list tables for system 23.查看錶結構 DB2 describe select * from user.tables (實習編輯:HJ)

⑨ 怎麼查看和修改linux系統下的db2數據的埠號

1。查看資料庫實例名:命令1:db2 get dbm cfg;在列出的內容中查找TCP/IP Service name (SVCENAME) = 項的值,本例為DB2_inst64.命令2:直接查找到資料庫實例名,db2 get dbm cfg | grep -i service 也可以查找到資料庫實例名。

2。查看埠號:通過上一句命令的輸出(如DB2_inst64)在/etc/services文件中找對應的埠號
grep DB2_inst64 /etc/services

3。修改埠號:命令修改:db2 update dbm cfgusing svcename<埠號或者服務名>