Oracle session to learn

2011-08-05  来源:本站原创  分类:Database  人气:73 

1.  View the current session and the process
select count(1) from v$session;
select count(1) from v$process;
 View the current total number of sessions and processes, these two views is related to the process with an important session and view friends  ,  Information is taken from the inside  .

2.  Check how many connections the application, access the machines and applications
select b.machine,b.program,count(1)
 from v$process a ,v$session b
  where a.addr=b.paddr and b.username is not null
  group by b.machine ,b.program
  order by count(1) desc;

3.  Check whether there is deadlock
select * from v$lock_object;
  If the query result is no rows selected, the database shows no deadlock  .  Otherwise, a deadlock exists in the database description  .

  Then explain the state of the session  :
1.active   Session in this state that is running  ,  Active  .
2.killed   Session in this state that an error has occurred  ,  Is rolled back, of course,  ,  Also take up system resources. Another point is that  ,killed  State, lasting a long time, and with  windows  The following tools pl / sql developer to  kill  Out, is no good  ,  Use the command  :alter system kill session 'sid,serial#' ;
3.inactive   Session in this state that is not being implemented, such as  select  Statement has been completed. I began to think  ,  As long as the inactive state of the session  ,  Is got to be, why not release it  .  In fact, inactive no effect on the database itself  ,  However, if the program does not promptly commit, then the session will result in take up too much  .  The best way to solve that is inactive in  oracle  Directly set the timeout, but also there are two ways  ,  The difference is not clear yet  : 

1.  Modify the sqlnet.ora file  ,  New  expire_time=x(  Units are minutes  )
  My position in the sqlnet.ora  D:/oracle/ora92/network/admin 

2.  By ALTER PROFILE DEFAULT LIMIT IDLE_TIME 10;   Command changes, remember to restart the next  oracle.
相关文章
  • Oracle session to learn 2011-08-05

    1. View the current session and the process select count(1) from v$session; select count(1) from v$process; View the current total number of sessions and processes, these two views is related to the process with an important session and view friends

  • About oracle session (transfer) 2011-03-25

    What is a session Popular terms, session is communicating parties from the beginning to the end of the communication traffic during a context (context). In this context is a server-side memory: records in this connection the client machine, by which

  • The maximum number of oracle session to expand and remove inactive sessions 2010-04-12

    From last week, Oracle database server problems, and less than half a day, will report maxsession (150) of the problem, certainly more than the maximum number of database sessions has. As the server file transfer application is running, taking up the

  • Oracle Session session using the Profile of user resource limits 2010-07-05

    Through the profile of the user session can be certain restrictions, such as IDLE time. To IDLE sessions over a period of time off, can reduce the number of sessions the database side, to reduce resource consumption. Use of these resource constraints

  • Oracle 10g to learn a trigger 2010-12-10

    May not use a lot of people know what RAISE_APPLICATION_ERROR, although literally have to guess what this function is used. Usually used to test the exception handling we have to output through dbms_output.put_line exception information, but in actua

  • Oracle session process lock 2011-05-26

    Oracle Database system privileges required to account login - Bitch session sql statements being executed, which can quickly navigate to what actions or code causes the transaction has been carried out is not over and so on. SELECT sql_text FROM v $

  • Oracle Streams to learn two (clear stream configuration) 2011-01-09

    Streams after the completion of the deployment, if you need to reconfigure or discard the configuration, you can choose to clear the configuration information. This cleanup step is very simple, just as a command: EXEC DBMS_STREAMS_ADM.REMOVE_STREAMS_

  • Oracle session connections and the problem of inactive records 2011-09-07

    From last week, the Oracle database server problems, less than half a day, will report maxsession (150) of the problem, the database is certainly more than the maximum number of sessions. Because the server file transfer application is running, take

  • oracle session monitor 2010-03-06

    select username, count (*) from V $ session group by username; select count (*) from V $ session

  • oracle function to learn a 2010-09-18

    sign function syntax: sign (n) Note sign function: Take the number n of symbols is greater than 0 back to 1, less than 0 return -1, equal to 0 return 0 Example: select sign (100), sign (- 100), sign (0) from dual; SIGN (100) SIGN (-100) SIGN (0) ----

  • Oracle Session and kill the process 2010-11-03

    Query Session: SELECT se.username, se.SID, se.serial#, pr.spid, se.status, SUBSTR (se.program, 1, 10) prog, SUBSTR (se.machine, 1, 10) mach, sq.sql_text FROM v$session se, v$sqlarea sq, v$process pr WHERE se.paddr = pr.addr(+) AND se.sql_address = sq

  • oracle session did not submit 2010-12-08

    select t2.username, t2.sid, t2.serial #, t2.logon_time from v $ locked_object t1, v $ session t2 where t1.session_id = t2.sid order by t2.logon_time; - To lock out to KILL alter system kill session '323, 14167 ';

  • View deadlock oracle session 2011-03-01

    ---- Check deadlock session operation select object_name, machine, s.sid, s.serial # from v $ locked_object l, dba_objects o, v $ session s where l.object_id = o.object_id and l.session_id = s.sid; ---- Kill deadlock session alter system kill session

  • common statement oracle session 2011-05-10

    - Check the blocking session: - Query: Select osuser, machine, program, Module, sid, serial #, event, t2.logon_time from v $ locked_object t1, v $ session t2 where t1.session_id = t2.sid order by t2.logon_time - Extract SQL statement: - According to

  • oracle in the session 2010-12-03

    Oracle session connection issues record number and inactive 2009-03-10 15:42:37 oracle learning to read 118 comments 0 Font Size: medium and small subscription. From last week, Oracle database server problems, and less than half a day, will report ma

  • oracle common view of the ----- v $ session 2010-12-20

    Role: a connection to the Oracle database for each of the sessions can be in this view corresponds to a record, according to the view information can be queried using the session the user is running or just running SQL statements, the connection's in

  • Understanding of the session from the oracle temporary table with the link 2011-03-10

    Spend more time with the oracle, but simply to use, with little concern for some basic things, such as the oracle of the difference between conversation and links, I'm too lazy to see a lot of introduction, just read the oracle temporary table usage,

  • oracle to learn some of the recommendations 2011-03-20

    Oracle Oracle to learn some of the recommendations is a long difficult learning process. If you are not interested, but forced to learn, then it is difficult to learn the. Learning to a certain extent, in order to further improve, they will have acce

  • Oracle user session query methods of information 2011-09-07

    Oracle database user session information should be how to query it? The following information on the Oracle user session query methods described in detail, hoping to help you. AD: Oracle user session, I believe we have a better understanding, here to

  • Dwell Oracle CPU usage optimization 2010-03-29

    http://database.51cto.com/art/200911/163251.htm I am very fond of Oracle, is also at work on the Oracle optimization like CPU usage summary of lessons learned, the following detail on this issue to speak. CPU is an important resource server, the serv