触电事故应急救援预案.docx
《触电事故应急救援预案.docx》由会员分享,可在线阅读,更多相关《触电事故应急救援预案.docx(28页珍藏版)》请在冰豆网上搜索。
![触电事故应急救援预案.docx](https://file1.bdocx.com/fileroot1/2022-11/16/b7351a4c-27ce-4028-9861-aa940cc2b6e8/b7351a4c-27ce-4028-9861-aa940cc2b6e81.gif)
触电事故应急救援预案
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