Skip to main content

Hi all,

I want to anonymize data on a database. However, I cannot set my database to ‘Single User Mode’.

I get the following error: 

I saw on 

that I have to set HADR to off, however I get this message: ‘Msg 40517, Level 16, State 1, Line 2
Keyword or statement option 'hadr' is not supported in this version of SQL Server.’

 

The database is hosted on Azure. Is there a setting in Azure I need to alter?

 

Kind regards,

Rick

@rickwenning As also mentioned in the answer by Mark Jongeling and the Microsoft Docs you referred to: are you sure you are running this on the secondary database?

These options are supported only on secondary replicas.


Hi ​@Arie V,

As far as I know, this is the primary database. The database is hosted on Azure. I assume the back-up settings are preventing me to set the database to Single User mode. 

Do you know a way to disable backups?

Even better: Do you know a way to anonymize the data without having to set the database to Single User mode?

Kind regards,
Rick


@rickwenning You need to run the disabling of HDAR on the secondary database and then perform the anonymize task on the primary database I believe.

As for not having to set the database in Single User mode: please raise a ticket in TCP for that request, as I agree that would be the better solution here!

 


Reply