question

45962607 avatar image
0 Votes"
45962607 asked SeeyaXi-msft commented

failed to add database to an Always On ,error msg: 35208

Hi ....

in my Always on , there are two Database servers DB-1, DB2. Now the DB2 is the Primiary DB, and there is one DBXX in the DB2. when add this DBXX into the always on , by the end ,show the error code 35208, please help.
112063-%E5%9B%BE%E7%89%87.png


112101-%E5%9B%BE%E7%89%87.png


112058-%E5%9B%BE%E7%89%87.png


sql-server-general
图片.png (26.4 KiB)
图片.png (19.3 KiB)
图片.png (15.5 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @45962607 ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it dosen't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @45962607,

This is due to the fact that default database for login is set to something else than master. The Wizard makes connection and runs the T-SQL which fails because it can't run in any other database than master.
You can select default database(master) at step of login to SSMS.

Or select master db and run the T-SQL manually. Like this:.

 use master;
 alter database XXX set xxx availability group = "XXXAlwaysOn";

For more information, please refer to this: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-group-add-a-database?view=sql-server-ver15

Best regards,
Seeya


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

45962607 avatar image
0 Votes"
45962607 answered

@SeeyaXi-msft

Thanks for your reply. (sorry , my server is chinese language )
I make one test database named "Jack"

With your reminder, i use sqlcmd running without error.. great !!!

After that. i checked in the cluster , the status of [Jack] database is “Synchronized”

But , in the panel , as below picture showing, there are Error shows" the Jack database synchronized status is not normal and the Secondary instance without connection"

At the same time, in the secondary , we can't find the "Jack“ database.

i think there is problem for the Cluster. but don't know how to identify that.

thanks in advance.

BR
Jack


112067-%E5%9B%BE%E7%89%87.png



图片.png (107.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @45962607,

Could you please try to remove the secondary replica and then add it to the Availability Group.

Please refer to this: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/join-a-secondary-replica-to-an-availability-group-sql-server?view=sql-server-ver15

Best regards,
Seeya

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.