Select the product you need help with
SQL Server 2005 connectivity and Volume Shadow Copy Service (VSS)Article ID: 919023 - View products that this article applies to. SQL Server Support Voice ColumnSQL Server 2005 connectivity and Volume Shadow Copy ServiceTo customize this column to your needs, we want to invite you to submit your ideas about topics that interest you and issues that you want to see addressed in future Knowledge Base articles and Support Voice columns. You can submit your ideas and feedback using the Ask For It
(http://support.microsoft.com/common/survey.aspx?scid=sw;en;1176&p0=&p1=&p2=&p3=&p4=)
form. There's also a link to the form at the bottom of this column.On This PageWelcome back! I am Sandy Yakob with the Microsoft SQL Server Content team. I am your hostess for the SQL Server Support Voice columns. A quick note about me: I have been with Microsoft for 14 years. For the past three years, I have been working with the SQL Server Content team. For this month's column, Suresh Kandoth will address Microsoft SQL Server 2005 connectivity and Volume Shadow Copy Service (VSS). Suresh is an escalation engineer with the SQL Server Support team. He has been with Microsoft for the past four years, working on SQL Server technologies. I hope that you enjoy the column and find it helpful. SQL Server 2005 connectivity and VSSIn this article, we discuss SQL Server connection issues that you may encounter when you use Volume Shadow Copy Service (VSS) enabled backup applications.Background informationBefore we jump into the details of the errors and problems, let's examine the different components that are involved in this discussion.
Connections to SQL ServerYou might be wondering why VSS framework components would need to connect to SQL Server when the components are only performing a backup of the volume. During the initial phases of snapshot creation, the configured default writer makes a connection to the instances of SQL Server on the particular server. One of the first phases of a snapshot creation process is "Backup Initialization." During this phase, the backup application (requestor) performs the following actions to make sure that all the components in the snapshot creation process are ready:
Identify the writerEither MSDEWriter or SqlServerWriter will perform the metadata enumeration. So, either MSDEWriter or SqlServerWriter will need to connect to the instance of SQL Server. To determine which writer is configured by default as the writer for the instance of SQL Server, use the following information.Collapse this table
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Settings registry key. This is a DWORD value and may not be present unless you manually create it.Even though SqlServerWriter is installed with SQL Server 2005, it is not configured as the default writer for SQL Server 2005. You must manually configure SqlServerWriter as the default writer. For more information, visit the following Microsoft Web site: http://technet.microsoft.com/en-us/library/cc966520.aspx When you troubleshoot connection issues from the writer to the instance of SQL Server, you must be aware of the following important information:
(http://technet.microsoft.com/en-us/library/cc966520.aspx)
Problems when the writer tries to connect to SQL ServerYou may experience the following two problems when the default writer tries to connect to the instances of SQL Server on the computer:
Authentication problemsWhen the VSS service and the SQLWriter service are installed, the service startup account is configured as Local System [NT AUTHORITY\SYSTEM]. When the writer tries to establish a connection to instances of SQL Server, the writer uses the credentials of the Local System [NT AUTHORITY\SYSTEM] startup account. You must make sure that the instances of SQL Server have granted access to this Windows account either explicitly or through group membership of BUILTIN\Administrators.If authentication problems occur, the following messages are logged in the Windows event log. Message 1Event Type: Error
Event Source: SQLWRITER Event Category: None Event ID: 24583 Date: 4/30/2006 Time: 11:38:44 AM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80040e4d. SQLSTATE: 28000, Native Error: 18456 Error state: 1, Severity: 14 Source: Microsoft SQL Native Client Error message: Login failed for user 'NT AUTHORITY\SYSTEM'. DBPROP_INIT_DATASOURCE: ComputerName DBPROP_INIT_CATALOG: master DBPROP_AUTH_INTEGRATED: SSPI Message 2Event Type: Error
Event Source: SQLWRITER Event Category: None Event ID: 24583 Date: 4/30/2006 Time: 11:38:44 AM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80040e4d. SQLSTATE: 28000, Native Error: 18456 Error state: 1, Severity: 14 Source: Microsoft SQL Native Client Error message: Login failed for user 'NT AUTHORITY\SYSTEM'. DBPROP_INIT_DATASOURCE: ComputerName DBPROP_INIT_CATALOG: master DBPROP_AUTH_INTEGRATED: SSPI Message 3You may encounter the following error when you use SQL Server VSS Writer to take a backup:Log Name: Application Source: SQLWRITER Event ID: 24581 Task Category: None Level: Error Description: Sqllib error: System table sys.sysdatabases in SQL Server instance <SQL Server Name> is empty. If the Local System account doesn't have ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission, or CREATE DATABASE permission in the master database, then above error will occur as it will not be able to query the sys.databases catalog view. Having db_datareader rights is not enough for this operation to succeed. This operation requires the Local System (NT AUTHORITY/SYSTEM) account to have one of the following:
Message 4Event Type: Error
Event Source: VSS Event Category: None Event ID: 6013 Date: 4/30/2006 Time: 11:38:44 AM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80040e4d. SQLSTATE: 42000, Native Error: 18456 Error state: 1, Severity: 14 Source: Microsoft OLE DB Provider for SQL Server Error message: Login failed for user 'NT AUTHORITY\SYSTEM'. If you are running a SQL Profiler trace and the Audit Failed Login event is included in the trace, the following information is captured for the event. SQL Server 2005EventClass : Audit Login Failed
SQL Server 2000EventClass : Audit Login Failed
Because of strict security requirements, SQL Server installations may have removed the BUILTIN\Administrators group from the SQL Server logins. If this issue occurs, you have to make sure that the NT AUTHORITY\SYSTEM account is granted access to SQL Server. To do this, you must add it as an explicit login. Additionally, because of the types of operations that the writer must perform, we recommend that you do not remove the NT AUTHORITY\SYSTEM login from the sysadmin server role. Even if the MSDEWriter writer and the SqlServerWriter writer can log in to SQL Server successfully, they may encounter the following error message if there are insufficient permissions to query the system tables or the catalog views that contain the information about the databases and the files that belong to the database: Event Type: Error Event Source: VSS Event Category: None Event ID: 6013 Date: 9/4/2006 Time: 9:09:43 PM User: N/A Computer: Computername Description: Sqllib error: OLEDB Error encountered calling ICommandText::Execute. hr = 0x80040e09. SQLSTATE: 42000, Native Error: 229 Error state: 5, Severity: 14 Source: Microsoft OLE DB Provider for SQL Server Error message: SELECT permission denied on object 'sysaltfiles', database 'master', owner 'dbo'. Connection problemsThis kind of problem occurs when the writer cannot establish a SQL connection to the instances of SQL Server. The assigned writer tries to establish a connection to a specific instance of SQL Server that is currently running. If a problem establishing a connection occurs, the following error messages are logged in the Windows event log.Message 1Event Type: Error
Event Source: SQLWRITER Event Category: None Event ID: 24583 Date: 4/30/2006 Time: 12:11:06 PM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005. SQLSTATE: HYT00, Native Error: 0 Source: Microsoft SQL Native Client Error message: Login timeout expired SQLSTATE: 08001, Native Error: 2 Source: Microsoft SQL Native Client Error message: 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. SQLSTATE: 08001, Native Error: 2 Error state: 1, Severity: 16 Source: Microsoft SQL Native Client Error message: Named Pipes Provider: Could not open a connection to SQL Server [2]. DBPROP_INIT_DATASOURCE: ComputerName DBPROP_INIT_CATALOG: master DBPROP_AUTH_INTEGRATED: SSPI Message 2Event Type: Error
Event Source: SQLWRITER Event Category: None Event ID: 24583 Date: 4/30/2006 Time: 12:52:40 PM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005. SQLSTATE: HYT00, Native Error: 0 Source: Microsoft SQL Native Client Error message: Login timeout expired SQLSTATE: 08001, Native Error: 10061 Source: Microsoft SQL Native Client Error message: 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. SQLSTATE: 08001, Native Error: 10061 Error state: 1, Severity: 16 Source: Microsoft SQL Native Client Error message: TCP Provider: No connection could be made because the target machine actively refused it. DBPROP_INIT_DATASOURCE: ComputerName DBPROP_INIT_CATALOG: master DBPROP_AUTH_INTEGRATED: SSPI Message 3Event Type: Error
Event Source: SQLWRITER Event Category: None Event ID: 24583 Date: 4/30/2006 Time: 4:52:34 PM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005. SQLSTATE: HYT00, Native Error: 0 Source: Microsoft SQL Native Client Error message: Login timeout expired SQLSTATE: 08001, Native Error: 2 Source: Microsoft SQL Native Client Error message: 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. SQLSTATE: 08001, Native Error: 2 Error state: 1, Severity: 16 Source: Microsoft SQL Native Client Error message: Shared Memory Provider: Could not open a connection to SQL Server [2]. DBPROP_INIT_DATASOURCE: ComputerName DBPROP_INIT_CATALOG: master DBPROP_AUTH_INTEGRATED: SSPI Message 4Event Type: Error
Event Source: VSS Event Category: None Event ID: 6013 Date: 4/30/2006 Time: 12:11:06 PM User: N/A Computer: ComputerName Description: Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005. SQLSTATE: 08001, Error: 17 Error state: 1, Severity: 16 Source: Microsoft OLE DB Provider for SQL Server Error message: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. These types of connection issues may occur for the following reasons:
http://blogs.msdn.com/sql_protocols/archive/2005/12/19/505372.aspx
(http://blogs.msdn.com/sql_protocols/archive/2005/12/19/505372.aspx)
Isolate connection problemsIf any of these problems occur and you want to obtain more information, you do not have to repeatedly run the backup application. You can use the VSS administrative command-line tool (Vssadmin.exe). To make sure that you use the same credentials and settings that are used by VSS, follow these steps to run the simulation exercises.Note The following steps let you open a command prompt by using the credentials of the NT AUTHORITY\SYSTEM account. The writers will also use the NT AUTHORITY\SYSTEM account.
SQL Server 2005SQL Server 2000When you review the previous examples, you notice that the instances of SQL Server are listening on the following three protocols:
Now we will move onto the client portion of protocol configuration. There are two client configuration points you need to keep in mind. The first one is the list of enabled client protocols. The other one is the order in which the client protocols are used for connection. The default settings differ on various operating systems and for the different versions and editions of SQL Server. See the appropriate Books Online topics for details on what is the default setup. The key point to understand here is that there should be at least one client protocol enabled that matches the server protocol. The only way that you can force the connections from the writer to go through a specific protocol is to configure an alias on the server. Neither the VSS framework nor the writers have any configuration settings where you can supply any connection-specific or authentication-specific information for the client computer's use. You can run the following simple test to determine which protocol is being used on which default connections to the specific instance of SQL Server:
913100
(http://support.microsoft.com/kb/913100/
)
FIX: The MSDE writer is not included when you try to use the Vssadmin.exe tool to list subscribed volume shadow copy writers
For more information about how SqlServerWriter interacts with VSS and instances of SQL Server, visit the following Microsoft Web site: http://technet.microsoft.com/en-us/library/cc966520.aspx For more information about VSS and the architecture of VSS, visit the following Microsoft Developer Network (MSDN) Web site:
(http://technet.microsoft.com/en-us/library/cc966520.aspx)
http://msdn2.microsoft.com/en-us/library/aa384649.aspx For more information about how to manage access to SQL Server for Windows accounts and groups, see the following topics in SQL Server 2005 Books Online:
(http://msdn2.microsoft.com/en-us/library/aa384649.aspx)
http://msdn2.microsoft.com/en-us/library/ms174212.aspx For more information about how to manage the protocols that SQL Server is listening on in SQL Server 2000, visit the following MSDN Web site:
(http://msdn2.microsoft.com/en-us/library/ms174212.aspx)
http://msdn2.microsoft.com/en-us/library/Aa174460(SQL.80).aspx For more information about how to manage the protocol order and a list of protocols that can be used for client connections in SQL Server 2005, visit the following MSDN Web site:
(http://msdn2.microsoft.com/en-us/library/Aa174460(SQL.80).aspx)
http://msdn2.microsoft.com/en-us/library/ms174212.aspx For more information about how to manage the protocol order and a list of protocols that can be used for client connections in SQL Server 2000, visit the following MSDN Web site:
(http://msdn2.microsoft.com/en-us/library/ms174212.aspx)
http://msdn2.microsoft.com/en-us/library/Aa174460(SQL.80).aspx
For more information about connectivity issues, click the following article number to view the article in the Microsoft Knowledge Base:
(http://msdn2.microsoft.com/en-us/library/Aa174460(SQL.80).aspx)
827422
(http://support.microsoft.com/kb/827422/
)
How to troubleshoot connectivity issues in SQL Server 2000
812817 To make sure that the MDAC installation works correctly and that the network libraries are installed correctly, visit the following Microsoft Web site to download the Component Checker utility:
(http://support.microsoft.com/kb/812817/
)
Support WebCast: Microsoft SQL Server 2000: Troubleshooting connectivity
http://www.microsoft.com/downloads/details.aspx?familyid=8F0A8DF6-4A21-4B43-BF53-14332EF092C9 I’d like to thank Suresh for his hard work on this article. He has in-depth experience on several Microsoft Windows server products and enjoys supporting customers and debugging problems. Hope you enjoyed this month’s topic! Thanks for reading!
(http://www.microsoft.com/downloads/details.aspx?familyid=8F0A8DF6-4A21-4B43-BF53-14332EF092C9)
As always, feel free to submit ideas on topics you want addressed in future columns or in the Knowledge Base using the Ask For It
(http://support.microsoft.com/common/survey.aspx?scid=sw;en;1176&p0=&p1=&p2=&p3=&p4=)
form.PropertiesArticle ID: 919023 - Last Review: March 20, 2012 - Revision: 4.0 APPLIES TO
| Article Translations
|


Back to the top








