Login Failed for User ' ' Error:4064

Last Post 15 Jan 2009 09:50 AM by navyjax2. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
kyris
New Member
New Member

--
13 Oct 2007 06:01 AM
I am on a computer that is not on a network.

Only one desktop setup.

Server shows as running in SQL Management Studio.

But when I try to connect, connection fails.

I am working with test Databases, Views and Tables in Adventure Works. To restore the original database I deleated Adventure Works and reinstalled it. I have done this before with no problems.

I closed the connection normally.

The next time I tryed to connect connection failed with error 4064.

How do I get back in.
kyris
New Member
New Member

--
13 Oct 2007 12:47 PM
The Current User is an sa user on the computer.

Must it be changed in Windows Management Tools?
kyris
New Member
New Member

--
14 Oct 2007 05:28 AM
Thanks to all for the help.

I was able to regain access to the server by loging in to the master database. Then creating a new user in windows authentication with sa permissions. Then create a new user in SQL Server 2005 with "master" as the default DB. Logging in as the new user and then attaching the the Adventure Works database. After that the original login works again.
navyjax2
New Member
New Member

--
15 Jan 2009 09:50 AM
I had to use the command line sqlcmd tool. For any that might need it in the future, open a command prompt and type these commands:

C:\Documents and Settings\myaccount>cd \
C:\>sqlcmd -E -d master
1> ALTER LOGIN [DOMAIN\myaccount] WITH DEFAULT_DATABASE = master
2> GO

and this worked. Just replace DOMAIN and myaccount with your domain and account.

-Tom



Acceptable Use Policy
---