SQL Server – Msg 1468, Level 16, State 1, Line 1

ERROR

 

Msg 1468, Level 16, State 1, Line 1

The operation cannot be performed on database "DBName" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.

Msg 5069, Level 16, State 1, Line 1

ALTER DATABASE statement failed.

 

 

Below are the steps I did to resolve the error.

 

  • Remove DBName from AAG

  • Enable Service Broker

ALTER​​ DATABASE​​ DBName​​ SET​​ ENABLE_BROKER;

 

  • Verify Service Broker Enabled

SELECT​​ is_broker_enabled​​ FROM​​ sys.databases​​ WHERE​​ name​​ =​​ 'DBName';

 

  • Add DBName to AAG

 

 

 

 

ue]

Knowledge worth sharing...Share on linkedin
Linkedin
Share on facebook
Facebook
Share on google
Google
Share on twitter
Twitter

SQL Server – Adding a Database to AlwaysOn Availability Group

I usually restore the backup file to the secondary replica WITH NORECOVERY state before I add database to AlwaysOn Availability Group (AAG).

 

The following are the steps to add a​​ database to AAG.

 

 

  • Expand​​ Availability Groups. Right-click​​ Availability Database. Choose​​ Add Database.

 

 

 

  • Click​​ Next.

 

 

 

  • Tick the database that you want to add. You will notice that under status​​ columm, the message is “Meets​​ prerequisites”. This is because I have already restored the database with norecovery status in the secondary replica.

 

 

 

 

  • Choose​​ Join Only.

 

 

 

  • Connect​​ to existing secondary replicas.

 

 

 

 

  • Click​​ Next.

 

 

 

 

  • Click​​ Finish.

 

 

 

 

  • Click​​ Close.

 


 

]

Knowledge worth sharing...Share on linkedin
Linkedin
Share on facebook
Facebook
Share on google
Google
Share on twitter
Twitter

SQL Server – Difference Between TRUNCATE and DELETE

Below is​​ a​​ list of the differences between TRUNCATE and DELETE commands.

 

Knowledge worth sharing...Share on linkedin
Linkedin
Share on facebook
Facebook
Share on google
Google
Share on twitter
Twitter