It is useful to look at the connection of the data, finish writing the program while testing the code side to see the release of database connections to help optimize the analysis of a robust system program.
1. View the current number of database connections
Select COUNT (*) from v$process; --Current number of database connections
2. Maximum number of connections allowed by the database
Select value from v$parameter where name = ' processes '; --Maximum number of connections allowed for the database
3, modify the maximum number of database connections
alter system SET processes = + scope = SPFile; --Modify the maximum number of connections:
4. Close/Restart the database
Shutdown immediate; --Close the database
Startup --Restart Database
5. See which users are currently using the data
Select Osuser, a.username, cpu_time/executions/1000000| | ' S ', B.sql_text, machine
From V$session A, V$sqlarea b
where A.sql_address =b.address
ORDER BY cpu_time/executions Desc; --See which users are currently using the data
6,--The current session connection number
Select COUNT (*) from V$session--current session connection number
7. Current number of concurrent connections
Select COUNT (*) from v$session where status= ' ACTIVE '; --Number of concurrent connections
V$process:
This view provides information that is information about the Oracle service process and does not have client program-related information
Service process is divided into two categories, one is the background, one is dedicate/shared server
PID, serial# This is the PID assigned by Oracle
SPID This is the PID of the operating system
Program This is the operating system process name that corresponds to the service process
V$session:
This view primarily provides information on a database connect,
This is primarily client-side information, such as the following fields:
Machines on which machine
Terminal what terminal to use
Who is the Osuser operating system user?
Program through what client programs, such as Toad
Process number assigned to toad by the processes operating system
Logon_time at what time
Username with what Oracle account is logged in
What type of SQL command was executed by command
Sql_hash_value SQL statement Information
Some are server-side information:
Paddr is the addr of the server process in V$process
Server server is dedicate/shared
View the maximum number of connections and current connections allowed for an Oracle database