先安装数据库，执行下面脚本：


CREATE TABLE [dbo].[AutoReply](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ExternalId] [int] NULL,
	[Sender] [int] NULL,
	[Message] [nvarchar](2000) NULL,
	[Return] [nvarchar](2000) NULL,
 CONSTRAINT [PK_AutoReply] PRIMARY KEY CLUSTERED 
(
	[ID] 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
/****** 对象:  Table [dbo].[Receive]    脚本日期: 01/12/2011 15:55:25 ******/

CREATE TABLE [dbo].[Receive](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ExternalId] [int] NOT NULL,
	[Sender] [int] NOT NULL,
	[Message] [nvarchar](2000) NULL,
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Receive_AddTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_Receive] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]


/****** 对象:  StoredProcedure [dbo].[InsertReceive]    脚本日期: 01/12/2011 15:56:06 ******/

create proc [dbo].[InsertReceive]
@ExternalId int,
@Sender int,
@Message nvarchar(2000)
as

insert into [Receive](ExternalId, Sender, [Message])
	values(@ExternalId, @Sender, @Message)


设置机器人：

1、选择SqlServer类型插件
2、设置url为：
USER ID=数据库帐号;PASSWORD=数据库密码;INITIAL CATALOG=数据库名称;DATA SOURCE=服务器IP或者名称;Application Name='IMRobot';Integrated Security='false'
3、是否自动回复，自主选择。
保存设置。