时间:2021-07-01 10:21:17 帮助过:11人阅读
--查锁表进程
select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type=‘OBJECT‘
--杀进程 declare @spid int Set @spid = 101 --锁表进程 declare @sql varchar(1000) set @sql=‘kill ‘+cast(@spid as varchar) exec(@sql)
--已存在表 os_operator insert into os_operator(ope_code,open_mac,myrloe_code,rloe_code) select pass_operator,1,‘[]‘,0 from ITSV.his.dbo.aps_operator_pass
--不存在表 os_operator
select * into os_operator from ITSV.his.dbo.aps_operator_pass
SqlServer 清空日志
标签:pen from 模式 iat use 存在 trunc insert ase