How to fix the wrong syntax next to "INPUT" in SQL Server 2005

ALTER USER [myuser] WITH LOGIN =[myuser]

This query returns an error in one of SQL Server 2005 Service Pack 1 (SP1). Error

Incorrect syntax near 'LOGIN'

+3
source share
3 answers

The problem seems to be a bug in SQL Server 2005.

It is fixed on SP2. So the fix is ​​to upgrade it to SP2 or higher.

+1
source

Few things

  • You do not need to use []around the username and login you want.
  • It seems you are trying to change the login for yourself. It may not be right.

Try the following:

ALTER USER myuser WITH LOGIN = myLOGIN

See the documentation ALTER USERon MSDN.

+1

ALTER LOGIN Login WITH name = NewLogin
0

Source: https://habr.com/ru/post/1750357/


All Articles