View oracle number of connections and the number of sessions

The first step in cmd command line, enter sqlplus

The second step, follow the prompts to enter a user name and password

1.  View processes and sessions parameters

SQL> show parameter processes;

SQL> show parameter sessions;

2.  Modify processes and sessions parameters

SQL> alter system set processes=300 scope=spfile;

SQL> alter system set sessions=300 scope=spfile;

3.  Query current processes and sessions connections

SQL> select count(*) from v$process;

SQL> select count(*) from v$session;

4.  Query current processes and sessions number of concurrent connections

SQL> select count(*) from v$session where status='ACTIVE';

5. Check Connections consumption

select  b.MACHINE, b.PROGRAM, b.USERNAME, count(*) from v$process a, v$session b

where a.ADDR = b.PADDR and  b.USERNAME is not null   

group by  b.MACHINE, b.PROGRAM, b.USERNAME

order by count(*) desc

Guess you like

Origin www.cnblogs.com/jokerjia/p/11820948.html