> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lwops.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 8.4. Microsoft SQL

#### 8.4.1. 在Sql\_server创建账户（window）

登录sql\_server数据库，创建zabbix账户

```text theme={null}
use master
CREATE LOGIN [用户名] WITH PASSWORD=N'密码', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
grant view server state to 用户名
grant view any definition to 用户名
grant view any database to 用户名

exec sp_adduser @loginame = '用户名' ,@name_in_db = '用户名'
grant execute ON xp_readerrorlog to 用户名
```

#### 8.4.2. 添加监控对象

![8.4. Microsoft SQL 操作截图 1](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/microsoftsql/image-01.png)
