# save\_database

Save current database to the specified idb file idbname - name of the idb file. if empty, the current idb file will be used. flags - DBFL\_... bits or 0 see also [set\_database\_flag](/9.0sp1/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/1738.md)(), [clr\_database\_flag](/9.0sp1/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/1739.md)()

success save\_database(string idbname, long flags);

\#define DBFL\_KILL 0x01 // delete unpacked database #define DBFL\_COMP 0x02 // collect garbage #define DBFL\_BAK 0x04 // create backup file (if !DBFL\_KILL) #define DBFL\_TEMP 0x08 // temporary database


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/9.0sp1/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/1303.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
