Mysql,Oracle连接数简析Mysql01D:\Program Files\MySQL\MySQL Server 5.1\bin -u root -p02Enter password: ****03Welcome to the MySQL monitor. Commands end with ; or \g.04Your MySQL connection id is 183 www.2cto.com 05Server version: 5.1.58-commu
Mysql,Oracle连接数简析
Mysql
01
D:\Program Files\MySQL\MySQL Server 5.1\bin> -u root -p
02
Enter password: ****
03
Welcome to the MySQL monitor. Commands end with ; or \g.
04
Your MySQL connection id is 183 www.2cto.com
05
Server version: 5.1.58-community MySQL Community Server (GPL)
06
07
Copyright (c) 2000, 2010, and/or its affiliates. All rights reserved.
08
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
09
and you are welcome to modify and redistribute it under the GPL v2 license
10
11
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
12
-- 使用xuexi数据库
13
mysql> use xuexi
14
Database changed
15
-- 查看字符集
16
mysql> SHOW VARIABLES LIKE 'character_set%';
17
-- 控制台汉字乱码,将编码改为gbk,控制台就可以显示中文了
18
mysql> set character_set_results='gbk';
19
-- 查看连接数 www.2cto.com
20
mysql> SHOW PROCESSLIST;--100条
21
mysql> show full processlist;
22
-- 服务器的状态信息
23
mysql> show status;
Oracle
01
SQL> conn / as sysdba
02
Connected.
03
-- 连接数
04
SQL> select count(*) from v$session;
05
-- 并发连接数
06
SQL> Select count(*) from v$session where status='ACTIVE';
07
--最大连接
08
SQL> show parameter processes;
09
-- 修改processes和sessions值
10
SQL> alter system set processes=300 scope=spfile;
11
SQL> alter system set sessions=300 scope=spfile;
作者 车水码农