首页  >  文章  >  数据库  >  限制网站频繁访问

限制网站频繁访问

大家讲道理
大家讲道理原创
2016-11-10 11:34:221275浏览

CREATE TABLE [dbo].[Zz_AccessIP](
    [IP] [nvarchar](50) NOT NULL,
    [FirstDateTime] [datetime] NOT NULL,
    [LastDateTime] [datetime] NOT NULL,
    [Times] [int] NOT NULL,
 CONSTRAINT [PK_Zz_AccessIP] PRIMARY KEY CLUSTERED 
(
    [IP] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
 
GO
 
ALTER TABLE [dbo].[Zz_AccessIP] ADD  CONSTRAINT [DF_Zz_AccessIP_FirstDateTime]  DEFAULT (getdate()) FOR [FirstDateTime]
GO
 
ALTER TABLE [dbo].[Zz_AccessIP] ADD  CONSTRAINT [DF_Zz_AccessIP_LastDateTime]  DEFAULT (getdate()) FOR [LastDateTime]
GO
 
ALTER TABLE [dbo].[Zz_AccessIP] ADD  CONSTRAINT [DF_Zz_AccessIP_Times]  DEFAULT ((0)) FOR [Times]
GO

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn