locked
Hr=80004005 ERR:OpenDB failed getting pub version 28627 RRS feed

  • Question

  • I am getting the error "Hr=80004005 ERR:OpenDB failed getting pub version 28627" in the SQLCESA30.LOG log file in the "C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Server\SqlMobileReplication" directory - the directory set up as the Virtual Directory in Internet Explorer. This occurs when I try to set up a .sdf file to be replicated to a SQL Server 2005 Mobile database (I'm following the instructions from the Microsoft Tutorial - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp).

    In the UI, when I attempt to set up a new Subscription (setting up my publication goes without any problems), I get an error. It occurs at the last step of the "New Subscription" step on "Synchronizing Data (100%)" / "In Progress" and reads as follows:
    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
    HRESULT 0x80004005 (29060)

    I have set up the snapshot directory, and given the IUSR_[machine name], and IWAM_[machine name], and Administrator users full access to the works. I have given Full Access for Share permissions for this folder as well. When running http://MYBOX/SqlMobileReplication/sqlcesa30.dll?diag from either Firefox or IE, there are no problems (I do get 8.0 Database Reconciler FAILURE 0x80004005, however I'm not using SQL Server 2000, so it shouldn't matter).

    I don't believe it's a file permissions problem, because each time I access the URL, an entry is made in the SQLCESA30.LOG file as follows:
    2006/01/07 12:53:16 Hr=80004005 ERR:OpenDB failed getting pub version 28627

    I've tried running the wizard with the Administrator account, the sa account, and even setting the IIS Virtual Directory to use the Administrator account as the account that Anonymous users run under. I've also set up both TCP/IP and Named Pipes to accept remote connections using the Start Menu ⇒ Programs ⇒ Microsoft SQL Server 2005 ⇒ Configuration Tools ⇒SQL Server Configuration Manager. I've tested this connectivity from another box using the osql command. The connection succeeded. I've even tried regenerating the snapshot, then checking file permissions on the snapshot, but I find no problems (the snapshot generates correctly, and permissions to the IIS User allow read).

    I have configured the publication's "Publication Access List" to include every single account that exists in SQL Server, but it still doesn't work.

    According to MSDN, error 28627 is a "Client Agent Error" which means SSCE_M_OPENSQLSERVER - "Failure to open SQL Server with given connect string." I'm setting the logon password as the [sa] account in the last step of the Subscription wizard, though. Further, I've configured the SQL Server Agent to run as the Administrator account on my machine (which is both the Publisher and Subscriber at this stage), and I have configured Administrator to have db_owner in each database.

    What am I doing wrong?

     

    Saturday, January 7, 2006 9:17 AM

Answers

  • OK, I've finally worked it out. It relates to the Network Protocol used (Named Pipes vs TCP/IP). I've disabled TCP/IP on both ComputerA and ComputerB for security reasons. OSQL was working because it correctly selected Named Pipes to connect. Actually, when using the SQL Server "Connect to Server" dialog, if one clicks the "Options >>" button, a "Connection Properties" tab appears, from which it is possible to choose between the available Network Protocols. When I explicitly chose "Named Pipes", it connected immediately.

    So, connectivity now works fully on ComputerB. But what about ComputerA? I was convinced that it was an issue with the Network Protocol, but I couldn't find a way to set the Network Protocol used once the Replication Request hit the web server - the only prompt which allows this to be configured during the "New Subscription Wizard" is the logon which allows one to choose the Publisher database to be replicated from. Even when I selected "Named Pipes" here, it still didn't work. I also validated in the "SQL Server Configuration manager" (in Start Menu > Programs > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Configuration manager), I ensured under both "SQL Server 2005 Network Configuration > Protocols for MSSQLSERVER" that Named Pipes was enabled, and that TCP/IP was disabled, and in "SQL Native Client Configuration > Client Protocols" that the same was true (disable TCP/IP, and enable Named Pipes). Another test using the "New Subscription Wizard" failed ... again.

    Here's what worked: On my machine, I have several Network Cards, and hence several IP addresses. I thought that this may be interfering with the resolution of the server name? In the SQL Server Configuration manager, under "SQL Native Client Configuration > Aliases", I created a new Alias with the following parameters:
    Alias Name: ComputerA
    Pipe Name: \\ComputerA\pipe\sql\query (this was set automatically for me, based on my input in other fields)
    Protocol: Named Pipes
    Server: ComputerA

    That's right - I created an alias with the same name as my computer name to refer to my computer. I tried the "New Subscription Wizard", and it worked.

    I hope I can save someone with similar problems some time.
    Sunday, January 8, 2006 2:28 PM
  • ulRSCBId is much related to a sync session.  However, when you browse the URL, there will not be any sync session created.  And, hence this Invalid RSCB Id... error.  It is not harmful for you in case it is being generated in the scenario I have explained.

    Thanks,

    Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

    Friday, January 20, 2006 10:08 AM

All replies

  • I've managed to get replication working on another machine that I have, and I have been playing around with different configurations between them (ie. alternating the server used for IIS, altering the server used for the SQL Database/Snapshot etc.). One thing that I have found is that I can't connect using either Integrated Security, or a named login from this second computer (ComputerB - that works as a closed system), to my first computer (ComputerA, referred to in the problem above), when browsing from the "New Subscription Wizard". I tested again by creating a file, "test.udl", and trying to connect using that. Again, neither login (Integrated/SQL login) would work. I find this strange because I can open a CMD prompt and logon using the following command from ComputerB:

    osql -S ComputerA -E

    Using osql -S cjsfujitsu -U sa also works (obviously I also enter the password for the sa account).

    I am able to browse from ComputerA to ComputerB using a UDL file. I have configured ComputerA to accept remote connections (hence the osql command being accepted), using Named Pipes only (TCP/IP disabled). The user account under which I run the CMD window, and under which I run both the UDL file, and the SQL Mgmnt Studio is the same.

    Why would this be working with osql and not via the other two methods?

    Sunday, January 8, 2006 1:51 PM
  • OK, I've finally worked it out. It relates to the Network Protocol used (Named Pipes vs TCP/IP). I've disabled TCP/IP on both ComputerA and ComputerB for security reasons. OSQL was working because it correctly selected Named Pipes to connect. Actually, when using the SQL Server "Connect to Server" dialog, if one clicks the "Options >>" button, a "Connection Properties" tab appears, from which it is possible to choose between the available Network Protocols. When I explicitly chose "Named Pipes", it connected immediately.

    So, connectivity now works fully on ComputerB. But what about ComputerA? I was convinced that it was an issue with the Network Protocol, but I couldn't find a way to set the Network Protocol used once the Replication Request hit the web server - the only prompt which allows this to be configured during the "New Subscription Wizard" is the logon which allows one to choose the Publisher database to be replicated from. Even when I selected "Named Pipes" here, it still didn't work. I also validated in the "SQL Server Configuration manager" (in Start Menu > Programs > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Configuration manager), I ensured under both "SQL Server 2005 Network Configuration > Protocols for MSSQLSERVER" that Named Pipes was enabled, and that TCP/IP was disabled, and in "SQL Native Client Configuration > Client Protocols" that the same was true (disable TCP/IP, and enable Named Pipes). Another test using the "New Subscription Wizard" failed ... again.

    Here's what worked: On my machine, I have several Network Cards, and hence several IP addresses. I thought that this may be interfering with the resolution of the server name? In the SQL Server Configuration manager, under "SQL Native Client Configuration > Aliases", I created a new Alias with the following parameters:
    Alias Name: ComputerA
    Pipe Name: \\ComputerA\pipe\sql\query (this was set automatically for me, based on my input in other fields)
    Protocol: Named Pipes
    Server: ComputerA

    That's right - I created an alias with the same name as my computer name to refer to my computer. I tried the "New Subscription Wizard", and it worked.

    I hope I can save someone with similar problems some time.
    Sunday, January 8, 2006 2:28 PM
  • Hi Chris,

    Thanks for your analysis and troubleshooting the problem (yourself). This will surely help other people who are having similar issues.

    Sunday, January 8, 2006 8:35 PM
  • Hi Chris

    A quick note to thank you for posting this solution. I have not had time yet to see if it works for me - some of it I don't fully understand :-) - but I suspect that you've found a cure.

    Thanks again for taking the time to post this. Much appreciated. I'll let you know how I get on! :-)

    Regards

    JB

    Monday, January 9, 2006 2:05 AM
  • No worries. I guess I was lucky that I had another machine to test it out on, and just by conincidence, it only had one network connection. I use a virtual machine on my laptop, and I've got a Wireless LAN, so I've got extra network connections. I've configured my IP setup with different ranges, so I guess there was some sort of name resolution problem. The most annyoying thing for me was the lack of logging during the process. It really would be good if more logging could be configured for the SQL Server Mobile Agent - entries such as "attempting to connect to database ABC on machine DEF, using SQL login 'sa'", and "Attempt to connect to database server ABC on machine DEF failed". At least this way I would have known it wasn't a permissions issue - which is what the error message partially implied by saying that the logon was unsuccessful. My problem was that I spent the better part of a day trying to see what I hand't configured properly in the database (security-wise), rather than checking intra-point connectivity (SQL Mobile DB -> IIS -> UNC folder -> Database).

    I am still puzzled by the occasional entry in the SQLCESA30.LOG log:
    2006/01/08 12:02:53 Hr=80070585 ERR:REQUEST NOT QUEUED for ulRSCBId =  -1

    It would also be good if there was a log message included when synchronisation was (1) attempted, and (2) succeeded.
    Monday, January 9, 2006 5:50 AM
  • By the way, the Hr=80070585 (0x80070585) error simply means "Invalid Index", obviously referring to the value -1. But what is a ulRSCBId? A quick google reveals that someone else has experienced the same issue with SQL CE 2.0, but they didn't get an answer either.
    Monday, January 9, 2006 5:53 AM
  • ulRSCBId is much related to a sync session.  However, when you browse the URL, there will not be any sync session created.  And, hence this Invalid RSCB Id... error.  It is not harmful for you in case it is being generated in the scenario I have explained.

    Thanks,

    Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

    Friday, January 20, 2006 10:08 AM
  • Thanks for your reply! It would be good if this was documented in MSDN somewhere, because a search for 'ulRSCBId' using Technology:All and  Content Type: All returns only this thread!
    Friday, January 20, 2006 1:23 PM
  • Sure we will consider it for doc or may go for giving a different log message.

    Thanks,

    Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

    Wednesday, January 25, 2006 6:57 PM
  • Hey Chris,

    Nice investigative report!

    I have te same original problem you had, but I have about 1/1000 the knowledge you do (and that's me bragging), and am running on a laptop with a wireless, connected, and a wired, not connected.  I tried the Alias trick, an this is what I get now:

    TITLE: Connect to Server
    ------------------------------

    Cannot connect to XXXXXXX.

    ------------------------------
    ADDITIONAL INFORMATION:

    A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------


    I am trying to run the distributor and publisher out of the same machine.  Actually, I am running both already, it's just when trying to create the mobile database that I get a problem.

    Any ideas?  Thanks for the help!
    Sunday, April 30, 2006 1:21 PM
  • Sounds like you've got SQL Server connectivity issues. Have a good look through the following thread to see whether you can resolve login/network connectivity/connection type etc. issues:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=302440&SiteID=1

    Just on the surface, I'd be having a look on the server to see whether you have Named Pipes set up correctly. Alternatively, try using TCP/IP as your transport protocol. You can do this by changing your connection string to the database. There are examples in the thread.

    Sunday, April 30, 2006 4:01 PM
  • Your solution fixed our problem.  Thanks for posting this.
    Thursday, November 16, 2006 9:43 PM
  • We also ran into this issue when we set the app pool in IIS to use more than 1 process.  Changing it back to use 1 process and restarting IIS fixed it for us.

    Our SQLCESA30.LOG showed the following:

    2006/12/12 12:17:40 Thread=2B8 RSCB=6 Command=OPWC Hr=80004005 ERR:Apparent server restart, wrong ExchangeID for this RSCB 6
    2006/12/12 12:17:40 Hr=80004005 ERR:REQUEST NOT QUEUED for ulRSCBId =  6

    Tuesday, December 12, 2006 5:35 PM
  • hi, i have the same issure, 

    i want to ask something, what is the computerA, daes it has something special, is it the computer name?

    Friday, June 17, 2011 2:37 AM