I want to alter a credential on my SQL Server install. It was auto-generated when I set up a replication publication to be used with the replication transaction log reader proxy. Apparently it was generated with square brackets as part of its name because when I select from sys.credentials
, its entry's name is [REPL][BACP\jeremy][DAVEG1525-162-AssessmentSystemLiveTest-1]
.
How can I alter its credential? I tried this:
ALTER CREDENTIAL [REPL][BACP\jeremy][DAVEG1525-162-AssessmentSystemLiveTest-1] WITH IDENTITY = N'BACP\jeremy', SECRET = N'NewPasswordHere'
However it says that this is incorrect syntax. The MSDN page for ALTER CREDENTIAL
only gives examples for credentials whose name doesn't contain square brackets. How can I alter this credential?