• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

让Serv-U使用ODBC的代码

发布: 2007-6-13 20:54 | 作者: 勇敢的风 | 来源: | 查看: 18次 | 进入软件测试论坛讨论

领测软件测试网

在创建站点选择域类型时候选择存储与ODBC中,然后将下列代码再Serv_U的配置文件中相关的站点处替换掉。

ODBCSource=ODBC_NAME|ODBC_DB_NAME|ODBC_DB_PWD
ODBCTables=serv_u_user|serv_u_group|serv_u_user_dir

|serv_u_group_dir|serv_u_user_ip|serv_u_group_ip
ODBCColumns=name|password|skey|homedir|logmesfile

|access|disable|needsecure|relpaths|hidehidden|alwayslogin

|changepassword|quotaenable|maxipo|maxspeedup|maxspeeddown

|maxusers|idletimeout|sessiontimeout|ratioup|ratiodown

|ratiocredit|quotacurrent|qoutamax|expiration|privilege

|passwordtype|ratiotype|groups|notes|id|expirationtype

Serv_U的配置完成;下面是数据库代码(MS SQL)

if exists (select * from dbo.sysobjects where id = 

object_id(N'[dbo].[serv_u_group]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[serv_u_group]

GO

if exists (select * from dbo.sysobjects where id =

object_id(N'[dbo].[serv_u_group_dir]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[serv_u_group_dir]

GO

if exists (select * from dbo.sysobjects where id =

object_id(N'[dbo].[serv_u_group_ip]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[serv_u_group_ip]

GO

if exists (select * from dbo.sysobjects where id =

object_id(N'[dbo].[serv_u_user]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[serv_u_user]

GO

if exists (select * from dbo.sysobjects where id =

object_id(N'[dbo].[serv_u_user_dir]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[serv_u_user_dir]

GO

if exists (select * from dbo.sysobjects where id =

object_id(N'[dbo].[serv_u_user_ip]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[serv_u_user_ip]

GO

CREATE TABLE [dbo].[serv_u_group] (

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,

[Access] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,

[Notes] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,

[id] [int] IDENTITY (1, 1) NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[serv_u_group_dir] (

[id] [int] IDENTITY (1, 1) NOT NULL ,

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,

[Access] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[serv_u_group_ip] (

[id] [int] IDENTITY (1, 1) NOT NULL ,

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,

[Access] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[serv_u_user] (

[id] [int] IDENTITY (1, 1) NOT NULL ,

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[password] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[passwordtype] [int] NULL ,

[changepassword] [bit] NOT NULL ,

[skey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[access] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[homedir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[privilege] [int] NULL ,

[logmesfile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[disable] [bit] NOT NULL ,

[needsecure] [bit] NOT NULL ,

[relpaths] [bit] NOT NULL ,

[hidehidden] [bit] NOT NULL ,

[alwayslogin] [bit] NOT NULL ,

[maxusers] [int] NULL ,

[maxspeedup] [int] NULL ,

[maxspeeddown] [int] NULL ,

[maxipo] [int] NULL ,

[idletimeout] [int] NULL ,

[sessiontimeout] [int] NULL ,

[quotaenable] [bit] NOT NULL ,

[quotacurrent] [int] NULL ,

[qoutamax] [int] NULL ,

[ratiotype] [int] NULL ,

[ratioup] [int] NULL ,

[ratiodown] [int] NULL ,

[ratiocredit] [int] NULL ,

[expiration] [smalldatetime] NULL ,

[expirationtype] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,

[groups] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[notes] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[serv_u_user_dir] (

[id] [int] IDENTITY (1, 1) NOT NULL ,

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,

[Access] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[serv_u_user_ip] (

[id] [smallint] IDENTITY (1, 1) NOT NULL ,

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,

[Access] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL

) ON [PRIMARY]

GO>

(责任编辑:铭铭 mingming_ky#126.com TEL:(010)-68476636)



延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网