Short answer: yes, it's a bad practice (or not even a practice).
As Martin Fowler expresses:
A DDD aggregate is a cluster of domain objects that can be treated as a single unit
One of the consequences of this statement is that aggregates need to be stored transactionally. The aggregate code will ensure its state consistency in memory, but if you cannot enforce that consistency in the database, you will have problems.
Having an aggregate stored in multiple databases means that you either won't be able to store them transactionally (which you shouldn't do) or that you'll have use distributed transactions (which you shouldn't do either ideally).
Regarding your specific problem, either your aggregate is wrong or your database design is wrong.
To see if your aggregate is wrong, consider why you need that Name
property in that aggregate? It should be there only if it needs to change transactionally with the rest of the aggregate or the aggregate needs it to perform its business logic.
If the aggregate is correct, then move the Name
property to the same database (and most likely same table) than the rest of the aggregate. If for some reason you need the Name
in that other database in order to be available for some queries, maintain it with eventual consistency (when the Name changes in the aggregate, publish en event and subscribe to it to update the query database).