SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘computer’

Error message when you install SQL Server 2005 Express Edition Service Pack 1 in Windows Vista: “Windows NT user or group ‘<COMPUTERNAME>\SQLServer2005MSSQLUser$<COMPUTERNAME>$MSSQLSE …

Symptoms
When you try to install Microsoft SQL Server 2005 Express Edition Service Pack 1 (SP1) on a computer that is running Windows Vista, you receive the following error message:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server]Windows NT user or group ‘COMPUTERNAME\SQLServer2005MSSQLUser$COMPUTERNAME$MSSQLSERVER’ not found. Check the name again.. Refer to the server error logs for detailed error information.
Resolution
This problem occurs if the following conditions are true:The Windows Vista-based computer has a name thatconsists oflowercase characters or that consists of a mixture of lowercase characters and uppercase characters. For example, the computer name resembles Workstation-1.You specify a case-sensitive collation setting for the SQL Server service when you install SQL Server 2005 Express Edition SP1.Windows Vista uses the following two methods to return the computer name in response to a request for the computer name:Windows Vista can return the computer name in uppercase characters.Windows Vista can return the computer name in the actual mixed case characters that appear in the System Properties dialog box.During one part of the installation of SQL Server 2005 Express Edition, theSetup programrequests the computer name as mixed characters. However, Windows Vista returns the computer name in uppercase characters instead. The Setup program also requests the computer name in other parts of the installation of SQL Server 2005 Express Edition. Windows Vista may then return the computer name in mixed case characters.
The SQL Server 2005 Express Edition Setup program compares the received computer names. Generally, this does not cause a problem because computer names are not case sensitive in Windows Vista. However, if a case-sensitive collating sequence is specified when you install SQL Server 2005 Express Edition, the result of the name comparison between the computer name in uppercase characters and the computer name in mixed case characters fails. Therefore, the installation of SQL Server 2005 Express Edition SP1 is unsuccessful.

Description of names and IP addresses that an MSDTC client in a cluster environment must have

Symptoms
The purpose of this article is to help you in the setup or in the troubleshooting of a configuration for a COM+ Application Server or a configuration for an Internet Information Server (IIS) computer that interacts with a clustered server that uses Microsoft Cluster Server (MSCS) that is behind a firewall.
You may have one of the following scenarios: COM+ or IIS computer (client computer)SQL Server clustered that uses MSCSMicrosoft Distributed Transaction Coordinator (MSDTC) as a clustered resource in its own resource group (own name and IP address)Cluster and client computer that are separated by a firewall Certain Internet Protocol (IP) addresses and their corresponding network names must be known by the client computer for MSDTC to work correctly. The client computer can resolve the following names and the following IP addresses by using Domain Name System (DNS), hosts file, or another name resolution method: MSDTC resourceAn instance of SQL Server if the cluster configuration is either active-passive or active-activeCluster Name Certain IP addresses and their corresponding network names must be known by the nodes in the cluster for MSDTC to work correctly. Both nodes in the cluster can resolve the client computer name to an IP address by using DNS, hosts file, or another name resolution method.
Resolution
Additionally, the firewall must be configured to allow bidirectional traffic to occur between the client computer and the cluster. The firewall rules must include the following: The IP network names and the addresses of both physical nodes on the clusterThe SQL Server Instances network names and addressThe client network name and addressesThe child network name and IP resource of the MSDTC Resource Firewall rules must include the range of IP ports that are defined in the registry to allow traffic. See the “References” section.
You may also have to open an additional range of available IP ports as a requirement for the cluster server. See the “References” section for more information.

Authentication methods for connections to SQL Server in Active Server Pages

Symptoms
Both SQL Server authentication (standard security) and Windows NT authentication (integrated security) are SQL Server authentication methods that are used to access a SQL Server database from Active Server Pages (ASP).
Note This article does not apply to Microsoft Windows 2000 Active Directory domains. The Microsoft Windows NT authentication model that is discussed in this article only applies to Windows NT domains.
Resolution
SQL Server authentication SQL Server authentication relies on the internal user list maintained by the SQL Server computer. This list does not include Windows NT users, and is specific to the SQL Server computer. Users are created and configured using the SQL Server Enterprise Manager. To use this authentication method, perform with the following steps: If you connect through Open Database Connectivity (ODBC), in the ODBC Administrator, choose SQL Server authentication when you configure the data source.In the ActiveX Data Objects (ADO) connection string, include the parameters “UID” and “PWD” when you use ODBC, and “User ID” and “Password” when you use the SQLOLEDB provider. Windows NT authentication The computer running SQL Server enables access to its data through Windows NT accounts. To enable Windows NT authentication, through the Internet Information Server (IIS) computer, Basic authentication must be enabled for the Web application. To do this, perform the following: Start the Internet Services Manager. Browse to the Web site, right-click the Web site, and then click Properties.Click the Directory Security tab, click Edit under Anonymous access and authentication control, and then select the Basic authentication (password is sent in clear text) option. To configure IIS for Windows NT authentication, you cannot use Windows NT Challenge\Response (NTLM) authentication. You must use one of the following two IIS authentication methods: Enable only Basic authentication for the Web application. If users are allowed anonymous access, verify the following: If the user is configured as the Anonymous user in IIS, they must also be configured in a Windows NT account on the computer running SQL Server. If SQL Server and IIS are not on the same computer, create the user as either a domain account accessible to both computers or locally on both the SQL Server computer and the IIS computer with the same password. If you create the user locally on both computers, the user must be given the Log on Locally right on the SQL Server computer. If the user is a domain account, the user must be given “Access this computer from the network” right on the SQL Server computer. If SQL Server and IIS are not on the same computer, then start the Internet Services Manager (on the Directory Security property page for the Web application), open the Anonymous User Account dialog box, disable the Enable Automatic Password Synchronization option, and then manually enter the password for the account.The IIS computer requires the user’s password to generate a security token that remains valid on another server. When the Enable Automatic Password Synchronization option is enabled, a token can only be generated for the local computer.If IIS and SQL Server are on the same computer, the name of the SQL Server data source in the connection string and in the ODBC configuration data source (if applicable) is local. In addition, perform the following steps to connect to a SQL Server computer using Windows NT authentication in ASP: If you connect through ODBC, in the ODBC Administrator, choose Windows NT authentication when you configure the data source.In the ActiveX Data Objects (ADO) connection string, omit the parameters “UID” and “PWD” when you use ODBC, and “User ID” and “Password” when you use the SQLOLEDB provider. If you connect using the OLEDB provider for SQL Server (Provider=SQLOLEDB), the connection string must include “Integrated Security=SSPI.”In the SQL Server Enterprise Manager, add all Windows NT accounts and groups that need access through the integrated security to the logins, and define them as using Windows NT authentication. To simplify administration, Microsoft recommends that you add Windows NT groups instead of individual accounts. Configure permissions to all necessary databases, tables, and stored procedures when you define the account(s). The following error messages indicate problems with the SQL Server configuration for Windows NT authentication:

Microsoft OLE DB Provider for ODBC Drivers (0×80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘\’.
Microsoft OLE DB Provider for ODBC Drivers error ‘80040e4d’
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’.

How to use the My.Computer.Network object to download and upload files in Visual Basic 2005

Symptoms
Learn about how to use the My.Computer.Network object and its methods to download and upload files across a network in Microsoft Visual Basic 2005. This article contains sample steps and sample code that demonstrate how to use the My.Computer.Network object for these tasks.
Resolution
This article describes how to use the My.Computer.Network object to upload and download files across a network in Visual Basic 2005. By using this object, you can transfer files from a local computer to a remote network resource. Additionally, you can transfer files from a remote network resource to a local computer. To do this, use the following methods in a Visual Basic 2005 application: My.Computer.Network.DownloadFileMy.Computer.Network.UploadFileThe My.Computer.Network.UploadFile method sends the specified file from the local computer to the specified remote host address. The My.Computer.Network.DownloadFile method downloads the specified remote file and then saves the file in the specified location on the local computer.

How do I open the firewall port for SQL Server on Windows Server 2008?

Symptoms
Windows Firewall on Windows Server 2008 helps prevent unauthorized access to computer resources. However, if the firewall is configured incorrectly, attempts to connect to an instance ofSQL Server may be blocked.To access an instance of SQL Server that is behind the firewall, you must configure the firewall on the computer that is running SQL Server.
This article helps you open the firewall ports for SQL Server on Windows Server 2008.
To have us fix this problem for you, go to the “Fix it for me”section. If you prefer to fix this problem yourself, go to the “Let me fix it myself” section.

Resolution
To fix this problem automatically, click theFix this problemlink. ClickRunin the File Downloaddialog box, and then follow the steps in this wizard.

a.button {background: url(/library/images/support/KBGraphics/PUBLIC/cn/FixItButton.jpg) no-repeat 0 0;width: 139px;height: 56px;display:block;cursor:pointer;}a.button:hover {background-position: bottom right;}Fix this problem
Microsoft Fix it 50169

Note this wizard may be in English only; however, the automatic fix also works for other language versions of Windows.
Note if you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.
Next, go to the “Did this fix the problem?” section.

Error message when you start the SQL Server 2008 Reporting Services Configuration Manager: “Invalid namespace”

Symptoms
On a computer that is running Windows Vista, you install a default instance of Microsoft SQL Server 2005 Service Pack 2 or alater version of SQL Server 2005. On the same computer, you install a named instance of Microsoft SQL Server 2008. For example, you install an instance that is named “SQL2008.”
In this scenario, you may receive an error message that resembles the following when you start the SQL Server 2008 Reporting Services Configuration Manager:

No report servers were found. Details: Invalid namespace
Resolution
This problem occurs if the SQL Server 2008 Reporting Services Configuration Manager points to the SQL Server 2005 Reporting Services instance, and it cannot find the SQL Server 2008 instance.