This topic has not yet been rated Rate this topic

How to: Connect to SQL Server from Windows Vista

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.

NoteNote

In SQL Server Express, Windows users are granted connect permission because the BUILTIN\Users group is provided as a login.

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.

NoteNote

If you use the format username@domain when you log on to Windows Vista, you might see a SQL Server login failure or an access denied message. To resolve this issue, use one of the following formats to log in to Windows Vista: domain\username or username@fully_qualified_domain.

To add a Windows user that has the login "machinename\Administrator" to the sysadmin fixed server role

  1. Log on to the computer using the credentials for the machinename\Administrator account.

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

  3. Connect to an instance of SQL Server.

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

  5. In the Login name box, enter the user name.

  6. In the Select a page pane, click Server Roles, select the sysadmin check box, and then click OK.

To add a Windows user that has the login "domainname \username" to the sysadmin fixed server role

  1. Log on to the computer using the credentials for the domainname\username account.

  2. Click the Start button, point to All Programs, click Microsoft SQL Server, right-click SQL Server Management Studio, and then click Run as administrator.

    NoteNote

    The Run as administrator option elevates the user permissions.

  3. In the User Access Control dialog box, click Continue.

  4. In SQL Server Management Studio, connect to an instance of SQL Server.

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

  6. In the Login name box, enter the user name.

  7. In the Select a page pane, click Server Roles, select the sysadmin check box, and then click OK.

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ
How to: Connect to SQL Sever from Windows 7
I am new to the Window 7 environment. I am using an new Sony VAIO 64 bit machine with an I7 processor.$0 I am able to download SQL Server 2008 R2 Express with Advanced Services, BUT....I am unable to connect$0 to the database on startup. I continue to get an error message box that states.$0 $0 "CAN NOT CONNECT OWNER-VAIO\DDNI"$0 $0 Additional Information:$0 A network related of instance-specific error while establishing connection to SAL Server.$0 The Server was not found or was not accessible.$0 $0 Verify that the instance name is correct and that the SQL Server is configured to allow remote connections.$0 (Provider: SQL network interface: error 26-error locating server/Instance specified)(SQL Server)$0 $0 The trial download for SQL Server 2008 R2 Express with Advanced Services is flawless for a 32 bit machine.$0 The X64 (64 bit machine ) for an SQL Server 2008 R2 Express with Advanced Services is IMPOSSIBLE.$0 $0 I have downloaded and uninstalled every available version of SQL Server and end up at this same connection point '$0 error. I have been using the default instance selection. I have spent about a week trying to load in the 64 bit environment$0 and I give up.$0 $0 Any one out there who can help, please.$0 $0 Regards,$0 Dan