How to: Connect to SQL Server 2005 from Windows Vista

  • Hi,

    I finally got SQL Server Developer Ed to install, after upgrading to Vista Ultimate.

    When I go into Management Studio and try to connect, I get the following message:

    Cannot connect to MACHINE_NAME.

    Login failed for user '<MACHINE_NAME\Username>'. (Microsoft SQL Server, Error: 18456)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

    Clicking on the help link yields the following <s> helpful </s> information:

    We're sorry.
    There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base

    I found an article on MSDN titled, "How to: Connect to SQL Server from Windows Vista," which had this advice:

    1. Click the Start button, point to All Programs, click Microsoft SQL Server 2005, and then click SQL Server Management Studio.

    2. Connect to an instance of SQL Server.

    3. Click Security, right-click Logins, and then click New Login.

    DUH! Connecting to an instance of SQL server is precisely what I *cannot* do!

    Article link:

    http://msdn2.microsoft.com/en-us/library/bb326612.aspx

    This is a brand new installation of SQL Server on a single stand-alone machine.  I used "Custom" installation to install all of the sample databases.  This is going to be primarily used for my self-education (assuming I can get it installed before 2008 is released!)

    The article also says that SQL Server installs with the BUILTIN\Administrators group, but I don't see that anywhere.

    Any ideas?

    TIA,

    Marty

  • I installed Sql 2005 Dev on Win XP using mixed authentication, but I normally connect using Windows Authentication. This is what my login screen looks like:

    http://www.wvmitchell.com/SSCentral/Connect_to_Server.bmp

    My machine name is HP350 and my user name is Owner. (Doh!) I do have a Windows passsord but it does not display, not even with stars.

    Try using SQL Server Authentication and use your sa user name + password.

    Hope that helps.

     

  • Hi William,

    That didn't work.  Or, at least not if I understood what you said to do.

    I have never had to deal much with User Accounts, since I am the only person who uses this machine.  So, when you say I should use my sa user name and password, I tried using the same name and pw that I normally use to log on to the machine.  When I look at my account information, it says I am an Administrator, so I guess I am.

    I was told that Vista editions other than ultimate did not recognize Windows Authentication, or maybe that IIS 7 on Vista did not, except for the "Ultimate" edition. 

  • I did get a different message when I attempted to log in using SQL Server Authentication:

    TITLE: Connect to Server

    ------------------------------

    Cannot connect to MARTY_PC.

    ------------------------------

    ADDITIONAL INFORMATION:

    Login failed for user 'Marty'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476

     

  • Sorry I wasn't more specific.

    When you install Sql Server, there is a built-in user name "sa" and you probably entered a password for that account (or were scolded severely for not doing so).

    So you enter the user name "sa" and your sa password. When I connect using SQL Server Authentication, my screen looks like this:

    http://www.wvmitchell.com/SSCentral/Connect_to_Server_using_sa.bmp

    does that work for you?

  • Hi,

    It did not "force" me to enter an "sa" account.  I did not use "mixed" mode.  I accepted the defaults to use Windows Authentication, thinking that would be easiest since I will be the only person using the computer.

    According to the How To article I referenced earlier,

    "The Windows Vista operating system provides a new security feature named User Account Control (UAC). User Account Control lets users perform common tasks as non-Administrators. Windows user accounts that are members of the local Administrators group can run most applications as if they using the Standard User account.

    Using the Standard User account helps protect the system because all applications that are run by administrators in Windows Vista do not have full administrator permissions. Programs that do require administrator permissions, such as tools to administer the system, are started with administrator permissions after the user provides consent.

    SQL Server installs with the BUILTIN\Administrators group as the default system administration group. By default, users on Windows Vista that are members of the Windows Administrators group are not automatically granted permission to connect to SQL Server, and they are not automatically granted SQL Server administrator privileges. On Windows Vista, when a user tries to connect to SQL Server, a message is returned that states that the account does not have rights to log in to SQL Server.

    When a user in the Administrators account runs SQL Server Management Studio, the User Account Control feature strips the membership token for that group and passes only the user account information to SQL Server. A message is returned that states that the account does not have rights to log in to SQL Server. To let members of the Windows Vista Administrators group log in, you must explicitly add the account to the SQL Server logins."

    Frankly, I don't have a clue what any of that means.

    Marty

  • It may be helpful to forget about all the "connect" trouble and create a new win local user on your pc and add it to the win local admins group (my computer -> manage or the equivalent for Vista); then connect to your pc using this new windows account, then run sql management studio by connecting in "windows authentication" mode. Once connected to sql, change the security to mixed mode adding a strong password to the sa account. It's really helpful to have "mixed mode" for a dev sql (local) instance.

     

  • Marty, I'm trying to repeat your install steps, for practice. I'm using Vista Business with Sql 2005 Dev.

    Were you able to install Reporting Services? After the Sql 2005 prerequisites, I keep getting "IIS is not installed" but it is. I thought you had a similar problem in an earlier thread, did you figure it out? Each time, I cancel the SQL install, tweak IIS, but nothing seems to help.

    Vista is really frustrating. Over the weekend, I rebuilt my server with Win 2003 R2 Standard SP1 and SQL Server 2005 Standard SP2 and everything worked just the way it's supposed to.

  • Hi William,

    I did have a thread earlier.  I had been trying for months to install SS2K5 on Vista Home Premium.  Before I bought this new computer, I tried to research as thoroughly as possible all of the hardware and software requirements.  Unfortunately, I did the unforgivable and made an assumption: I mentally added "or higher" when it said it works with Windows XP, 2000, etc.

    I am somewhat new to forums, so please forgive me if I don't know all of the protocol.  (I am also having to learn how to use this editor).

    Anyway, to make a long story short, it turns out that the only version of Vista that supports the installation of SS2K5 including Reporting Services is Vista Ultimate.

    What little information I have been able to find about the need for Ultimate leads me to believe that it has something to do with support for Windows Authentication.  Apparently, Vista has some new kind of security features that make it work completely differently from previous Windows Systems, and the SS development team hasn't quite caught up yet.

    I appreciate all of the comments and suggestions from everyone, but as far as I can tell so far, nothing works the same in Vista.

     

  • Marty, you said "Anyway, to make a long story short, it turns out that the only version of Vista that supports the installation of SS2K5 including Reporting Services is Vista Ultimate."

    I found that there are actually three versions that do work: Business, Enterprise, and Ultimate. But you are correct that Ultimate is the only version that a home user would be likely to purchase. Here is a MS article that gives a great step-by-step detail how to configure IIS prior to installing SS2K5 with RS:

    http://support.microsoft.com/kb/934164

    There are lots of little settings that you need to make in "Turn Windows features on or off" in order for IIS to work & enable the install of RS on Vista.

    Near the end of the article, it also describes workarounds for compatibility issues when using the Business Intelligence Development Studio (BIDS) in Windows Vista.

  • Wow!  Thanks, William! 

    I swear I searched everywhere for an article like this.

    I will go over it and see what I missed.

    Marty

  • The How-To you quoted states that Windows admins on Vista are not automatically admins on SQL Server 2005...

    At the end of installing Service Pack 2 on Vista, there is a "provisioning tool" that runs which will allow you to grant yourself SQL admin rights. If you do not run that tool, you still won't be able to connect to SQL Server even if you are a Windows admin and the installation is "successful".

    If you skipped running that tool, you can grant yourself permission using the Surface Area Configuration tool:

    Start ~ Programs ~ Microsoft SQL Server 2005 ~ Configuration Tools ~ SQL Server Surface Area Configuration

    and then click the link for Add New Administrator, which will bring you a dialog titled SQL Server 2005 User Provisioning Tool for Vista. That's where you can give yourself permission to connect and administer.

  • Hi William,

    The first time I installed, just before I started this thread, I knew I had to apply the Service Pack.  When the install finished, I went to get the SP2.  One of the options was to "install in an automated manner".  This turns out to be Windows Update.  So I went ahead and told it to download and install all the updates it said I needed.  BIG MISTAKE!!!

    That version of the update apparently does not present the "Provisioning Tool" -- or at least I never saw it.

    When I finished re-installing last night and went to install the Service Pack, I decided to download and save the patch file so that I would have it handy in case I needed to apply it again.

    At the end of the update, the provisioning tool came up and I granted myself rights.  However, shortly after that, I received the following two error messages:

    TITLE: .Net SqlClient Data Provider

    ------------------------------

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    *****

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    *****

    TITLE: Microsoft.AnalysisServices

    ------------------------------

    A connection cannot be made. Ensure that the server is running.

    ------------------------------

    ADDITIONAL INFORMATION:

    No connection could be made because the target machine actively refused it (System)

    *****

    I don't know why the bother to provide a "help" link, since there seems never to be any help available.  They claim they will take note of the hits on the page so that they will know which errors people are having a problem with -- big whoop!

    Anyway, one of my co-workers mentioned the Surface area tool, but didn't provide instructions for it, so thanks again for providing that.

    I will give it a try tonight and let you know how it turns out.

    I have been using computers since the 60's -- this is by far the worst experience I have ever had with ANY software!

    Marty

     

     

  • JOY!

  • Congratulations!

    I wanted to go back and revisit something you quoted earlier, from a page in the MS site:

    Using the Standard User account helps protect the system because all applications that are run by administrators in Windows Vista do not have full administrator permissions. Programs that do require administrator permissions, such as tools to administer the system, are started with administrator permissions after the user provides consent.

    In particular, the phrase '...all applications that are run by administrators in Windows Vista do not have full administrator permissions.' This, apparently, is the key to the pain you were having?

    The lesson I draw from this is to ALWAYS install SS2k5 in mixed-mode, and never rely SOLELY on Windows authentication. That promises you the 'back-door' access via the SA account, which you can subsequently deactivate either with a very strong password which you promptly forget or some other means. Of course, you would do this ONLY after establishing other SIDs which have 'SA' privileges.

    Right?

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply