Borland C++ Delphi application is not able to connect to SQL Server as Non Admin user

Hi,
I am working on a Borland C++ and Delphi application. This application connects to  SQL Server and returns database queries results. Once we migrated to windows Server 2003 we have started facing an issue.
1. IF we login to client application as admin user then this connects properly with SQL Server and returns database queries.But if we connect using Non- Admin users then application is not able to connect SQL Server.
SQL Server 2008
Windows Server 2003.
Can anybody help on this.
Thanks in Advance.
Rakesh

This application is written in Borland C++ and Delphi running on Windows 2003 Server. This  is a Windows GUI based small tool. Basic functionality of the tool is : 1) Once we invoke the tool it connects to DB(SQL Server 2005) and populates a list of
all the tables present in DB.   2) If we select any table from the list populated in step (1) and provide query parameters, this will return results from Database.
Issue:  IF we login to the Windows machine as Administrator this application runs perfectly .This application populates the DB tables correctly and returns results from database when queries executed as in step (2)
But if we login as some other user (like hubapp) then this populates some different set of table which are not from the same database instance .Also the queries does not return any results. In the logs we get following error message : (TiltData is the instance
name for our Database)
Msg:Application Exception : Cannot locate or connect to SQL server.Unable to connect: SQL Server is unavailable or does not exist.  Specified SQL
server not found.Alias:
TiltData1 occurred in main thread.
As for the connection string 
      'DATABASE NAME=tiltdata'
      'SERVER NAME=SDV3'
      'USER NAME=sa'
      'OPEN MODE=READ ONLY'
      'SCHEMA CACHE SIZE=8'
      'BLOB EDIT LOGGING='
      'LANGDRIVER='
      'SQLQRYMODE=SERVER'
      'SQLPASSTHRU MODE=NOT SHARED'
      'DATE MODE=0'
      'SCHEMA CACHE TIME=-1'
      'MAX QUERY TIME=300'
      'MAX ROWS=-1'
      'BATCH COUNT=612'
      'ENABLE SCHEMA CACHE=FALSE'
      'SCHEMA CACHE DIR='
      'HOST NAME='
      'APPLICATION NAME=QueryTool'
      'NATIONAL LANG NAME='
      'ENABLE BCD=FALSE'
      'TDS PACKET SIZE=65535'
      'BLOBS TO CACHE=64'
      'BLOB SIZE=32'
      'PASSWORD=jstart')
Any help is appreciated. I have spent a lot of time on this issue with no results.
Regards
Rakesh

Similar Messages

  • Not able to connect with Sql Server Database

    Hi,
    I'm not able to connect with Sql Server database.during making connection I'm getting the following error:
    "Status : Failure -I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property."
    Please help
    Regards,
    Neeraj Goel

    Hi,
    I'm using Sql Server 2000.
    I downloaded the driver from the given site and still having the same problem. Do I need to copy the driver file in some specific folder.
    Regards,
    Neeraj Goel

  • Hello friends..i m not able to connect MS SQL SERVER 2005 FROM cmd prompt

    dear friends,
    i m not able to connect MS SQL SERVER from command prompt..
    do you know how to connect from command prompt or any other ways to connect to database only for delete SAP* user purpose.
    thanks
    zaheer

    Hi,
    you can use the SQLCMD tool:
    Microsoft (R) SQL Server Command Line Tool
    Version 10.50.1600.1 NT x64
    Copyright (c) Microsoft Corporation.  All rights reserved.
    usage: Sqlcmd            [-U login id]          [-P password]
      [-S server]            [-H hostname]          [-E trusted connection]
      [-N Encrypt Connection][-C Trust Server Certificate]
      [-d use database name] [-l login timeout]     [-t query timeout]
      [-h headers]           [-s colseparator]      [-w screen width]
      [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]
      [-c cmdend]            [-L[c] list servers[clean output]]
      [-q "cmdline query"]   [-Q "cmdline query" and exit]
      [-m errorlevel]        [-V severitylevel]     [-W remove trailing spaces]
      [-u unicode output]    [-r[0|1] msgs to stderr]
      [-i inputfile]         [-o outputfile]        [-z new password]
      [-f <codepage> | i:<codepage>[,o:<codepage>]] [-Z new password and exit]
      [-k[1|2] remove[replace] control characters]
      [-y variable length type display width]
      [-Y fixed length type display width]
      [-p[1] print statistics[colon format]]
      [-R use client regional setting]
      [-b On error batch abort]
      [-v var = "value"...]  [-A dedicated admin connection]
      [-X[1] disable commands, startup script, enviroment variables [and exit]]
      [-x disable variable substitution]
      [-? show syntax summary]
    You have to have the SQL Server tools installed on the box, to get sqlcmd.
    You then can connect with SQL authentication
    sqlcmd -S <Servername\Instancename> -U user -P password                          
    or with windows authentication
    sqlcmd -S <Servername\Instancename> -E
    Best regards
      Clas

  • Dispatcher stopped and not able to connect with sql server

    Hi ,
                       In one of test system disp+work is started and then within no time its stopped.
    I am able to connect with  sql server 2005 database but while starting sap  dispatcher is stopping.
    Here is the log of  dev_wo
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ

    B Thu Jan 05 07:24:02 2012
    B  create_con (con_name=R/3)
    B  Loading DB library 'C:\usr\sap\DE1\SYS\exe\uc\NTI386\dbmssslib.dll' ...
    B  Library 'C:\usr\sap\DE1\SYS\exe\uc\NTI386\dbmssslib.dll' loaded
    B  Version of 'C:\usr\sap\DE1\SYS\exe\uc\NTI386\dbmssslib.dll' is "700.08", patchlevel (0.72)
    B  New connection 0 created
    M sysno      11
    M sid        DE1
    M systemid   560 (PC with Windows NT)
    M relno      7000
    M patchlevel 0
    M patchno    75
    M intno      20050900
    M make:      multithreaded, Unicode, optimized
    M pid        988
    M
    M  kernel runs with dp version 217000(ext=109000) (@(#) DPLIB-INT-VERSION-217000-UC)
    M  length of sys_adm_ext is 572 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 988) [dpxxdisp.c   1299]
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          23936     (1408)
    M  DpShMCreate: sizeof(tm_adm)          3994272     (19872)
    M  DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    M  DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    M  DpShMCreate: sizeof(comm_adm)          528064     (1048)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1440)
    M  DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 07F90040, size: 4659000)
    M  DpShMCreate: allocated sys_adm at 07F90040
    M  DpShMCreate: allocated wp_adm at 07F91E40
    M  DpShMCreate: allocated tm_adm_list at 07F97BC0
    M  DpShMCreate: allocated tm_adm at 07F97BF0
    M  DpShMCreate: allocated wp_ca_adm at 08366E90
    M  DpShMCreate: allocated appc_ca_adm at 0836CC50
    M  DpShMCreate: allocated comm_adm at 0836EB90
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 083EFA50
    M  DpShMCreate: allocated gw_adm at 083EFA90
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 083EFAC0
    M  DpShMCreate: allocated wall_adm at 083EFAC8
    X  EmInit: MmSetImplementation( 2 ).
    X  MM global diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.

    M Thu Jan 05 07:24:03 2012
    M  ThInit: running on host sugarland

    M Thu Jan 05 07:24:04 2012
    M  calling db_connect ...
    C  Warning: Env(MSSQL_SERVER) [SUGARLAND\DE1] <> Prof(dbs/mss/server) [SUGARLAND]. Profile value will be used.
    C  Thread ID:708
    C  Thank You for using the SLOLEDB-interface
    C  Using dynamic link library 'C:\usr\sap\DE1\SYS\exe\uc\NTI386\dbmssslib.dll'
    C  dbmssslib.dll patch info
    C    patchlevel   0
    C    patchno      72
    C    patchcomment MSSQL: Thread check in DbSlDisconnect (969143)
    C  np:(local) connection used on SUGARLAND
    C  CopyLocalParameters: dbuser is 'de1'
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.

    C Thu Jan 05 07:24:19 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.

    C Thu Jan 05 07:24:34 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.

    C Thu Jan 05 07:24:49 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  failed to establish conn to np:(local).
    C  Retrying without protocol specifier: (local)
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.

    C Thu Jan 05 07:25:05 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.

    C Thu Jan 05 07:25:21 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.

    C Thu Jan 05 07:25:37 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  failed to establish conn. 0
    B  ***LOG BY2=> sql error 0      performing CON [dbsh#2 @ 1204] [dbsh    1204 ]
    B  ***LOG BY0=> <message text not available> [dbsh#2 @ 1204] [dbsh    1204 ]
    B  ***LOG BY2=> sql error 0      performing CON [dblink#3 @ 431] [dblink  0431 ]
    B  ***LOG BY0=> <message text not available> [dblink#3 @ 431] [dblink  0431 ]
    M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1411]
    M  in_ThErrHandle: 1
    M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   10156]

    M  Info for wp 0

    M    stat = 4
    M    reqtype = 1
    M    act_reqtype = -1
    M    rq_info = 0
    M    tid = -1
    M    mode = 255
    M    len = -1
    M    rq_id = 65535
    M    rq_source = 255
    M    last_tid = 0
    M    last_mode = 0
    M    semaphore = 0
    M    act_cs_count = 0
    M    control_flag = 0
    M    int_checked_resource(RFC) = 0
    M    ext_checked_resource(RFC) = 0
    M    int_checked_resource(HTTP) = 0
    M    ext_checked_resource(HTTP) = 0
    M    report = >                                        <
    M    action = 0
    M    tab_name = >                              <
    M    vm = V-1

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Server sugarland_DE1_11 on host sugarland (wp 0)
    M  *  ERROR       ThInit: db_connect
    M  *
    M  *  TIME        Thu Jan 05 07:25:37 2012
    M  *  RELEASE     700
    M  *  COMPONENT   Taskhandler
    M  *  VERSION     1
    M  *  RC          13
    M  *  MODULE      thxxhead.c
    M  *  LINE        10354
    M  *  COUNTER     1
    M  *
    M  *****************************************************************************

    M  PfStatDisconnect: disconnect statistics
    M  Entering TH_CALLHOOKS
    M  ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
    M  *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c   720]
    M  *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c  260]
    M  Entering ThSetStatError
    M  ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)
    M  Entering ThReadDetachMode
    M  call ThrShutDown (1)...
    M  ***LOG Q02=> wp_halt, WPStop (Workproc 0 988) [dpnttool.c   327]
    Please help me on this
    Thanks
    Srikanth

    Hi Amit, 
                 I restarted the system but dispatcher still in same stage.
    Here is the log for dev_w0
    ========================================
    Fri Jan 06 03:41:06 2012
    C  OpenOledbConnection: line 23391. hr: 0x8000ffff Login timeout expired
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Login timeout expired
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), 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.
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 2, sev 0), Named Pipes Provider: Could not open a connection to SQL Server [2].
    C  Procname: [OpenOledbConnection - no proc]
    C  sloledb.cpp [OpenOledbConnection,line 23391]: Error/Message: (err 0, sev 0), Invalid connection string attribute
    C  Procname: [OpenOledbConnection - no proc]
    C  failed to establish conn. 0
    B  ***LOG BY2=> sql error 0      performing CON [dbsh#2 @ 1204] [dbsh    1204 ]
    B  ***LOG BY0=> <message text not available> [dbsh#2 @ 1204] [dbsh    1204 ]
    B  ***LOG BY2=> sql error 0      performing CON [dblink#3 @ 431] [dblink  0431 ]
    B  ***LOG BY0=> <message text not available> [dblink#3 @ 431] [dblink  0431 ]
    M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1411]
    M  in_ThErrHandle: 1
    M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   10156]

    M  Info for wp 0

    M    stat = 4
    M    reqtype = 1
    M    act_reqtype = -1
    M    rq_info = 0
    M    tid = -1
    M    mode = 255
    M    len = -1
    M    rq_id = 65535
    M    rq_source = 255
    M    last_tid = 0
    M    last_mode = 0
    M    semaphore = 0
    M    act_cs_count = 0
    M    control_flag = 0
    M    int_checked_resource(RFC) = 0
    M    ext_checked_resource(RFC) = 0
    M    int_checked_resource(HTTP) = 0
    M    ext_checked_resource(HTTP) = 0
    M    report = >                                        <
    M    action = 0
    M    tab_name = >                              <
    M    vm = V-1

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Server sugarland_DE1_11 on host sugarland (wp 0)
    M  *  ERROR       ThInit: db_connect
    M  *
    M  *  TIME        Fri Jan 06 03:41:06 2012
    M  *  RELEASE     700
    M  *  COMPONENT   Taskhandler
    M  *  VERSION     1
    M  *  RC          13
    M  *  MODULE      thxxhead.c
    M  *  LINE        10354
    M  *  COUNTER     1
    M  *
    M  *****************************************************************************

    M  PfStatDisconnect: disconnect statistics
    M  Entering TH_CALLHOOKS
    M  ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
    M  *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c   720]
    M  *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c  260]
    M  Entering ThSetStatError
    M  ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)
    M  Entering ThReadDetachMode
    M  call ThrShutDown (1)...
    M  ***LOG Q02=> wp_halt, WPStop (Workproc 0 3632) [dpnttool.c   327]

  • Project was not able to connect to project server

    We have a user running Project 2007 who gets the following error when trying to open Project:
    "Project was not able to connect to project server because of the following error: the credentials you used to login may not be correct."
    The users PC had been disjoined and rejoined to our domain to fix a separate issue and since doing that she is getting this error when trying to open project. We have confirmed her network credentials are good and she is able to access other network resources
    with no problem.
    Thanks
    Hank Vare

    Sorry for the abbreviation used, by PWA i mean Project Web Access, which is the other interface for Project server essentially the IE where you open the Project Web App
    I asked this based on the assumption given the error "Project was not able to connect to project server "
    Hence assuming you are trying to connect to project server and you have a project server environment, if that's not the case and you are working standalone then navigate to Start >> All programs >> Microsoft office >> Microsoft Office tools
    >> Microsoft Project Server Accounts >> Select the computer and Set it as default
    Thanks | epmXperts | http://epmxperts.wordpress.com

  • Re: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi,
    I'm encountering an issue with "Named Pipes Provider, error: 40 windows" and am having problems determining how to fix it due to the environment I'm using.  I have two SQL Servers installed on two separate Win2K3 Server boxes, one is SQL Server 2000 and the other is SQL Server 2005.  The SQL Server 2000 contains the actual application data.  The 2005 database is used only for Reporting Services.  I've set up the reports on SSRS such that their datasources hit the 2000 server.  This is using SQL Server authentication.
    When testing the reports via SSRS (in Visual Studio 2005), the connection to the data works and the reports are generated fine.  When I deploy them to the reporting server and launch IE to test locally (still on the 2005 box), I get this "Named Pipes Provider, error 40" issue.  I made sure that Named Pipes and TCP were enabled and the port set at 1433 (to match that on the 2000 box). 
    Now I changed the datasource's authentication from SQL Server to Windows authentication.  I tested this in SSRS and this works too.  When I redeployed the reports with this authentication change, testing the reports via IE locally (on the 2005 box) worked.  Great.  Now when I open IE on an external box, i.e. on the 2000 box, and try to test the reports, I get this same error 40 issue.  I've been through a few threads describing the error 40, fiddling around with the SQL Server configuration as well as SSRS, to no avail.  I have a feeling this error 40 issue has to due with permissions/authentication between the SQL Server boxes but I can't really be sure.  Anyone have any ideas on how to troubleshoot my situation.  Thanks.
    larry

    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server :
    I.   Incorrect connection string, such as using SqlExpress.
    Check out: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=558456&SiteID=17
                    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1245564&SiteID=1
    The typical error when dealing with Express includes:
    a.  User is not aware of SqlExpress was installed as a named instance, consequently, in his/her connection string, he/she only specify ".","localhost" etc instead of ".\SqlExpress" or "<machinename>\Sqlexpress".
    b. Np was disabld by default after installing SqlExpress.
    c. If Sqlexpress was installed on the remote box, you need to enable remote connection for Express.
    Please read the following blog for best practice of connecting to SqlExpress.
    http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx
    II. Named Pipes(NP) was not enabled on the SQL instance.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=136253&SiteID=1
    Oppose to SQL 2000 which turn on all protocols, SQL 2005 SKUs turn off NP by default. So, when you see this error, please check:
    1) Go to SQL Server Configuration Manager, See Server has NP enabled.
    2) %windir%\program files\microsoft sql server\mssql.1\mssql\log, notepad ERRORLOG, see whether Server is listening on NP.  You should see "Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ] or [\\.\pipe\mssql$<InstanceName>\sql\query]"
    3) Notice that "sql\query" is the default pipe name, so you need to know server is listening on which pipe name. eg: if you specify server pipe name is "sql\query1", then you would see in the errorlog that server listening on [ \\.\pipe\sql\query1 ], and go to SQL Server Configuration Manager, click client Named Pipe properties, see whether the pipe name is same with the one server listening on.
    4) If you are using SQL Native Client ODBC/OLEDB provider({SQL Native Client} or SQLNCLI), go to SQL Configuration Manager, click client protocols, make sure NP and TCP are both enabled. Right click properties of NP, make sure client is using the same pipe name as server for connection.
    5) If you are using MDAC ODBC/OLEDB({SQL Server} or SQLOLEDB) provider, in command line, launch "cliconfg.exe" and make sure NP enabled and right pipe name specified.
    III. Remote connection was not enabled. 
    Check out: when you right click on the Server in SQL Server Management Studio, in Connections, the Remote server connections part, you have enabled the "Allow remote connections to this server" check box
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322792&SiteID=1
    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=763875&SiteID=1
    If you are making a remote connection, namely, your target SQL Server is on the different box as client application, you might need to check whether:
    a. "File and Printer Sharing" was opened in Firewall exception list.
    b. Please see the blog for enabling remote connection for express and troubleshooting tips of remote connection.
    http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    IV. Server not started, or point to not a real server in your connection string.
    Check out: Open SQL Server Surface Area Configuration and ensure all the required services are started, Remote Connections are configured.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=348662&SiteID=1
    a. use "sc query mssqlserver" for default instance or "sc query mssql$<instancename>" to make sure SQL Server was started. Sometimes, reseason behind the broken of your client application w/ this error:40 might be SQL server restarted and failed, so, it'd better for you to double check.
    b. User specified wrong server in their connection string, as described in the forum discussion, "MSSQLSERVER" is an invalid instance name. Remember, when you connect to default instance, <machinename> could be best representitive for the instance, when you connect to a named instance such as sqlexpress, you should specify <machinename>\<instancename> as data source in your connection string.
     V. Other reasons such as incorrect security context.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=192622&SiteID=1
    Such error also occured during user operation such as moving database or db mirroring or cluster, any DB OP that might invovle different sql instances, namely, the destination database is located in another sql instance and user is not aware of the state of the destination. I recommend you first isolate whether this fail is during connection stage or data operation stage.
    a. During data operation, you are normally asked to type in the destination server name whether it is default to "(local)" or another server "<remotemachinename>". So, remember the exact string that represent the target instance, then when the error repros, open command line, use "sqlcmd -S<representitive> -E" ,see what happens, if the connection fail, please follow up above I - IV troubleshooting lists. otherwise continue.
    b. If you can make basic conection, but still face the error, then there must be something that server reject the connection or client close the connection for some reason.
    VI. Please try basic connectivity tests between the two mahcines you are working on. One simple way to verifty connectivity is to use command line tools, such as osql.exe. For example, osql -E -Stcpervername\instancename. If it connects cross-machine successfully, please also verify that your connection string in your scenario is correct.
    Here are some blogs which could be helpful: just follow the basic connectivity troubleshooting guidelines on the SQL Protocols blog, see:
    SQL Server 2005 Connectivity Issue Troubleshoot - Part I
    http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx
    and
    SQL Server 2005 Connectivity Issue Troubleshoot - Part II
    http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx
    Hope this helps.

  • Named Pipes Provider: Could not open a connection to SQL Server

    We are running into an error on a SQL request from SQL-IDA to the SQL-IDB server. Both servers are on Windows 2005 with MS SQL Server 2003 SP3.
    OLE DB provider "SQL-IDA" for linked server "SQL-IDB" returned message "Login timeout
    expired".
    OLE DB provider "SQL-IDA" for linked server "SQL-IDB" returned 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.".
    Msg 53, Level 16, State 1, Line 0
    Named Pipes Provider: Could not open a connection to SQL Server [53].
    It seems to suggest that SQL-IDA cannot find the network path to SQL-IDB. We've followed the steps in this article http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 but it did not resolve our issue. Is it possible that the MSDTC dynamic port range
    should be set to a specific range on both servers?
    Any help is greatly appreciated.
    Albert

    Hi Albert,
    Can you try to use the SQL Server Management Studio on server ‘SQL-IDA’ to connect to the instance on server ‘SQL-IDB’ to see if it works or not?
    There are possible reasons to error 53:
     a) typo in the server name, or using "/" rather than "\" between server name and instance name, e.g. "myserver/myinst" is not correct.
     b) name resolution to the server name is not correct, "ping -a yourserver" would tell if that's the case
     c) The server machine is firewall'ed and file sharing is not in the exception list. You need put "File and Printer Sharing" in exception.
    For more information:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server (Microsoft SQL Server, Error: XXX).
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Stephanie Lv
    TechNet Community Support

  • Named Pipes provider, error:40 could not open a connection to sql server. Only happens on one of the front end SRS servers

    when testing a datasource connection I get the following error.
    Named Pipes provider, error:40 could not open a connection to sql server.
    I've read all the posts on this and nothing works.  This is a scale out deployment and the connection
    works from the other server I have setup with SRS that is connected to the same backend SRS databases.  It just doesn't work from one of the SRS front ends.  I'm at a loss..  please help

    Enable both named pipe and TCP communications.
    Make sure client is using the same (named) pipe name as server for connection.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Reporting Services 2008 R2 configuration error: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi, I am using SQL Server 2008 R2 and on one of our dev boxes I am trying to setup ReportServer using ReportingServices Configuration manager. This is was installed longtime back and during installation they created a service account for reporting services.
    When I try to configure the service account I do not get the service account created during the installation in the pull down and if I were to use something different I get this "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
    error.
    Thanks in advance...........
    Ione

    Hi,
    Take a look at this blog - http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx
    I hope it will help.

  • SQL Server Agent - [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

    Hi,
    I keep receiving the error below in the SQL Server Agent Error Log;
    [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]
    It is occurring approximately 20 times an hour and i cannot link it to any job failures. All jobs on the same SQL instance are working.
    The server is a clustered server and there are no errors occuring in the SQL Server error log at the same time. I have attempted to trace using profiler looking for errors and warnings but anything that does occur doesn't seem to correspond to the reported
    times of the errors within the sql agent error log.
    Please could someone point me where to look next?
    Many thanks.

    Please may I add that this is on a SQL Server 2008 R2 Enterprise edition patched to 10.50.1600.
    Nah, that server is not patched at all, because 10.50.1600 is the RTM version. Find Service Pack 2 and install at the next maintenance window, after having performed tests according to your local policy.
    It is not going to resolve your particular problem though.
    It seems like you have a job that attempts to a connect to s server that is down or non-existing. The job may be configured to return success also on failures. I would check if there are jobs that target other servers.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Linked Server "Could not open a connection to SQL Server [1909]" after reboot

    We have two production servers, with RCP [out] enabled linked servers set up back and forth between them. When they are rebooted at the same time one of the linked servers will throw this error:
    Named Pipes Provider: Could not open a connection to SQL Server [1909]. 767462021 OLE DB provider "SQLNCLI10" for linked server "server3" returned message "Login timeout expired".
    OLE DB provider "SQLNCLI10" for linked server "server3" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and
    if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
    I've been fixing it by dropping and re-creating the linked server. It's completely identical as before (in sp_linkedservers), so I'm thinking this shouldn't be necessary. My guess is it's only happening because during startup the other server was not available.
    If this is true, can I force a reset of the linked server, without having to restart the server instance, or recreate the linked server?

    Hi Chuck, thanks for the reply. Both servers were already set to 20. I think this might work if in the ensuing 10 seconds the other server happened to come on line.  I could also set it to 60, but then production queries would be waiting 60 seconds
    for timeout.  I'm really after a cause and solution. It's as though the server tries once, sees that the other server is unavailable, and henceforth refuses to try again. I'd like it to try again. Really, it should try every time.
    Could it be that upon startup SQL Server looks for all its linked servers and marks ones it can't reach in that moment as forever invalid?  I'm sure this doesn't happen after startup, only during.

  • Could not open a connection to SQL Server[2]

    There is a universe which is already created and now I added one table and one join to it but when I create a WEBI report based off the same universe, I am getting below error from launch pad.
    Database error: [Microsoft SQL Server Native Client 10.0] :
    Named Pipes Provider:Could not open a connection to SQL Server[2]..
    (IES 10901)(Error:INF)
    I checked all posts from scn but it seems this code [2] is unique while [53] was posted
    Environment:
    BI 4.1 SP03
    SQL server 2005.

    Hi
    Take a look at this - looks like someone fixed their issue with that error:
    http://www.forumtopics.com/busobj/viewtopic.php?t=156738
    Regards,
    Mark

  • Could not open a connection to SQL Server

    Hello -
    I am trying to install the Office SharePoint training from this link (http://www.microsoft.com/downloads/details.aspx?familyid=673DC932-626A-4E59-9DCA-16D685600A51&displaylang=en)
    I get the error below.    TCP/IP / Named Pipes both selected in SQL Surface area.   any ideas?    MOSS and SQL are installed on the same server.
    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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    More information has been written to the server event log.          

    There are a lot of reasons Could not open a connection to SQL Server, you have to check following things to fix the issue:
    1) SQL Server (MSSQLSERVER)
    2) SQL Server Browser
    3) SQL Server Port 1433
    4) Allow remote connections to this server
    5) Ping for your IP Host Address
    You may also refer these articles also Could not open a connection to SQL Server & the
    underlying provider failed on open
    Hope above steps would help to resolve your issue.

  • Named Pipes Provider: Could not open a connection to SQL Server [2]

    Hi
    I'm a complete sql/asp.net newbie and want to try this tutorial:
    http://beta.asp.net/GuidedTour/
    First I installed:
    Visual Web Developer 2005 Express Edition Beta 2
    systemsettings\software shows the "sql server 2005 express edition ctp (sqlexpress)" installed
    mmc\service shows me the SQL Server (SQLExpress) is running
    Following the guided tour I use the commandline, type cmd, and type in the commandbox:
    "C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD90" -S "localhost\SqlExpress"
    Instead of localhost I also tried computername.smallbusiness.local (thats my fully domain name).
    However I always receive the error:
    Named Pipes Provider: Could not open a connection to SQL Server [2]
    Thank you very much for all your help

    Typically I have found problems with connection strings as one of a few things:
    1. Your instance is named different than the default.  I labeled mine BrettSQLServer instead of the regular instance.
    2. Your default storage of the your database has a user the system does not like and won't give it access.
    3. You have ports blocked that SQL Server is trying to access.
    1. Your instance should show up under 'SQL Server Configuration Manager'.  Start>MS SQL Server 2008 > Configuration Tools> SQL Server Configuration Manager.  You should see a left view panel where you can click 'SQL Server Services'.  This
    will show on the right all of your SQL services that are running.  The most important one is SQL Server({Your SQL Server Name}).  You will see column headers's displaying: "Name, State, Start Mode, Log on as,  ProcessID" by default.  If
    you don't see a version of this you may have no installed SQL server properly and gotten SQL management studio but not the server.  If you have the server and it's off or not running that is another problem.  If your "LOG On AS" is a service account
    is "NT ...." or something besides "Local System" that may be a problem.  Without getting into the symantecs of protection suffice to say you log in with less than system, yes you are more secure but some built in functions for connections may not work.
    2. Going off of rights of your 'Log On As' I WOULD USE 'System' NOT "NT Authority....".  The reason is that you can access less things with 'NT Authority....' but yes you are more secure for that reason.  If you are just trying to connect at home
    to test non secure things I don't see the harm.  If you are setting up a database for a multinational corporation than, Yes I would use a more secure account.  If you need to change it while still in SQL Server Confi Manager: Right Click> SQL
    Server(Your Version) > On 'Log On' tab > Choose drop down for 'Built-in Account' select 'Local System'.  As extra steps make sure by some strange reason your database locales have this user by default(They should).  MS likes to install database
    as default to: C:\Program Files\Microsoft SQL Server\MSSQL10.{instanceName}\MSSQL.  If you go to this location by going: right click>Properties>Security Tab .. and you fail to see your user that SQL server is defined as you may have lots of
    issues.
    3. Turn off Windows Firewall during SQL installation.  If you are scared of being attacked during this down window, disconnect your NIC and reconnect later.  I have not added a port manually in a while but it is simply easier to just
    turn off your firewall during install.  Having your TCP/IP connection from SQL Server blocked is kind of bad if you need to connect to it that way later.
    Problems most commonly encountered with SQL Server by users I have seen and I myself encountered a lot with full blown SQL Server Enterprise as well as Express versions of SQL:
    Connection string DO not work for BIDS, ADO.net, Linq, etc...
    Once you follow steps above just go {ComputerName}\{SQL Server Instance} as your connection name.   That mostly always works.  As a preliminary test you should install SQL Management Studio first before doing connection strings for a basic test
    that it can access your server.  When you first boot it up and click 'New Database Engine Query' it will display Server Type: "Database Engine" and a blank field or autopopulated field for 'Servername'.  The {ComputerName}\{SQL Server Instance} almost
    always works.  If it works and you can connect, you know that you have access, if you don't start there first before getting into connection strings through .NET languages.   I suggest just adding an easy alias, my local SQL box is simply called
    'Brett'.  Go again back to SQL Server Configuration Manager.  On the left side click 'SQL Native Client ...' > 'Aliases' > New > type in whatever you want.  Go back to the left pane click on 'SQL Server Services' ensure the service
    'SQL Server Browser' is running and set to run automatic.  Have fun accessing SQL Server with your alias.  
    Help I can't get FileStream to work and I ran 'spconfigure' in SQL and it still doesn't work.
    Kind of annoying that more sites don't list that it is entirely in the Configuration manager and has zilch to do with setting the option if the config has it off.  I am not a master of the sp_configure TSQL access method but I know during installs turning
    it on fails to REALLY turn it on.  Once again go to SQL Config Manger > SQL Server Services > Right click your instance > Select FILESTREAM tab > enable both check boxes.  Restart SQL Server.  Install Adventureworks 2008 and whatever
    else failed due to filestream access levels.
    Medium to Advanced on some things, but always wanting to know more

  • Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    This was originally posted in the SSIS Forum, but a member of the IS team suggested it be moved here.  "Most recently I got this error (Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) so does this mean that SQL Server is still trying to use named pipes even if I only have TCP/IP enabled in SQL Server Configuration Manager?"
    I'm having the same issue, and here's our scenario:
    Installed SQL Server 2005 Developer Edition on a machine with WinXP SP2 and enabled remote connections over TCP/IP
    Installed SQL Server 2005 Standard Edition on a machine with Win2003 SP1 (remote connections over TCP/IP enabled by default)
    Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'Detach and Attach' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
    Attempted to 'Copy Database' from Developer Edition TO Standard Edition using 'SQL Management Objects' method and recieved the error on the Win2003 machine: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
    Reinstalled Standard Edition on the Win2003 SP1 machine
    Checked all the settings on both machines several times, restarted services etc., and read every post I could find referencing the error.
    Same error
    Lost my last hair
    Thanks in advance,
    Steve

    Nan,
    Before I get on with this post - thank you for your reply.
    The XPSP2 machine actually had the firewall disabled, and I verified that it could accept connections on the the associated ports with the Shields Up utility.  I tested this on both machines.
    I can connect to the server from the XPSP2 machine, Import / Export, manage, view logs, and do everything EXCEPT get the Copy Database package to run.  SQL Server Agent always fails on the last step with the following error:
    Event Type: Error
    Event Source: SQLISPackage
    Event Category: None
    Event ID: 12550
    Date:  1/10/2006
    Time:  1:34:15 PM
    User:  NT AUTHORITY\SYSTEM
    Computer: 401SERVER
    Description:
      Event Name: OnError
     Message: Failed to connect to server BETHESDA.
    StackTrace:    at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
       at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.OpenConnection(Server& server, ServerProperty serverProp)
    InnerException-->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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    StackTrace:    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect(WindowsIdentity impersonatedIdentity)
       at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
     Operator: NT AUTHORITY\SYSTEM
     Source Name: BETHESDA_401SERVER_Transfer Objects Task
     Source ID: {86F355AD-3B74-4D7B-8D2D-C743C790A269}
     Execution ID: {91B7C32C-C439-4EDB-8A0F-9F8BF207BC06}
     Start Time: 1/10/2006 1:34:15 PM
     End Time: 1/10/2006 1:34:15 PM
     Data Code: 0
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Have you (or anyone else) successfully executed a Copy Databse task?
    Steve

Maybe you are looking for