PRB: Connection Timeout Occurs When Connecting to a Remote OLAP Server Using an ADO Connection (301334)



The information in this article applies to:

  • Microsoft SQL Server OLAP Services 7.0
  • Microsoft SQL Server OLAP Services 7.0 SP1
  • Microsoft SQL Server OLAP Services 7.0 SP2
  • Microsoft SQL Server OLAP Services 7.0 SP3
  • Microsoft SQL Server 2000 Analysis Services

This article was previously published under Q301334

SYMPTOMS

When you attempt to connect to a remote OLAP server by using an ActiveX Data Objects (ADO) connection, several seconds may be required for the connection to succeed or the connection may fail with a connection timeout error. When you execute the connection from an ASP page, the following error message may appear:
Microsoft OLE DB Provider for OLAP Services (0x80004005) OLAP server error: The operation requested failed due to timeout.

CAUSE

OLAP Services 7.0 and Analysis Services attempt to perform a Domain Name System (DNS) Reverse Lookup, to resolve the name of the client from the IP address for logging purposes.

RESOLUTION

To resolve this behavior, use either of the methods that follow:
  • Enable DNS Reverse Lookup on the DNS Server by configuring a Reverse Lookup Zone.
  • Add an appropriate name-to-address mapping for the client in the %SystemRoot%\System32\Drivers\etc\HOSTS file of the OLAP server.
  • Activate Session Pooling for the OLAP server.
  • Increase the ADO ConnectionTimeout setting.

MORE INFORMATION

The default ADO ConnectionTimeout setting is 15 seconds. The ADO ConnectionTimeout property, however, may be set to a higher or lower value. If the OLAP server is able to resolve the name of the client from it's IP address, the connection succeeds after several seconds. If the OLAP Services server is unable to resolve the name of the client from it's IP address in the time allowed by the ADO ConnectionTimeout setting, a connection timeout error occurs. The faster the name of the client is resolved from it's IP address, the faster the connection occurs.

Steps to Reproduce Behavior

  1. On a computer that is running Microsoft Internet Information Server, create a new ASP page named Olaptest.asp by using this code:
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="OLAP Connection Test">
    </HEAD>
    <BODY>
    
    <%
    mystarttime=timer
    response.write mystarttime & "<BR>"
    set myconn = server.createobject("ADODB.Connection")
    'Change the Data Source in the next line to the name of the remote OLAP Server.
    strConnectionOLAP="Provider=MSOLAP;Data Source=Remote_OLAP_Server;Initial Catalog=FoodMart 2000;"
    'myconn.connectiontimeout=45
    myconn.open strConnectionOLAP
    
    Response.write Request.ServerVariables("REMOTE_HOST") & "<BR>"
    Response.write Request.ServerVariables("REMOTE_USER") & "<BR>"
    response.write Request.ServerVariables("LOGON_USER") & "<BR>"
    
    If Not myconn Is Nothing Then 
       response.write "Connected" & "<BR>"
    Else 
       response.write "Failed to connect" & "<BR>"
    End If 
    
    endtime=timer
    response.write endtime & "<BR>"
    
    response.write "Connect Time = " & endtime - mystarttime
    myconn.close
    SET myconn=nothing
    %>	
    
    </BODY>
    </HTML>
    					
  2. Open the Olaptest.asp page that was created on the Internet Information Server computer, and then note the contents that display on the screen.
  3. If a timeout error occurs, uncomment the following line of code:
    myconn.connectiontimeout=45
    					
  4. Refresh the Olaptest.asp page in Microsoft Internet Explorer, and then note the contents that display on the screen.
  5. Obtain the IP address of the Internet Information Server, and then open the %System%\System32\Drivers\etc\HOSTS file on the remote OLAP server. Add the IP address and the fully qualified domain name of the Internet Information Server client computer. Save the file, and then exit the editor.
  6. Refresh the Olaptest.asp page in Internet Explorer, and then note the contents that display on the screen.

Modification Type:MajorLast Reviewed:6/30/2004
Keywords:kbprb KB301334