After you add an instance to Data Management Service (DMS), DMS automatically collects the data dictionary from the databases within that instance. If you find that the instance information in DMS is out of sync, you can manually sync the data dictionary. If you perform a schema change in DMS, DMS automatically syncs the data dictionary. Otherwise, you must sync the data dictionary manually.
Background information
DMS collects the following information for the data dictionary:
-
Database names and character set information.
NoteFor an instance in Security Collaboration control mode, DMS ignores system databases by default when collecting metadata. For more information, see System databases that are ignored by DMS by default.
-
Table names, occupied storage space, row count, character sets, columns, indexes, and descriptions.
-
Column data types, precision, and descriptions.
Data dictionary update rules:
-
If you perform a schema change in DMS, DMS automatically syncs the data dictionary.
-
If you perform a schema change outside DMS, you must manually sync the data dictionary.
For more information about data dictionaries, see Metadata.
Prerequisites
You must have the DBA or administrator system role. To check your role, see View my system roles.
Procedure
Method 1
Log in to DMS 5.0.
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the console and choose . -
Click the Instance List tab.
-
In the Actions column for the target instance, click .
-
In the Sync Dictionary dialog box, click OK.
Method 2
Log in to DMS 5.0.
-
In the instance list on the left of the homepage, right-click the target instance and select Refresh / Sync Dictionary.
-
In the Sync Dictionary dialog box, click OK.
FAQ
Q: Why can't I see my new database or table in DMS after I manually sync the data dictionary?
A: This issue is usually caused by one of the following reasons:
1. The DMS account lacks permissions on the new database. By default, when you create a new database on an RDS SQL Server instance, permissions are not automatically granted to the account that DMS uses. Therefore, even after a sync, DMS cannot display the database if the account lacks the necessary permissions.
-
Log on to the Alibaba Cloud console. In the navigation pane on the left, choose Instance List.
-
In the top navigation bar, select the target region to open the Instance List page.
-
Find the target instance and click the instance ID to open the Basic Information page.
-
In the navigation pane on the left, choose Account Management.
-
Find the database account that DMS uses. In the Actions column, click Modify Permissions or Reset Account Permissions to grant the account permissions on the new database.
2. Synchronization can be slow for instances with many databases and tables. The time required is proportional to the number of objects in the instance, and the task can take several minutes or longer to complete.
Q: Why are newly created databases, tables, or functions not visible in DMS, or why do deleted databases still appear in DMS?
A: DMS metadata is not synchronized in real time. If you make schema changes outside of DMS — for example, in the RDS console, MongoDB Shell, or another client tool — DMS is not notified of those changes automatically. You must manually sync the data dictionary to update the metadata in DMS.
To resolve this, right-click the target instance in the instance list and select Refresh / Sync Dictionary. The update typically takes effect immediately.
Note the following special cases:
-
MongoDB collections not visible: Before syncing the data dictionary, verify that the collection actually exists by querying it in MongoDB Shell. If the collection does not exist in the database, syncing the data dictionary will not make it appear in DMS.
-
SDK
ListDatabasesreturns a deleted database: This can occur when the metadata for the deleted database is still flagged asNOT_EXISTbut has not been fully cleared. Syncing the data dictionary removes the stale metadata entry and resolves the issue. -
SQL Server functions not visible: DMS synchronizes SQL Server function metadata approximately once per day, so newly created or updated functions may not appear in DMS immediately. You can manually sync the data dictionary to retrieve the latest function list right away.
Q: What should I do if DMS does not display the large data volume indicator for a MySQL table?
A: The large data volume indicator is a UI helper notification only. If it does not appear, this is expected behavior. The background task that calculates the indicator typically runs during off-peak hours or early in the morning, so there may be a delay before the indicator is displayed.
To retrieve the latest underlying metadata, right-click the instance in the instance list and select Refresh / Sync Dictionary. After syncing, check whether the indicator appears.
Q: After I update data in an RDS database, can I immediately see the changes in DMS?
A: This depends on whether you are asking about data records or schema metadata:
-
Data records: When data is committed to disk and you have the necessary permissions, you can query the updated data immediately through DMS. There is no need to sync the data dictionary.
-
Schema metadata: If you made schema changes outside of DMS — such as creating a new database or table — and those new objects are not yet visible in DMS, you must manually sync the data dictionary to update the metadata.
Q: How do I change the instance access method or switch database users in security hosting mode?
A: If you need to change the access method — for example, from Security Hosting - Automatic to Security Hosting - Manual or Non-Hosted — to switch the database user for DDL execution or other operations, follow these steps:
-
In the instance list, right-click the target instance and select Edit Instance.
-
In the Edit Instance dialog box, modify the Access Method field:
-
To switch to Security Hosting - Manual: Enter the username and password of a database account that has the required permissions, and click Test Connection to verify the credentials.
-
To switch to Non-Hosted: Save the changes. The next time you log in to the database through DMS, manually enter the credentials of the account you want to use.
-
-
Click Save to apply the changes.
After completing the access method change, you can revert to security hosting mode at any time by following the same steps.
For more frequently asked questions about synchronizing the data dictionary — including permission troubleshooting, system database filtering, and engine-specific topics for Redis and Oracle — see Synchronize data dictionary FAQ.