陡的组词有哪些:Access/MSSQL/Oracle/MySql获取当前用户连接数(downmoon收集...
来源:百度文库 编辑:偶看新闻 时间:2024/05/01 08:26:32
一、MSSQL中可以用sp_who 获取连接的用户名信息,二、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;重启数据库 #修改连接 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;重启数据库 #修改连接
三、Access下有以下几种思路: 第一:直接看ldb文件,有几行就有几个连接
格式基本上是 hostname workgroupUserId 第二: 用vbscript 有两段代码可以参考: Microsoft:Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
Set cn = CurrentProject.Connection
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4.0 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}" )
'Output the list of all users in the current database.
Debug.Print rs.Fields(0).Name, "" , rs.Fields(1).Name, _
While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields (2), rs.Fields(3)
rs.MoveNext
Wend
End Sub
Access Web: ' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long , lngX As Long
Dim strUserName As String
strUserName = String $(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If (lngX > 0) Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function
'******************** Code End ************************** ' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
Private Declare Function apiGetUserName Lib " advapi32.dll " Alias _
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long , lngX As Long
Dim strUserName As String
strUserName = String $( 254 , 0 )
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If (lngX > 0 ) Then
fOSUserName = Left $(strUserName, lngLen - 1 )
Else
fOSUserName = vbNullString
End If
End Function
' ******************** Code End **************************
四、MySqlmysql> show processlist;
或
./mysqladmin processlist
. / mysqladmin processlist
例: C:\Documents and Settings\administrator>mysqladmin processlist 更详细的,查看当前所有连接的详细资料: ./mysqladmin -uadmin -p -h10.140.1.1 processlist 只查看当前连接数(Threads就是连接数.): ./mysqladmin -uadmin -p -h10.140.1.1 status 本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/downmoon/archive/2009/01/06/3712313.aspx
SQL> Select count(*) from v $session where status= 'ACTIVE' #并发连接数
SQL> show parameter processes #最大连接
SQL> alter system set processes = value scope = spfile;重启数据库 #修改连接 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;重启数据库 #修改连接
三、Access下有以下几种思路: 第一:直接看ldb文件,有几行就有几个连接
格式基本上是 hostname workgroupUserId 第二: 用vbscript 有两段代码可以参考: Microsoft:Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
Set cn = CurrentProject.Connection
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4.0 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}" )
'Output the list of all users in the current database.
Debug.Print rs.Fields(0).Name, "" , rs.Fields(1).Name, _
While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields (2), rs.Fields(3)
rs.MoveNext
Wend
End Sub
Access Web: ' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long , lngX As Long
Dim strUserName As String
strUserName = String $(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If (lngX > 0) Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function
'******************** Code End ************************** ' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
Private Declare Function apiGetUserName Lib " advapi32.dll " Alias _
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long , lngX As Long
Dim strUserName As String
strUserName = String $( 254 , 0 )
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If (lngX > 0 ) Then
fOSUserName = Left $(strUserName, lngLen - 1 )
Else
fOSUserName = vbNullString
End If
End Function
' ******************** Code End **************************
四、MySqlmysql> show processlist;
或
./mysqladmin processlist
. / mysqladmin processlist
例: C:\Documents and Settings\administrator>mysqladmin processlist 更详细的,查看当前所有连接的详细资料: ./mysqladmin -uadmin -p -h10.140.1.1 processlist 只查看当前连接数(Threads就是连接数.): ./mysqladmin -uadmin -p -h10.140.1.1 status 本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/downmoon/archive/2009/01/06/3712313.aspx
delphi7如何连接oracle,mssql server,access及excel数据库?
delphi7如何连接oracle,mssql server,access及excel数据库?
oracle mssql的区别?
mssql server 转access数据库
关于ACCESS和MSSQL使用的问题
Access MSSQL是什么?各自的特点是什么?
什么软件可以把mssql转为access
如何把ACCESS数据转移到MSSQL
怎样把ACCESS数据库转换MSSQL
ACCESS或者MSSQL或者MYSQL,哪个好
VB VF Access oracle的不同
ACCESS和MY、MSSQL的数据容量分别是多少?
mssql怎么像access那样直接输入编辑数据?
请介绍一下网站使用的数据库Access和MSSQL
如何使用asp将access数据导入mssql
ACCESS和MSSQL数据库,为什么说ACCESS是小型数据库,他的功能和MSSQL的哪个好
sybase、mssql、oracle的配置及维护有相关的知识网站,请提供?
如何把Access里的数据导到oracle里
用access数据库和mssql数据库做网站,他们各有什么利弊.
请问Access/mysql/mssql哪个好啊,特别是后面的 2个
求免费asp或php空间!空间大于200M,支持access或mssql,mysql
asp cgi php jsp access mssql 都是什么意思?谁可以解释解释?
从access导入MSSQL时总是出错的问题,急急急!!!!
急!急!动网论坛access转mssql后要修改那些文件...?