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

Hr=80004005 ERR:OpenDB failed getting pub version 28627
Greg McPherran
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.
Ritesh Tijoriwala
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
sergiotarrillo5460
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
borisov
Mark_T
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
Michael Kiss
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.
MartinZ
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!
Krushnakumar s
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.
RajuATP
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
Rance
shahji
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
vali
RondeSC
Hi Chris,
Thanks for your analysis and troubleshooting the problem (yourself). This will surely help other people who are having similar issues.