The window "Settings Files" lists every settings file which the product reads from the `Databases` folder, and it moves databases between them. It shows which file defines which database and which definition the product uses when two files define the same database; see [[Invantive UniversalSQL/General/Settings|Settings]] for the rules of precedence. The window is available from release 28.0. The window is reached with "Settings" in [[Invantive Query Tool Multi-Platform/Discover Databases|Discover Databases]], and with "Show in Settings Files..." in the menu of a tile, which opens it with the file of that database selected. Invantive Query Tool for Microsoft Windows has the same window, described in [[Invantive UniversalSQL/General/Discover Databases|Discover Databases]]. ## The Files The first line of the window names the folder: "Location:" followed by the path of the `Databases` folder. Underneath stands the list "Settings Files in Use" with one row per file and six columns: - "File" is the name of the file. - "Databases" and "Groups" count what the file holds. - "State" says whose the file is. The first word tells the owner: "User" is the file the product writes the databases of the user into, "External" is every other file, which was deployed, downloaded, imported or written by an earlier release, and "Maintained by discovery" is the file which every discovery run rebuilds. A file which cannot be used is shown as "Broken:" with the message code of the reason. - "Writable" says whether the file can be changed. - "Last Written" is the moment of the last change in UTC. The file of the user is in the list also before anything has been written to it; the row then counts no databases and no groups. A text under the list repeats the rule of precedence: when two files define the same database, the one later in file name order wins, and the file maintained by discovery loses to every other. ## The Databases of a File Selecting a file shows its databases in the list "Databases in Selected File", with four columns: - "Database" is the full name of the database, as `<group>\<database>`. - "Data Containers" is the number of data containers. - "Available" says whether the definition in this file is the one the product uses. It reads "Yes", or "No, definition in" and the name of the other file when that file's definition wins. This is the one place where the precedence is visible per database. - "Identifier" is the identifier of the database, which favourites, the database last opened and the selections of partitions use to find a database again. A database in the list has a menu with the actions which a tile of Discover Databases has: "Edit", "Test Connection", "Duplicate" and "Delete". It opens with the secondary mouse button, with the Menu key or with the button "Actions" under the list. ## Buttons The buttons under the lists act on the selected file or database: - "New File..." asks for a name and creates an empty settings file. A name starts with `settings` and ends in `.json`, and cannot be the name of the discovery file. - "Import File..." asks for an existing file and copies it into the `Databases` folder. A file whose name is the name of the discovery file or of the file of the user is refused. - "Rename..." asks for another name for the selected file. - "Move Database..." asks for the file which the selected database is to go to. A database can also be dragged onto a file in the list above, which only takes it when the file can be written. The file of the user takes it before anything has ever been written into it, which is how a definition from elsewhere is made one's own. - "Open Folder" opens the `Databases` folder in the file manager of the operating system. - "Repair Identifications" gives every database an identifier of its own. A settings file made by copying a definition leaves two databases with one identifier, and a favourite then opens one of the two instead of the other. The identifier which a favourite names is left as it is, and so are the databases in a file which cannot be written. - "Refresh" reads the folder again. - "Close" closes the window. A file which is maintained by discovery is not changed here, since the next run rebuilds it. A file which cannot be written refuses a change. Before a file is changed, a copy of it is written to the backup folder, named after the file and the moment.