delete语句跑了3个小时分析以及关于并行的一些知识
=====================START====================================
闲来无事,看了下数据库跑的long running sql,
SQL> /
1708 51125 1 61jv5qy7mandd 10622 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) db file scattered read
382 22079 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
5 9223 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
70 62839 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
139 299 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
202 23755 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
203 541 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
260 38107 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
322 13893 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
324 27407 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
454 75 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
515 199 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
638 6453 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
705 1439 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
764 613 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
1896 35227 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
2152 43367 1 61jv5qy7mandd 10621 infaadm inf-p-va-01.va2.b2c.nike.com
DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3) PX Deq: Table Q Normal
看到这条delete语句跑了3hours左右,于是想看看为啥跑这么慢,因为从v$session查出来的这句sql是有很多sid的,说明有很多session,开了并行在delete,那为何还跑得这么慢。
并且得看看并行hint在语句中我没看到,是表的并行还是应用连过来设的并行还是什么?
先大致分析下:
Sql text:DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)
SQL> SELECT px.QCSID,px.SID "SID", p.PID, p.SPID "SPID", px.INST_ID "Inst",s.status,s.username,s.machine,to_char(logon_time,'yyyymmdd hh24:mi:ss') as loggon_time,s.last_call_et,
2 px.SERVER_GROUP "Group", px.SERVER_SET "Set",
3 px.DEGREE "Degree", px.REQ_DEGREE "Req Degree", w.event "Wait Event"
FROM GV$SESSION s, GV$PX_SESSION px, GV$PROCESS p, GV$SESSION_WAIT w
WHERE s.sid (+) = px.sid AND s.inst_id (+) = px.inst_id AND
s.sid = w.sid (+) AND s.inst_id = w.inst_id (+) AND
s.paddr = p.addr (+) AND s.inst_id = p.inst_id (+) and px.qcsid=1708
ORDER BY DECODE(px.QCINST_ID, NULL, px.INST_ID, px.QCINST_ID), px.QCSID,
DECODE(px.SERVER_GROUP, NULL, 0, px.SERVER_GROUP), px.SERVER_SET, px.INST_ID; 4 5 6 7 8 9
QCSID SID PID SPID Inst STATUS USERNAME MACHINE LOGGON_TIME LAST_CALL_ET Group Set Degree Req Degree Wait Event
---------- ---------- ---------- ------------------------ ---------- -------- ------------------------------ ---------------------------------------------------------------- ----------------- ------------ ---------- ---------- ---------- ---------- ----------------------------------------------------------------
1708 1708 75 25545 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:23 11875 db file scattered read
1708 139 50 3991 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 202 51 3993 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 260 52 3995 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 322 53 3997 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 382 54 3999 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 454 55 4001 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 5 48 3987 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 70 49 3989 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 764 108 25561 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 705 107 25559 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 638 106 25557 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 515 104 25555 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 324 101 25553 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 203 99 25551 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 2152 82 25549 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 1896 78 25547 1 ACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 1 16 48 PX Deq: Table Q Normal
1708 2211 131 6265 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 2397 134 6271 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1022 112 6203 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1078 113 6205 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1142 114 6207 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1202 115 6214 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1266 116 6226 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 2155 130 6263 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 574 105 6257 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1963 127 6255 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 387 102 6243 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1898 126 6253 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1835 125 6251 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1767 124 6249 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 1333 117 6233 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
1708 2276 132 6267 1 INACTIVE INFA_USR inf-p-va-01.va2.b2c.nike.com 20161217 09:30:24 11874 1 2 16 48 PX Deq: Execution Msg
33 rows selected.
看下执行计划,把in语句转换成hash join right semi操作,这样相当于两张表做hash join了,表的获取是走全表扫描和Fast full ind scan,这两个操作正好都能充分利用并行进程。
所以执行计划暂时没看出有啥毛病。
Plan hash value: 1653143170
-------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
-------------------------------------------------------------------------------------------------------------------------------------
| 0 | DELETE STATEMENT | | | | 349K(100)| | | | |
| 1 | DELETE | FIN_ORD_DTL | | | | | | | |
| 2 | PX COORDINATOR | | | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10002 | 5950K| 283M| 349K (1)| 02:14:00 | Q1,02 | P->S | QC (RAND) |
|* 4 | HASH JOIN RIGHT SEMI | | 5950K| 283M| 349K (1)| 02:14:00 | Q1,02 | PCWP | |
| 5 | PX RECEIVE | | 5950K| 141M| 6476 (1)| 00:02:29 | Q1,02 | PCWP | |
| 6 | PX SEND HASH | :TQ10001 | 5950K| 141M| 6476 (1)| 00:02:29 | Q1,01 | P->P | HASH |
| 7 | PX BLOCK ITERATOR | | 5950K| 141M| 6476 (1)| 00:02:29 | Q1,01 | PCWC | |
|* 8 | INDEX FAST FULL SCAN| ORDER_LINE_FINRPT_STG_I3 | 5950K| 141M| 6476 (1)| 00:02:29 | Q1,01 | PCWP | |
| 9 | BUFFER SORT | | | | | | Q1,02 | PCWC | |
| 10 | PX RECEIVE | | 40M| 969M| 342K (1)| 02:11:28 | Q1,02 | PCWP | |
| 11 | PX SEND HASH | :TQ10000 | 40M| 969M| 342K (1)| 02:11:28 | | S->P | HASH |
| 12 | TABLE ACCESS FULL | FIN_ORD_DTL | 40M| 969M| 342K (1)| 02:11:28 | | | |
-------------------------------------------------------------------------------------------------------------------------------------
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
1 - SEL$3BA1AD7C
8 - SEL$3BA1AD7C / ORDER_LINE_FINRPT_STG@SEL$1
12 - SEL$3BA1AD7C / FIN_ORD_DTL@DEL$1
Predicate Information (identified by operation id):
---------------------------------------------------
4 - access("ORD_LIN_ID"="ORD_LIN_ID")
8 - access(:Z>=:Z AND :Z<=:Z)
select table_name, owner,num_rows, blocks, last_analyzed,partitioned
from dba_tables
where table_name in ('FIN_ORD_DTL', 'ORDER_LINE_FINRPT_STG');
TABLE_NAME OWNER NUM_ROWS BLOCKS LAST_ANAL PAR
------------------------------ ------------------------------ ---------- ---------- --------- ---
ORDER_LINE_FINRPT_STG FINOPSTG 5950720 608238 11-DEC-16 NO
FIN_ORD_DTL FINOPRPT 40662196 1702912 24-AUG-16 NO
其实两张表join,正常并行全表扫描+并行index fast full index scan会很快,五分钟左右能完成,不至于跑3hours还没结束。
SQL> ho date
Sat Dec 17 13:09:09 UTC 2016
为什么执行计划有并行,实际一直都是单线程工作,因为从如下OEM可以看到sql从开始跑的时候就一直是单线程工作,
为什么gv$session看到了有parallel processes,执行计划也是并行操作,而OEM看到的其实一直都是单线程,并没有并行
先来看看表的并行度: select table_name,degree from dba_tables where table_name in ('FIN_ORD_DTL', 'ORDER_LINE_FINRPT_STG');
TABLE_NAME DEGREE
------------------------------ ----------------------------------------
FIN_ORD_DTL 1
ORDER_LINE_FINRPT_STG 1
在sql级别没有加parallel hint,在表级别degree也是1,那么并行是哪里来的?
并行度可以通过以下三种方式来设定:
1、使用Hint 指定并行度。
2、使用alter session force parallel 设定并行度。
3、使用SQL中引用的表或者索引上设定的并行度,原则上Oracle 使用这些对象中并行度最高的那个值作为当前执行的并行度。
三种方式任意一种就可以使并行生效,如果多种方式同时存在的话,则优先级顺序是:hint -> alter session -> table/index degree
那么这个并行出现的可能性只有两种了:
- 应用连过来设的session级别的并行度
- V$session及执行计划的’缺陷’
另外自己还看了下数据库设置的parallel相关参数,对如下这个参数关注了一下,
https://docs.oracle.com/cd/E18283_01/server.112/e16541/parallel005.htm
PARALLEL_FORCE_LOCAL
This parameter specifies whether a SQL statement executed in parallel is restricted to a single instance in an Oracle RAC environment. By setting this parameter to TRUE, you restrict the scope of the parallel server processed to the single Oracle RAC instance where the query coordinator is running.
The recommended value for the PARALLEL_FORCE_LOCAL parameter is FALSE.
这个参数在BI库里设成false,就是说BI 6个节点,即使我在node3上sql开了并行,也仅限于node3上,不会借助其他node(这个参数在这个案例没啥影响,只是捎带提下)
PARALLEL_DEGREE_POLICY
PARALLEL_DEGREE_POLICY specifies whether or not automatic degree of
Parallelism, statement queuing, and in-memory parallel execution will be enabled.Values:
- MANUAL: Disables automatic degree of parallelism, statement
queuing, and in-memory parallel execution. This reverts the behavior of
parallel execution to what it was prior to Oracle Database 11g Release 2
(11.2). This is the default. - LIMITED: Enables automatic degree of parallelism for some
statements but statement queuing and in-memory Parallel Execution are disabled.
Automatic degree of parallelism is only applied to those statements that access
tables or indexes decorated explicitly with the DEFAULT degree of parallelism
using the PARALLEL clause. Statements that do not access any tables or indexes
decorated with the DEFAULT degree of parallelism will retain the MANUAL
behavior. - AUTO: Enables automatic degree of parallelism, statement queuing,
and in-memory parallel execution.
生产的参数如下:
parallel_degree_policy string MANUAL
parallel_force_local boolean TRUE
看了下跟数据库的参数设置也没关系。
所以接下来的思路,或者办法就是:
跟应用确认,是不是session级别设置的,要么没设置,那么v$session和执行计划的信息就是错的,要么设置了,那么为什么一直是单线程工作了,在这里是可以用到并行去做table
full scan和index
fast full scan这两个操作的,那么可以分析下并行的资源是不是够,当时自己没想到这一点,可能并行资源全都in use了!这是目前唯一能想出来的原因了。
所以以后分析的时候还顺便分析下并行的资源使用
SELECT * FROM
V$PX_PROCESS;可以看到还有多少available的parallel process
select * from V$PX_PROCESS_SYSSTAT;也可以看
当然后续的文章还会说明下关于并行的consumer/producer模型,parallel wait event等知识。
======================ENDED========================================
delete语句跑了3个小时分析以及关于并行的一些知识的更多相关文章
- MySQL DELETE语句和TRUNCATE TABLE语句的区别
MySQL DELETE语句和TRUNCATE TABLE语句的区别 2010-10-08 16:05 佚名 互联网 字号:T | T 在MySQL数据库中,DELETE语句和TRUNCATE TAB ...
- Sql Server系列:Delete语句
数据的删除将删除表的部分或全部记录,删除时可以指定删除条件从而删除一条或多条记录.如果不指定删除条件,DELETE语句将删除表中全部的记录,清空数据表. 1 DELETE语法 [ WITH <c ...
- SQL DELETE 语句
DELETE 语句用于删除表中的行. 语法 DELETE FROM 表名称 WHERE 列名称 = 值 Person: LastName FirstName Address City Gates Bi ...
- FP 某段SQL语句执行时间超过1个小时,并报错:ORA-01652: 无法通过 128 (在表空间 TEMPSTG 中) 扩展
一.出现如下两个错误:1.某一段SQL语句执行时间超过1个小时:2.一个小时后,提示如下错误:ORA-01652: 无法通过 128 (在表空间 TEMPSTG 中) 扩展 temp 段ORA-065 ...
- 如何判断一条sql(update,delete)语句是否执行成功
如何判断一条sql(update,delete)语句是否执行成功 catch (SQLException e) { } catch不到错误应该就成功了. ============== ...
- mysql 事务是专门用来管理insert,update,delete语句的,和select语句一点不相干
1.mysql 事务是专门用来管理insert,update,delete语句的,和select语句一点不相干 2.一般来说,事务是必须满足4个条件(ACID): Atomicity(原子性).Con ...
- delete语句与reference约束 FK_subplan_job_id冲突问题,导致job无法删除解决办法
在SQL Server 2008上删除已运行维护计划后,维护计划job没有自动删除掉,手工再删除维护计划job,提示删除失败. 错误现象:delete 语句与 reference 约束"F ...
- 删除作业计划出错(DELETE语句与 REFERENCE约束"FK_subplan_job_id"冲突。)
删除作业计划出错(DELETE语句与 REFERENCE约束"FK_subplan_job_id"冲突.) use msdb select * from sysmaintplan_plans --查看 ...
- oracle数据库删除数据Delete语句和Truncate语句的对比
oracle数据库删除数据Delete语句和Truncate语句的对比 当表中的数据不需要时,则应该删除该数据并释放所占用的空间,删除表中的数据可以使用Delete语句或者Truncate语句,下面分 ...
随机推荐
- Javascript数组常用方法
一.forEach对数组的遍历 二.map返回经过运算的新数组 三.filter返回满足条件的新数组 四.返回数组前后元素运算的结果 五.every遍历数组每项元素是否满足某个条件,全部满足返回tru ...
- jQuery的$.getJSON方法在IE浏览器下失效的解决方案
$.getJSON在IE下默认会使用浏览器缓存,所以导致数据不正确或者异常,解决方案就是在使用该方法前关闭缓存,使用完后再重新打开缓存即可. <?php $.ajaxSetup({ cache: ...
- jQuery-1.9.1源码分析系列(十五) 动画处理——缓动动画核心Tween
在jQuery内部函数Animation中调用到了createTweens()来创建缓动动画组,创建完成后的结果为: 可以看到上面的缓动动画组有四个原子动画组成.每一个原子动画的信息都包含在里面了. ...
- tomcat源码剖析系列
一个简单的web服务器 一个简单的servlet容器 连接器 创建httpRequest 创建HttpResponse 容器 生命周期 日志记录器 载入器 Session管理 关闭钩子 启动tomca ...
- 为 Web 设计师准备的 20 款 CSS3 工具
1.CSS3 Generator 2. Border Radius 3. CSS3 Maker 4. CSS3 Transforms 5. CSS3 Drop shadow generator 6. ...
- 开发漫谈:千万别说你不了解Docker!
1dotCloud到Docker:低调奢华有内涵 写在前面:放在两年前,你不认识Docker情有可原.但如果现在你还这么说,不好意思,我只能说你OUT了.你最好马上get起来,因为有可能你们公司很 ...
- jQuery页面滚动右侧浮动导航切换
体验效果:http://hovertree.com/texiao/jquery/49/ 效果图: 代码如下: <!DOCTYPE html> <html> <head&g ...
- [WCF编程]4.契约概述
一.契约的基本概念 契约是消息参与者之间的约定.在SOA架构中,契约提供了服务通信所必需的元数据.契约用来定义数据类型,操作,消息交换模式和消息交换使用的传输协议.契约通常是在标准化平台中使用与编程语 ...
- [转]DbFirst数据验证
转自:Data Validate 之 Data Annotation 什么是Data Annotation ? 如何使用 ? 自定义Validate Attribute EF Db first中使用 ...
- C# 常用加密解密帮助类
public static class EncryptUtil { #region MD5加密 /// <summary> /// MD5加密 /// </summary> p ...