Trouble connecting to SQL Server 2005 Express

Last post 11-11-2009 4:47 AM by Jian Kang - MSFT. 4 replies.

Sort Posts:

  • Trouble connecting to SQL Server 2005 Express

    11-06-2009, 6:01 PM
    • Member
      point Member
    • ssmith147
    • Member since 11-06-2009, 10:46 PM
    • Posts 2

    I am hoping someone could help me with this.  The problem I'm having seems to be common based on the amount of information I'm seeing about it online, but I can't seem to locate a solution.  Here's what I have:

    Vista Home Premium

    Visual Studio 2008 Pro (On Vista PC)

    Server 2003 SP2 (named 'FILESERVER')

    SQL Express 2005  (named 'FILESERVER\SQL2005DEV')

    The network is running through a regular switch- no routers to complicate things.  Firewalls are both off at this time.  The network is running in workgroup mode due to the Vista Home machine (and another Vista Home plus an XP Home, but both are unrelated to this).  Therefore, as I understand it Windows Authentication will not work- I have to use SQL Server Authentication.

    When I browse for a server in Visual Studio I can see 'FILESERVER\SQL2005DEV' without any trouble.  However, if I try to create a new DB on the server, I get the following error:

    Login failed for user 'William'. The user is not associated with a trused SQL Server connection.

    If I try to do the same thing under Windows Authentication it just replaces 'William' with ''. 

    So far I have created a user on the server with the same credentials as I am using on the Vista PC.  Also, I have created the same user credentials in SQL Server.  I think I'm on the right track but my problem is that I have no experience in installing / securing SQL Server. 

     

     

    If I am on the right track could someone confirm this for me?  Also, a little help walking me through the setup from start to finish would be greatly appreciated .

     

    Thanks in advance for whatever help can be offered.

  • Re: Trouble connecting to SQL Server 2005 Express

    11-06-2009, 6:46 PM
    • Participant
      878 point Participant
    • PavanOIrish
    • Member since 10-07-2009, 10:22 AM
    • Posts 149

    Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
    Right-click the Server name, select Properties > Security
    Under Server Authentication, select SQL Server and Windows Authentication Mode
    The server must be stopped and re-started before this will take effect..."

    try the above steps, that should resolve...

  • Re: Trouble connecting to SQL Server 2005 Express

    11-07-2009, 7:05 AM
    • Member
      point Member
    • ssmith147
    • Member since 11-06-2009, 10:46 PM
    • Posts 2

    Okay, that changed things a little.  I no longer get the error message. Instead, when I try to connect to the database I get "Login failed for user 'William' ".

     

    If I try to connect to an existing DB or create a new one I get this message, although when creating a ne DB it first gives me the message window "SQL Server Needs More Information".

    Any thoughts? 

  • Re: Trouble connecting to SQL Server 2005 Express

    11-07-2009, 9:30 PM
    Answer
    • Contributor
      5,222 point Contributor
    • RickNZ
    • Member since 01-01-2009, 8:43 AM
    • Nelson, New Zealand
    • Posts 863

    Are you sure you're running SQL Express and not Developer?  The way you describe your setup, it sounds wrong.

    SQL Express is normally accessed through the "SQLEXPRESS" instance name -- so it should be "FILESERVER\SQLEXPRESS" or ".\SQLEXPRESS" for short if you access it from the local machine.

    Windows Auth should work fine in a Workgroup, as long as the account has the same password on both machines.


  • Re: Trouble connecting to SQL Server 2005 Express

    11-11-2009, 4:47 AM
    Answer

    Hi ssmith147,

    Like RickNZ said, Windows Authentication should work.

    Since you have Windows Vista, the issue may be caused by User Account Control (UAC). For the reason of it, users on Windows Vista that are members of the Windows Administrators group are not automatically granted SQL Server administrator privileges.

    Please refer to the documents below to fix it:

    How to: Connect to SQL Server from Windows Vista
    http://msdn.microsoft.com/en-us/library/bb326612(SQL.90).aspx

    How to use User Account Control (UAC) in Windows Vista
    http://support.microsoft.com/kb/922708


    Hi RickNZ,

    Yes, SQL Server Express Edition is installed as named instance “SQLEXPRESS” by default. But if the SQL Server Express 2005 is not installed together with Visual Studio, we can use a different instance name.

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (5 items)