1. Query the current process of the database number of connections:
Copy Code code as follows:
Select COUNT (*) from v$process;
2. View the number of connections for the current session of the database:
Copy Code code as follows:
Elect Count (*) from v$session;
3. View the number of concurrent connections to the database:
Copy Code code as follows:
Select COUNT (*) from v$session where status= ' ACTIVE ';
4. View the session established by the current database:
Copy Code code as follows:
Select Sid,serial#,username,program,machine,status from V$session;
5. The maximum number of connections allowed by the query database:
Copy Code code as follows:
Select value from v$parameter where name = ' processes ';
Or order: Show parameter processes;
6. Modify the maximum number of connections allowed by the database:
Copy Code code as follows:
alter system SET processes = Scope = SPFile;
(Need to restart the database to achieve the number of connections to modify)
To restart the database:
Copy Code code as follows:
Sql>shutdown immediate;
sql>startup;
See which users are currently using the data:
Copy Code code as follows:
Sql>select osuser,a.username,cpu_time/executions/1000000| | ' S ', Sql_fulltext,machine
Sql>from v$session A,v$sqlarea b
Sql>where a.sql_address = b.address
Sql>order by cpu_time/executions Desc;
Note: UNIX 1 user sessions correspond to one operating system process, while Windows embodies the thread.
Start Oracle
Copy Code code as follows:
Su-oracle
Sql>sqlplus system/pwd as SYSDBA/enter SQL
Sql>sta Rtup//Start the database
Sql>lsnrctl start/start listening
Sqlplus "/as sysdba"
Sql>shutdown immediate;//Shutdown Database
S Ql>startup Mount;
Sql>alter database open;