Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run the following statement to alter the authorization on an endpoint as the current login used for authorization is about to be deleted (left the company).

alter authorization on endpoint::Mirroring to domain\sys-admin-group

We use Windows authentication, so all our server logins have the backslash "\" character in it.

Here is the error I received:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '\'.

I have also tried to enclose the login in single quotes but received the following error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'domain\sys-admin-group'.

I can't find any useful info on the MSDN ALTER AUTHORIZATION page ( Any ideas?

share|improve this question
up vote 6 down vote accepted

Try surrounding it with the quoted identifier:

alter authorization 
on endpoint::Mirroring 
to [domain\sys-admin-group]

Notice the square brackets.

share|improve this answer
Bingo! Yatsi! I usually use the square brackets for weird db or column names like 1234-abc, but didn't think it would apply here. Worked like a charm. Thanks Shark. – deutschZuid Aug 22 '12 at 23:09
@JamesJiao No problem, glad to help. – Thomas Stringer Aug 23 '12 at 1:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.