資料庫進程查詢
A. mysql中會話和進程如何查詢
查看mysql進程有兩種方法
1.進入mysql/bin目錄下輸入mysqladmin processlist;
2.啟動mysql,輸入show processlist;
如果有SUPER許可權,則可以看到全部的線程,否則,只能看到自己發起的線程(這是指,當前對應的MySQL帳戶運行的線程)。
mysql> show processlist;
B. oracle資料庫怎麼查看進程數
查看ORACLE最大進程數:
SQL> select count(*) from v$session #連接數
SQL> Select count(*) from v$session where status='ACTIVE'#並發連接數
SQL> show parameter processes #最大連接
SQL> alter system set processes = value scope = spfile;重啟資料庫 #修改連接
unix 1個用戶session 對應一個操作系統 process
而 windows體現在線程
------------------------------------------------------------------------------
修改ORACLE最大進程數:
使用sys,以sysdba許可權登錄:
SQL> show parameter processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 150
SQL> alter system set processes=300 scope = spfile;
系統已更改。
SQL> show parameter processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 150
SQL> create pfile from spfile;
文件已創建。
重啟資料庫,
SQL> show parameter processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 300
C. 如何查看哪些進程和伺服器正在使用資料庫
Oracle伺服器由資料庫和實例組成,實例包括進程和內存結構。
你連接到一個實例上,只能查到與該實例對應的資料庫。資料庫名可以這樣簡單查詢
show parameter db_name
或者樓上的語句也可以,但是都只能獲得當前的資料庫名。
D. 如何通過代碼查找資料庫在系統中的進程號
貌似kill和進程號之間缺一個空格。試試下面的
Conn.Execute "kill" & " " & rs("spid").Value
E. 如何查詢SQL進程,並殺死進程
如何查詢SQL進程,並殺死進程。
--步驟1 觀察SQL進程:將使用資料庫「PXJY」的進程取出
--參考:SQL幫助:sysprocesses,DB_ID
select *
--主要有用的是這幾個列:
spid,dbid,uid,open_tran,status,cmd,loginame
--這些列的意義可以參看幫助。
from master.dbo.sysprocesses
where dbid=(select db_id(N'pxjy'))
--步驟2 殺死進程
--參考:SQL幫助:KILL
--假設剛才取出的記錄級中有記錄,spid=1
KILL 1
--其他需要考慮的問題如:sysprocesses的查看許可權,判斷取出的記錄集是否為空集,多條記錄的循環殺死。
F. oracle資料庫怎麼查看進程數
oracle進程數查詢
1.cmd
2.sqlplus /nolog
3.connect sys/test@test as sysdba
SQL> show parameter process;
NAME TYPE VALUE
------------------------------------ ----------- -----
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 1000
再查進程數
SQL> select count(*) from v$session;
COUNT(*)
----------
224
G. 查看一下資料庫現有的進程數,是否已經達到參數processes的大小
查看一下資料庫現有的進程數,是否已經達到參數processes的大小
-- select count(*) from v$process; 取得資料庫目前的進程數。
-- select value from v$parameter where name = 'processes'; 取得進程數的上限
(1)查看當前會話數、processes和sessions值,發現session數14和processes值150已經非常接近
SQL>selectcount(*)fromv$session;
COUNT(*)
----------
146
SQL>showparameterprocesses
NAMETYPEVALUE
------------------------------------------------------------------
aq_tm_processesinteger0
db_writer_processesinteger2
gcs_server_processesinteger0
job_queue_processesinteger10
log_archive_max_processesinteger2
processesinteger150
(2)Modifythetwoparameter(processes,sessions)
SQL>altersystemsetprocesses=300scope=spfile;
Systemaltered.
SQL>altersystemsetsessions=335scope=spfile;
Systemaltered.
(3)Let'.
SQL>shutdownimmediate;
Databaseclosed.
Databasedismounted.
ORACLEinstanceshutdown.
SQL>startup
ORACLEinstancestarted.
FixedSize2030456bytes
VariableSize989856904bytes
DatabaseBuffers603979776bytes
RedoBuffers14745600bytes
Databasemounted.
Databaseopened.
SQL>exit
.2.0.3.0-64bitProction
WiththePartitioning,OLAPandDataMiningoptions
$sqlplus/nolog
(4)testtheresult.
SQL*Plus:Release10.2.0.3.0-Proctionon星期五12月909:53:132011
Copyright(c)1982,2006,Oracle.AllRightsReserved.
SQL>connsys/oracle@orclassysdba
Connected.
SQL>
--theend.
H. postgres 資料庫怎麼查看進程
命令如下:
sudo apt-get install postgresql
在安裝的過程中,會自動創建一個postgres的默認賬戶,可以在該賬戶下執行各種SQL命令。
I. 如何查看哪些進程和伺服器正在使用資料庫
Oracle伺服器由資料庫和實例組成,實例包括進程和內存結構。
你連接到一個實例上,只能查到與該實例對應的資料庫。資料庫名可以這樣簡單查詢
show
parameter
db_name
或者樓上的語句也可以,但是都只能獲得當前的資料庫名。
J. 求查詢oracle資料庫dblink進程號方法,舉例說明!
1.通過SQL語句找到相應的SQL ID。
select sql_id,sql_text from v$sql where .....
2.通過SQL ID找到相應的物理進程地址
select sql_id, paddr from v$session where .....
3.通過相應的物理進程地址找到相應系統進程
select addr,spid from v$process where .....
或者通過dba_2pc_pending和dba_2pc_neighbors也可以查