You need to enable JavaScript to run this app.
RDS for SQL Server

RDS for SQL Server

Copy page
Download PDF
FAQ
What should I do if the default database for RDS for SQL Server login has been specified as custom database, but the properties of the default database cannot be synchronized to the standby database?
Copy page
Download PDF
What should I do if the default database for RDS for SQL Server login has been specified as custom database, but the properties of the default database cannot be synchronized to the standby database?
Problem description​
When the default database for a SQL Server login has been designated as a custom library, but the properties of the default database cannot be synchronized to the standby database, a restart or switch operation may affect the login account as follows:​
  • Connection with no database name specified: If you do not specify a specific database name in the connection string, SQL Server attempts to use the default database when logging in. When the default database properties are not synchronized to the standby, the login is connected to the primary database by default. If you try to execute a query for a custom library in the primary database, an error may be thrown.​
  • Connections that specify the database name: If you explicitly specify the database name in the connection string, such connections are not affected regardless of whether the default database properties are synchronized, and queries are executed directly in the specified database.​
Solution​
You can manually modify the default database. When you find that the properties of the default database are not synchronized after the switch, you can manually modify the default database of the login account. The specific operation is as follows:​
  1. Connect instances. For more details, see Connection instance.​
  1. In the left navigation bar, select Security > Logins.​
  1. Right-click the target account and click Properties.​
  1. On the login account's Properties page, set up Default database.​
说明​
It is recommended that Default database be set to primary.​
  1. Click OK.​
​
Last updated: 2025.10.11 16:44:05