在创建站点选择域类型时候选择存储与ODBC中,然后将下列代码再Serv_U的配置文件中相关的站点处替换掉。
ODBCSource=ODBC_NAME|ODBC_DB_NAME|ODBC_DB_PWDODBCTables=serv_u_user|serv_u_group|serv_u_user_dir|
serv_u_group_dir|serv_u_user_ip|serv_u_group_ipODBCColumns=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]GOif 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]GOif 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]GOif 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]GOif 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]GOif 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]GOCREATE 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]GOCREATE 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]GOCREATE 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]GOCREATE 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]GOCREATE 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]GOCREATE 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>