question

qhanrahan avatar image
qhanrahan asked

Incorrect Username in Query Error

I am connected to server XYZ as User A. I open a query window to create a stored procedure but it errors with:

Msg 18456, Level 14, State 1, Line 1

Login failed for user 'B'.

Msg 4064, Level 11, State 1, Line 1

Cannot open user default database. Login failed.

Why is it saying Login failed for user 'B'? I am logged in as user A and the code does not have anything to switch the context to user B.

error-message
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.