---
title: DBSD_Init
description: "初始化数据库安全检测模块，并注册回调函数，只初始化一次。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengcctrustzone/tee/ragsecgate/kunpengrag_16_0006.html
sourcePath: /source/zh/kunpengcctrustzone/tee/ragsecgate/kunpengrag_16_0006.html
indexId: 8f08df840d3afe9fca58dc77d749187dff292acba1343386aedd86f8c085627768
---
# DBSD_Init

初始化数据库安全检测模块，并注册回调函数，只初始化一次。

```
DBSD_RET_CODE DBSD_Init(const DBSD_Callbacks *cb, const char *logPath, const char *dataPath);
```

#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| cb | 回调函数 | 非空 | 输入 |
| logPath | 日志根目录，运行日志和检测结果都可以写到该目录下 | 非空 | 输入 |
| dataPath | 数据目录，配置文件根目录 | 非空 | 输入 |


#### 返回值

- 成功：返回DBSD_RET_OK(0)。
- 失败：返回错误码。
