1

When I run to alter the procedure, I get an error:

Msg 18487, Level 14, State 1, Line 1
Login failed for user 'tester'. Reason: The password of the account has expired.

However when I check under Security -> Logins, I can't find a user with this name.

I also tried removing the expiration with the following command:

ALTER LOGIN tester 
   WITH DEFAULT_DATABASE = [master], 
        DEFAULT_LANGUAGE = [us_english], 
        CHECK_EXPIRATION = OFF

The system says that the user does not exist or I don't have permission (I'm sysadmin)

Msg 15151, Level 16, State 1, Line 1
Cannot alter the login 'tester', because it does not exist or you do not have permission.

5
  • 2
    There is no requirement that a login and user have the same name. Commented Jun 14, 2016 at 14:10
  • 4
    Is the proc hitting a remote server? Is the linked server using tester as credentials? Could it exist and be expired on the remote server? Commented Jun 14, 2016 at 14:12
  • You could have deleted the user from the server but not the DB, or created it on the server but not the DB. Check both locations for that user. Commented Jun 14, 2016 at 15:37
  • @JiggsJedi Yes, you were right, there was a user on the remote server. Thanks. Commented Jun 15, 2016 at 7:34
  • I have added this as an answer for completeness. Commented Jun 15, 2016 at 15:14

1 Answer 1

1

Per my comment...

Please verify that the stored procedure is not utilising a linked server which may contain/use the credentials indicated.

Stored procedures validate connections/credentials on recompile.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.