locked
Login Failed for user <DOMAIN\USERNAME> when domain changes. RRS feed

  • Question

  • I have recently been working on a project. I created a database within Microsoft Visual Studio 2010 under the Server Explorer section. When i created this database it created it as a file. 

    Since then my computer have been migrated onto a new server and now uses a new Domain name. For this reason i am not unable to access any of my old databases created within visual studio. The error message i am getting is:

    Login failed for user 'DOMAIN\grobson'

    Could you please let me know how i can resolve this as it is holding up the progress of my project.

    Thanks

    Glen Robson

    Wednesday, August 29, 2012 9:37 AM

All replies

  • Hi Glen,

    If you have admin access, try to login using windows authentication mode, create a new SQL Server login and provide necessary permissions to the databases and then use the login in the connection string to connect to the database. You can make use of CREATE login syntax as shown

    http://msdn.microsoft.com/en-us/library/ms189751.aspx

    Wednesday, August 29, 2012 11:03 AM
  • I am unsure as to what you mean exactly. The reason i am confused is that i am not using SQL Server Management Studio. I have never used this to create the database or edit it. I can connect to .\SQLExpress through management server however i do not have admin access.

    Please could you let me know exactly what you mean as i am not a SQL Server expert.

    Thanks

    Wednesday, August 29, 2012 11:07 AM
  • Hi Boldonglen,

    This happens when user havn't got login on the SQL Server. As you admin to create your login appropriate access on SQL Server.


    Regards,

    Basit A. Farooq (MSC Computing, MCITP SQL Server 2005 & 2008, MCDBA SQL Server 2000)

    http://basitaalishan.com

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Proposed as answer by Basit Farooq Wednesday, August 29, 2012 11:17 AM
    Wednesday, August 29, 2012 11:17 AM
  • Hi Boldoglen,

    I mean to say first you have to make sure that the "DOMAIN\grobson" should exists in sql server if you dont have admin access please

    contact your DBA so that he can create login for you and try again .

    Wednesday, August 29, 2012 11:23 AM
  • I have no DBA to contact. This makes no sense to me, you must connect to a server or a instance of a server before you can add permissions to users or groups of users is this right? if so where do i connect to? This database is a file a .mdf file and therefore just sits on my machine and is not connected to a server or an instance of a server?

    Thanks

    Wednesday, August 29, 2012 11:26 AM
  • I understand you created this database using Visual Studio but it is hosted on some SQL Server. You cannot connect to database files directly. Can you please paste the snapshot how you are connected to your database, I mean connection string e.t.c.


    Regards,

    Basit A. Farooq (MSC Computing, MCITP SQL Server 2005 & 2008, MCDBA SQL Server 2000)

    http://basitaalishan.com

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Proposed as answer by AniqaSQL Monday, September 3, 2012 7:28 PM
    Wednesday, August 29, 2012 11:37 AM
  • Boldonglen,

    Are you a windows user???

    you can use another one method

    Open command prompt

    Type "SQLCMD"

    Wednesday, August 29, 2012 11:49 AM