触电事故应急救援预案.docx

上传人:b****6 文档编号:2983628 上传时间:2022-11-16 格式:DOCX 页数:28 大小:20.87KB
下载 相关 举报
触电事故应急救援预案.docx_第1页
第1页 / 共28页
触电事故应急救援预案.docx_第2页
第2页 / 共28页
触电事故应急救援预案.docx_第3页
第3页 / 共28页
触电事故应急救援预案.docx_第4页
第4页 / 共28页
触电事故应急救援预案.docx_第5页
第5页 / 共28页
点击查看更多>>
下载资源
资源描述

触电事故应急救援预案.docx

《触电事故应急救援预案.docx》由会员分享,可在线阅读,更多相关《触电事故应急救援预案.docx(28页珍藏版)》请在冰豆网上搜索。

触电事故应急救援预案.docx

触电事故应急救援预案

16384)

and((p.uid=u.uid)or

(p.uid=m.groupuidandu.uid=m.memberuid))

andp.protecttype<>206/*onlygrantrows*/

andp.actionin(26,193,195,196,197)

ando.uid<>u.uid/*norowsforowner*/

andnotexists(/*excluderevoke'dprivileges*/

select*

fromsysprotectsp1

where

p1.protecttype=206

andp1.action=p.action

andp1.id=p.id

andp1.uid=u.uid)

union

select/*Addrowsfortableowner*/

convert(sysname,db_name())TABLE_QUALIFIER,

convert(sysname,user_name(o.uid))TABLE_OWNER,

convert(sysname,object_name(o.id))TABLE_NAME,

convert(sysname,user_name(u.uid))GRANTOR,

convert(sysname,user_name(o.uid))GRANTEE,

convert(varchar(32),casev.number

when193then'SELECT'

when195then'INSERT'

when196then'DELETE'

when197then'UPDATE'

else'REFERENCES'

end)PRIVILEGE,

convert(varchar(3),'YES')IS_GRANTABLE

fromsysobjectso,master.dbo.spt_valuesv,sysusersu

where

object_name(o.id)like@table_name

ando.typein('U','V','S')

anduser_name(o.uid)like@table_owner

andu.uid=1/*grantoris'dbo'ofdatabase*/

andv.type=N'P'/*crossproducttogetallexposedprivileges*/

andv.numberin(26,193,195,196,197)

andnotexists(/*excluderevoke'dprivileges*/

select*

fromsysprotectsp1

where

p1.protecttype=206

andp1.action=v.number

andp1.id=o.id

andp1.uid=o.uid)

orderby2,3,6,5

go

grantexecuteonsp_table_privilegestopublic

go

dumptranmasterwithno_log

go

print'creatingsp_tables'

go

/*Procedurefor6.50andearlierservers*/

createproceduresp_tables(

@table_namevarchar(96)=null,

@table_ownervarchar(96)=null,

@table_qualifiervarchar(32)=null,

@table_typevarchar(100)=null)

as

declare@type1varchar(3)

declare@tableindexint

 

/*Specialfeature#1:

enumeratedatabaseswhenownerandname

areblankbutqualifierisexplicitly'%'.*/

if@table_qualifier='%'and

@table_owner=''and

@table_name=''

begin/*Ifenumeratingdatabases*/

select

TABLE_QUALIFIER=convert(varchar(32),d.name),

TABLE_OWNER=convert(varchar(32),null),

TABLE_NAME=convert(varchar(32),null),

TABLE_TYPE=convert(varchar(32),null),

REMARKS=convert(varchar(254),null)/*RemarksareNULL*/

frommaster.dbo.sysdatabasesd

whered.name<>'model'/*eliminateMODELdatabase*/

orderby1

end

/*Specialfeature#2:

enumerateownerswhenqualifierandname

areblankbutownerisexplicitly'%'.*/

elseif@table_qualifier=''and

@table_owner='%'and

@table_name=''

begin/*Ifenumeratingowners*/

selectdistinct

TABLE_QUALIFIER=convert(varchar(32),null),

TABLE_OWNER=convert(varchar(32),user_name(uid)),

TABLE_NAME=convert(varchar(32),null),

TABLE_TYPE=convert(varchar(32),null),

REMARKS=convert(varchar(254),null)/*RemarksareNULL*/

fromsysobjects

orderby2

end

/*Specialfeature#3:

enumeratetabletypeswhenqualifier,ownerand

nameareblankbuttabletypeisexplicitly'%'.*/

elseif@table_qualifier=''and

@table_owner=''and

@table_name=''and

@table_type='%'

begin/*Ifenumeratingtabletypes*/

select

TABLE_QUALIFIER=convert(varchar(32),null),

TABLE_OWNER=convert(varchar(32),null),

TABLE_NAME=convert(varchar(32),null),

TABLE_TYPE=convert(varchar(32),rtrim(substring('SYSTEMTABLETABLEVIEW',(colid-1)*12+1,12))),

REMARKS=convert(varchar(254),null)/*RemarksareNULL*/

fromsysobjectso,syscolumnsc

whereo.id=c.idando.name='sysusers'andcolid<=3

end

else

begin/*endofspecialfeatures-donormalprocessing*/

if@table_qualifierisnotnull

begin

ifdb_name()<>@table_qualifier

begin

if@table_qualifier=''

begin/*Ifemptyqualifiersupplied*/

/*Forceanemptyresultset*/

select@table_name=''

select@table_owner=''

end

else

begin/*Ifqualifierdoesn'tmatchcurrentdatabase*/

raiserror20001'~~Rush_5~~'

return

end

end

end

if@table_typeisnull

begin/*SelectallODBCsupportedtabletypes*/

select@type1='SUV'

end

else

begin

/*TableTypeiscasesensitiveifCSserver*/

select@type1=null

if(charindex('''SYSTEMTABLE''',@table_type)<>0)

select@type1=@type1+'S'/*AddSystemTables*/

if(charindex('''TABLE''',@table_type)<>0)

select@type1=@type1+'U'/*AddUserTables*/

if(charindex('''VIEW''',@table_type)<>0)

select@type1=@type1+'V'/*AddViews*/

end

if@table_nameisnull

begin/*Iftablenamenotsupplied,matchall*/

select@table_name='%'

end

else

begin

if(@table_ownerisnull)and(charindex('%',@table_name)=0)

begin/*Ifownernotspecifiedandtableisspecified*/

ifexists(select*fromsysobjects

whereuid=user_id()

andname=@table_name

and(type='U'ortype='V'ortype='S'))

begin/*Overridesuppliedownerw/ownerofta

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 幼儿教育 > 幼儿读物

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1