下面的t-sql 語句可以配置sql server 允許的併發使用者連線的最大數目。exec sp_configure 'show advanced options', 1
exec sp_configure 'user connections', 100
第一句用以表示顯示sp_configure 系統儲存過程高階選項,使用user connections 時,要求show advanced options 值為1。
第二句配置最大連線數為100,0 表示不限制,但不表示無限,後面將談談。
也可以在企業管理器中配置,在企業管理器中,可以在例項上點右鍵->「屬性」->「連線」裡面更改。
需要重新啟動sql server,該值才會生效。
@@max_connections
select @@max_connections
它總是返回32767,它並不是指上面設定的user connections,實際上它表示user connections 最大可設定為多少。由於它的最大值是32767,那麼user connections 為0 時,最大連線數也就是32767 了,並不是無限。
預設情況下user connections 值是0,也就是說預設情況下sql server 的最大連線數是32767。
獲得當前設定的最大連線數:
select value from master.dbo.sysconfigures where [config]=103
最大連線數 Linux的檔案最大連線數
too many open files 檢視當前作業系統連線數設定 ulimit a修改伺服器最大連線數 vim etc security limits.conf新增 soft nofile 65535 hard nofile 65535 soft nproc 65535 hard nproc 65...
MYSQL 檢視最大連線數和修改最大連線數
mysql檢視最大連線數和修改最大連線數 1 檢視最大連線數 show variables like max connections 2 修改最大連線數 set global max connections 200 以下的文章主要是向大家介紹的是mysql最大連線數的修改,我們大家都知道mysql最...
MYSQL 檢視最大連線數和修改最大連線數
mysql檢視最大連線數和修改最大連線數 1 檢視最大連線數 show variables like max connections 2 修改最大連線數 set global max connections 200 以下的文章主要是向大家介紹的是mysql最大連線數的修改,我們大家都知道mysql最...