Hi,
The connection for a database can be configured in the System Center (Database, Other tab). In there is a field "Name", which is stored as <DB> in DB.xml. As far as I understand it, this is in MySQL equal to the database schema.
When writing the Asset Manager Config file, it contains two mandatory fields:
-DatabaseConfig, which points to the database that was configured in the System Center (to be able to connect with the database, because the credentials are there)
-Schema, which is the database schema.
That confuses me what the purpose of the Schema in combination with <DB> is:
-Should Schema be the same value like configured in DB.xml? That makes it a duplicate config and means that for the same database connection if one wants to use two database schemas that two database connections need to be created in the System Center?
-If Schema points to the database schema, and it would be possible to use the same database config for different schemas, then what is the purpose of the <DB> in DB.xml that is also configured?
As you found out already, it's not possible.
But to give a bit of insight as to why that's not the case:
The <DB> tag is not mandatory in db.xml if you use the <ConnectString> tag.
This is mainly used for Oracle/MSSQL connections that want to give extra options to connect to the DB.
Since getting the actual schema name from a connectionstring isn't particularly easy (since you'd need to parse differently based on DB type), it was easiest to just make sure the asset manager config contained the correct value.
I further tested it and, at this moment (DataMiner version 10.3.10), for a MySQL DB, there is no specification of the schema when executing the actual queries. The connection with MySQL is established by setting database to the value that is defined in the <DB> tag of DB.xml. When the asset manager is getting the database schema, it is for example executing the query "show tables", without the schema specified. It is using the schema value that is defined in the asset manager config to construct the file name that is present under AssetManager\Schemas directory, but further there is no clear link with the actual query that is executed.
To conclude, at this moment, if one wants to use different database schemas with the asset manager it should point to different dedicated database connections in the System Center and set the value of <Schema> in the asset manager config to the same value like <DB> in DB.xml.