Author: brave wind Article Source: evil baboons China
Select storage and ODBC when selecting the domain type during site creation.
Then replace the following code with the relevant site in the configuration file of 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
Secret = name | password | skey | homedir | logmesfile | access | disable | needsecure | relpaths | history | changepassword | quotaenable | maxipo | maxspeedup | maxspeeddown | maxusers | idletimeout | sessiontimeout | ratioup | ratiodown | ratiocredit | quotacurrent | qoutamax | expiration | privilege | passwordtype | ratiotype | groups | notes | id | expirationtype
Serv_U configuration complete
Database code (ms SQL)
If exists (select * from dbo. sysobjects where id = object_id (N [dbo]. [serv_u_group]) and OBJECTPROPERTY (id, NIsUserTable) = 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, NIsUserTable) = 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, NIsUserTable) = 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, NIsUserTable) = 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, NIsUserTable) = 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, NIsUserTable) = 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,
[Accesskey] [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,
[Accesskey] [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,
[Accesskey] [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,
[Accesskey] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO