Sybase and Oracle database query method of deadlock

2011-05-24  来源:本站原创  分类:Database  人气:76 

Sybase Query deadlock spid:

select l.spid,
       locktype=convert(char(12),name),
       dbname=convert(char(15),db_name(l.dbid)),
       'table'=convert(char(15),object_name(l.id,l.dbid)),
       page,
      'L' and
      l.spid = p.spid
order by spid

Oracle query deadlock spid:

select   p.spid,a.serial#, c.object_name,b.session_id,b.oracle_username,b.os_user_name
  from   v$process   p,v$session   a,   v$locked_object b  ,all_objects   c
   where   p.addr=a.paddr   and   a.process=b.process   and   c.object_id=b.object_id ;

Have permission to kill spid

相关文章
  • Sybase and Oracle database query method of deadlock 2011-05-24

    Sybase Query deadlock spid: select l.spid, locktype=convert(char(12),name), dbname=convert(char(15),db_name(l.dbid)), 'table'=convert(char(15),object_name(l.id,l.dbid)), page, 'L' and l.spid = p.spid order by spid Oracle query deadlock spid: select p

  • Oracle database query optimization of large tables 2010-12-23

    Key words: massive data; Oracle database; query optimization; data query 1 Introduction <br /> ground in the helicopter flight data processing platform, the need to query the historical flight data for flight simulation and flight accident analysis

  • ORACLE database query basic information table, primary keys, foreign keys, etc. 2011-07-23

    ORACLE database query basic information table, primary keys, foreign keys, etc. Because the project some of the module data structure design is not strictly in accordance with a standard design, we can only query data from the database structure, you

  • Oracle database query optimization in a large study table 2010-12-23

    Keywords: mass data; Oracle database; query optimization; data query 1 Introduction <br /> ground in a helicopter flight data processing platform, the need to query the historical flight data for flight simulation and flight accident analysis to the

  • ORACLE database query language SQL language structure (a) 2010-12-30

    ORACLE database query language SQL language structure (a) First, the concept description: Database DATABASE, table TABLE, column COLUMN, line ROW, keyword PRIMARY KEY, index INDEX Second, the type of the column: the character CHAR and VARCHAR2, value

  • (Transfer) Oracle database migration method 2010-03-04

    (Transfer) Oracle database migration method This carried over: http://dev.tot.name/db/html/20090320/20090320161620.htm In the DBA's daily work, often need to reinstall or install a new machine Oracle, but the time wasted each installation, energy and

  • oracle database query page 2010-05-14

    Recently compiled the oracle database with jsp page to achieve the two methods, were posted to share about. The first is a realization of oracle database using jsp page. My root directory is G: \ workspace \ hope \ WebContent 2.jsp code: <% @ Page la

  • working principle of the oracle database query 2011-09-29

    http://database.ctocio.com.cn/tips/141/8244141.shtml [IT News Writer If we now use the Select statement to query data from the database, Oracle database, how does it work? From which we can comprehend to what? Here, we combine a simple select stateme

  • sybase and oracle database backend start method 2010-10-08

    Turn off the firewall ********************* ******************* Note Start sybase su - sybase cd ./ASE-12_5/install / startserver oracle start su - oracle user switching lsnrctl start start sqlplus "/ as sysdba" SQL> startup

  • Execute script file mysql database and oracle database initialization method 2010-10-17

    mysql: Method One: In the command line (not connect to the database), enter the mysql-h localhost-u root-p123456 <F: / sql / test.sql Enter. Method Two: In the command line (connected database, then prompt for the mysql>), enter the source F: / sql

  • oracle database query. delete. create jobs 2010-07-23

    1, the query operation select job,what,next_date,next_sec,failures,broken from user_jobs; 2, deletion begin dbms_job.remove(:JOB_NUM); end; 3, create jobs -- Occurs every hour DECLARE jobno number; BEGIN dbms_job.submit(jobno, 'RAW_PREACTHOUR(sysdate

  • Oracle database query which users are currently connected. 2011-07-27

    DBA is sometimes used to. SELECT s.Osuser Os_User_Name,Decode(Sign(48 - Command),1,To_Char(Command), 'Action Code #' || To_Char(Command)) Action, p.Program Oracle_Process, Status Session_Status, s.Terminal Terminal, s.Program Program, s.Username User

  • Oracle database, query the current user, all under the table the total number of records 2010-03-30

    select t.table_name, t.num_rows, t.blocks, t.empty_blocks from user_tables t

  • Oracle database query character set used by 2010-08-01

    select parameter, value from nls_database_parameters where parameter like 'NLS_CHARACTERSET';

  • oracle database split () method implementation and testing 2010-11-13

    1 Reference: http://sonic10101.javaeye.com/blog/394187 2 specific SQL: CREATE OR REPLACE TYPE ty_str_split IS TABLE OF VARCHAR2 (4000) CREATE OR REPLACE FUNCTION fn_split (p_str IN VARCHAR2, p_delimiter IN VARCHAR2) RETURN ty_str_split IS j INT := 0;

  • Oracle database, query the table creation time 2011-08-01

    DBA privileges: select object_name, created from dba_objects where object_type = 'TABLE' and object_name = 'your_tab'; Ordinary users check the user table: select object_name, created from user_objects where object_type = 'TABLE' and object_name = 'y

  • Database query plan optimization method 2010-04-29

    Database system is the core of management information systems, database-based online transaction processing (OLTP) and online analytical processing (OLAP) is the banks, enterprises, government departments one of the most important computer applicatio

  • C # connection Access.SQL Server.Oracle.MySQL.DB2 and SyBase six different database source code 2010-06-17

    This article lists the C # to connect Access, SQL Server, Oracle, MySQL, DB2 and SyBase six different database programs and the need to pay attention to the point source. 1.C # Connection Access Code: using System.Data; using System.Data.OleDb; strin

  • C # connection Access.SQL Server.Oracle.MySQL.DB2 and SyBase six different database procedure source 2010-06-17

    This article lists the C # to connect Access, SQL Server, Oracle, MySQL, DB2 and SyBase six different database programs and the need to pay attention to the point source. 1.C # Connection Access Code: using System.Data; using System.Data.OleDb; strin

  • ORACLE database structured query language SQL language (a) 2010-12-30

    ORACLE database structured query language SQL language (a) First, the concept description: Database DATABASE, table TABLE, column COLUMN, line ROW, keyword PRIMARY KEY, Index INDEX Second, the column type: CHAR character, and VARCHAR2, value NUMBER,