惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
V
V2EX
雷峰网
雷峰网
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
F
Full Disclosure
Y
Y Combinator Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
量子位
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
K
Kaspersky official blog
B
Blog
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - iSun自由软件团件

Quart.net cron SQL Server TEST TEST treecode table gettree treecode 要逝去的花样春色 用于主题检测的临时日志(4727e507-fac3-4078-8e60-03528e628d21 - 3bfe001a-32de-4114-a6b4-4005b770f6d7) 词一首 狗尾草 不后悔 2008,人力资源软件是否还依然 dll_part 通过JAVAScript实现页面自适应 发布最新iSunXoft HR 源码和生成器源码(改自AspCool) 乍恋 天净沙.梦还 秋思
test
iSun自由软件团件 · 2011-11-07 · via 博客园 - iSun自由软件团件

USE [DNF_09] GO

/****** Object:  DdlTrigger [tri_DDL_DATABASE_LEVEL_EVENTS]    Script Date: 11/01/2011 10:17:04 ******/ SET ANSI_NULLS ON GO

SET QUOTED_IDENTIFIER ON GO

--建立触发器 CREATE   TRIGGER   [tri_DDL_DATABASE_LEVEL_EVENTS]   ON   DATABASE   FOR   DDL_DATABASE_LEVEL_EVENTS   AS

      DECLARE   @data   XML       SET   @data   =   EVENTDATA()       declare @ObjectName nvarchar(100); set @ObjectName=@data.value( '(/EVENT_INSTANCE/ObjectName)[1] ',   'nvarchar(100) ')       declare @EventType nvarchar(100); set @EventType=@data.value( '(/EVENT_INSTANCE/EventType)[1] ',   'nvarchar(100) ')          --命名规范检查    declare @ReCheck nvarchar(200);set @ReCheck=''       if ((left(@ObjectName,4)<>'Dnft' and left(@ObjectName,8)<>'Tmp_Dnft') and @EventType='CREATE_TABLE')          set @ReCheck=' 表的命名必段以[Dnft_]开头'       if ((left(@ObjectName,4)<>'Dnfv' and left(@ObjectName,8)<>'Tmp_Dnfv') and @EventType='CREATE_VIEW')          set @ReCheck=' 视图的命名必段以[Dnfv_]开头'       if ((left(@ObjectName,4)<>'Dnff' and left(@ObjectName,8)<>'Tmp_Dnff') and @EventType='CREATE_FUNCTION')          set @ReCheck=' 函数的命名必段以[Dnff_]开头'       if ((left(@ObjectName,5)<>'Dnfsp' and left(@ObjectName,9)<>'Tmp_Dnfsp') and @EventType='CREATE_PROCEDURE')          set @ReCheck=' 存储过程的命名必段以[Dnfsp_]开头'       if ((left(@ObjectName,4)<>'idx_' and left(@ObjectName,8)<>'Tmp_idx_') and @EventType='CREATE_INDEX')          set @ReCheck=' 索引的命名必段为[idx_+表名+字段名]'                if (@ReCheck<>'')       begin     --DDL触发器测试     /**/     insert Dnft_log_Temp(data01,data02) values(@ObjectName,@EventType)     --select * from Dnft_log_Temp     --delete Dnft_log_Temp                     PRINT ''+char(13)+char(10)                +'+++++++++++++++++++++++++++++++++++++'+char(13)+char(10)                +''+char(13)+char(10)                              +'请注意: '+char(13)+char(10)                +''+char(13)+char(10)                +'    '+@ReCheck+',如有疑问请查询Dnf开发规范!' +char(13)+char(10)                +'----'+char(13)+char(10)                +' '+char(13)+char(10)                +'---'+char(13)+char(10)                +''+char(13)+char(10)                +'+++++++++++++++++++++++++++++++++++++'+char(13)+char(10)                +''+char(13)+char(10)                          ROLLBACK;    end          --DDL更新相关字段数据       select @ObjectName       if (left(@ObjectName,4)='Dnft' and @EventType='CREATE_TABLE')       begin

    exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'key_seq','[varchar](50) DEFAULT (newid()) NOT NULL','主键'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'up_uid','[varchar](20) NOT NULL  DEFAULT ('''')','更新人账号'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'up_dtime','[datetime] NOT NULL  DEFAULT (getdate())','更新日期'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'up_LKey','[varchar](50) NULL','更新键'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'cr_uid','[varchar](20) NOT NULL  DEFAULT ('''')','创建人账号'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'cr_dtime','[datetime] NOT NULL  DEFAULT (getdate())','创建日期'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'cr_LKey','[varchar](50) NULL','创建键'     exec  Dnfsp_sql_OneTableCreateCol @ObjectName,'OrgKey','[varchar](50) NULL','组织键'    end

GO

SET ANSI_NULLS OFF GO   SET QUOTED_IDENTIFIER OFF GO

DISABLE TRIGGER [tri_DDL_DATABASE_LEVEL_EVENTS] ON DATABASE GO

ENABLE TRIGGER [tri_DDL_DATABASE_LEVEL_EVENTS] ON DATABASE GO