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 ‘Windows’

Error message when you install SQL Server 2005 on a computer that is running the original release version of Windows XP: “This application has failed to start because the application configuratio …

Symptoms
When you install Microsoft SQL Server 2005 on a computer that is running the original release version of Microsoft Windows XP, you receive the following error message:

This application has failed to start because the application configuration is incorrect.
Reinstalling the application may fix this problem.Additionally, the following event is logged in the System log:
Source: SideBySide
Event ID: 59
Description:
Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The system cannot find the file specified.
Resolution
This problem occurs because SQL Server 2005 requires the GetSystemTimes function. The GetSystemTimes function is included in Windows XP Service Pack 1 (SP1) and inlater Windows XP service packs.

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.

BUG: Restore of a Large Database on Windows 98 May Fail with 3257 Error Message

Symptoms
Restoring a database backup on Microsoft Windows 98 fails if all the following conditions are met:The file size of the restored database is 2 GB or greater.
The database is being restored over an existing database that is less than 2 GB even if there is more than 2 GBs of free disk space.Here is an example of the error message that might occur:

Server: Msg 3257, Level 16, State 1, Line 1
There is insufficient free space on disk volume ‘D:\MSSQL7\DATA’ to create the database. The database requires 2352873472 additional free bytes, while only 2147155968 bytes are available.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.This error message occurred while attempting to restore a 2 GB database over a newly created or existing database that was less than 2 GB. The restored database file (.mdf) would have been 2,352,873,472 bytes in size.
Resolution
On Microsoft Windows 98, a different Win32 function is called to determine how much free space is available. The function that is called returns a maximum of 2 GB free space.
For additional information about the Win32 function, click the article number below to view the article in the Microsoft Knowledge Base:
231497?(http://support.microsoft.com/kb/231497/EN-US/) INF : Understanding and Using GetDiskFreeSpace and GetDiskFreeSpaceEx

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’.

SQL Server support for mounted volumes

Symptoms
Support for Microsoft SQL Server 2000 data storage on mounted drives varies, depending on whether an instance of SQL Server 2000 is a stand-alone instance or a clustered instance. A stand-alone instance does not use failover clustering. A clustered instance does use failover clustering. More information about each type of instance follows.Stand-alone instance On a stand-alone instance of SQL Server 2000, data storage on mounted drives is supported on Microsoft Windows 2000 and on Microsoft Windows Server 2003. However, the SQL Server 2000 Setup program requires the base drive of a mounted drive to have an associated drive letter. If the base drive of a mounted drive does not have an associated drive letter, the Setup program will assign the next available drive letter to the drive. However, if all the drive letters are already assigned, the Setup program will fail.
For more information about SQL Server requiring a drive letter when you use mounted drives, click the following article number to view the article in the Microsoft Knowledge Base:
834661?(http://support.microsoft.com/kb/834661/) SQL Server 2000 Setup requires a drive letter when you use mounted drivesClustered instance On a clustered instance of SQL Server 2000, data storage on mounted drives or on NTFS junction points is not supported.This applies to Windows 2000 and to Windows Server 2003. The installation of SQL Server 2000 is not supported on a clustered configuration that has mounted drives even if the mounted drives are not intended to be used with SQL Server. That is, if a configuration already has some mounted drives for file shares, you cannot install SQL Server on that configuration, even if you are not using the mounted drives for SQL Server.
SQL Server 2005 and later versions failover clustered instances fully support mounted drives if the mounted drive is hosted by a cluster drive with a drive letter assigned.
Note Because of the number of available drive letters, the number of the virtual instances on a cluster is limited to 25. SQL Server 2005 and later versions has the same limitation.
The SQL Server 2005 and later versions resource depends on the SQL network name resource and the physical disk resources that hold its data. When mount points are being used together with the physical disks, each mount point must appear as a cluster resource. Additionally, each mount point must also be added as a SQL Server dependency. If only the root physical disks dependency is added and the mount points are not added, database corruption will occur on failover. Database corruption may also occur when SQL Server is restarted without failing over.
Resolution
A mounted drive is a volume or a drive that is mapped to a folder on a volume that uses the NTFS file system. Mounted drives function as any other volume or drive. A mounted drive is assigned a drive path instead of a drive letter.
Mounted drives are sometimes referred to as “mounted volumes,” as “mount points,” as “mountpoints,” or as “volume mount points.” You can create mounted drives by using the Microsoft Windows 2000 Disk Management snap-in or by using the Mountvol.exe file.
Although mounted drives are a feature of Windows 2000, mounted drives are not supported on Windows 2000 cluster servers because of the failover behavior on Windows 2000 clustered servers for mounted drives and because of the assignment of different GUIDs for each disk on each node. The behavior of mounted volumes on a failover cluster was fixed for Windows Server 2003. Windows Server 2003 supports mounted drives in a cluster. However, because of limitations in SQL Server 2000, the use of mounted volumes on a clustered instance of SQL Server 2000 is not supported on any operating system.
A SQL Server 2000 installation is not supported on a clustered configuration with mounted drives because SQL Server 2000 was released before the mounted drive feature was released. The code that is used to enumerate the shared and the common local fixed disks in SQL Server 2000 in a clustered configuration is not compatible with mounted drives. This means that SQL Server 2000 cannot be installed on a cluster which contains mounted drives even if the SQL Server 2000 instance does not use any of those mounted drives.
Because of similar limitations, an upgrade of a clustered instance of SQL Server is not supported. An installation of SQL Server service packs on a clustered instance of SQL Server is also not supported.
Note The information in this article supercedes the information that is in the Microsoft Press book “SQL Server 2000 High Availability” that was published before this discovery. The information that is superceded is in “Chapter 4 – Disk Configuration for High Availability” in the “Part II - Microsoft SQL Server Technology” section.

SQL Server is not supported on Windows Server 2003 or Windows Server 2008 Terminal Server application server

Symptoms
Microsoft SQL Server does not support the installation or use of SQL Server Failover Clustering on Microsoft Windows Server 2003-based server clusters or on Windows Server 2008-based server clusters if the server clusters have Terminal Server installed. This configuration was known as Application Mode in Microsoft Windows 2000. However, SQL Server 2000 instance installation is supported as a stand-alone instance for Windows Server 2003 or Windows Server 2008 Terminal Services Mode (Application Mode).
For Windows Server 2003 or Windows Server 2008 Terminal Server Remote Desktop for Administration Mode, SQL Server 2000 installation is fully supported as both a clustered instance and a stand-alone instance.
Note Cluster instances for the versions of SQL Server that are listed in the “Applies To” section are currently not supported on Windows Server 2003 or Windows Server 2008 Terminal Server Server Cluster installations.
Resolution
Terminal Server provides remote computers with access to Windows-based programs running on the following systems:Windows Server 2003 Standard Server Windows Server 2003 Enterprise Server Windows Server 2003 Datacenter ServerWindows Server 2008 Standard Server Windows Server 2008 Enterprise Server Windows Server 2008 Datacenter ServerWith Terminal Server, you can provide a single point of installation that gives multiple users access to any computer that is running one of the operating systems listed earlier. Users can run programs, save files, and use network resources, all from a remote location as if these resources were installed on their own computers. This functionality is now available on server clusters in Windows Server 2003.
Remote Desktop for Administration is another part of the Terminal Services technology that is offered in Windows Server 2003 or in Windows Server 2008. You can enable remote administration of servers with Remote Desktop for Administration on any computer that is running the Windows Server 2003 or Windows Server 2008 family of products, even if Terminal Server is not installed.
Note In Microsoft Windows 2000 Server, the Terminal Server component is named Terminal Services in Application Server mode. In Microsoft Windows 2000 Server, the Remote Desktop for Administration component is named Terminal Services in Remote Administration mode.
To determine whether the Terminal Server service is running on the computer, follow these steps:Open Control Panel.Double-click Add/Remove Programs.On the left side of the screen, double click Add/Remove Windows Components.Under Components, scroll down the list until you find Terminal Server. If Terminal Server is not selected, the service that is running is the “Remote Desktop” service and you can continue with your SQL Server installation. If Terminal Server is selected, you must clear the check box to remove the Terminal Server service in the application before you continue with the SQL Server installation.For more information about the supportability of SQL Server failover clusters on Windows Server 2003 clusters, click the following article number to view the article in the Microsoft Knowledge Base:
313037?(http://support.microsoft.com/kb/313037/) Upgrading SQL Server clusters to Windows Server 2003
Example log behavior if Terminal Server is installedIf Windows Server 2003 Terminal Server is installed and you try to install SQL Server, no log files exist in the %windir% folder. However, the log files are stored in the %userprofile%\Windows folder. When you check the log files and you compare the log to the system variables, you see results that are similar to the following in the Sqlstp.log file:

19:41:44 Begin Action: SetupInstall19:41:44 Reading Software\Microsoft\Windows\CurrentVersion\CommonFilesDir …19:41:44 CommonFilesDir=C:\Program Files\Common Files19:41:44 Windows Directory=C:\Documents and Settings\&lt;user_name&gt;\WINDOWS\ 19:41:44 Program Files=C:\Program Files\19:41:44 TEMPDIR=C:\DOCUME~1\<user_nam~1>\LOCALS~1\Temp\1\From system variables – USERPROFILE=C:\Documents and Settings\<user_name> windir=C:\WINDOWSNote This example does not apply to servers that are running Windows 2003 Service Pack 1 (SP1) or a later version. We recommend that youcheck manuallyfor a Windows directory in the %USERPROFILE% directory.