Friday, January 21, 2011

Fix SQL-Server 2008 R2 "network error occurred" SQLNCLI file x64

I was just installing SQL-Server 2008R2 Management Studio (SSMS) Client Tools and SQLNCLI 10.5 on a Windows-7 Professional x64 (64-bit) machine when I ran into a very uninformative, or clearly misleading, error message during the install procedure that stated (something close to this):
Microsoft SQL Server 2008 Setup: The following error has occurred: A network error occurred while attempting to read from the file: [install-device-name--and-root-of-path-here]\x64\setup\x64\sqlncli[1].msi
Since I was installing from an ISO image that I had just used to successfully do a *test* install into a VMware ESXi VM (Windows 2008 Server R2)  prior to the real install on a physical machine, I instantly thought: "what the heck? bad image suddenly?... unlikely... network issues?... unlikely, as I have not had any others."  Something was off.  I wondered if there was an issue with the installer not liking the fact I was trying to install from an ISO that I had "mounted" as a virtual CDROM via UltraISO for this.  So, I used 7-ZIP to explode the ISO into an install directory on my same server, and tried to install directly from this completely unpacked set of files.

The error persisted!  Still getting that "The following error has occurred: A network error occurred while attempting to read from the file... SQLNCLI...".  Hmmm... odd.  And, annoying, as OBVIOUSLY THIS IS/WAS NOT A NETWORKING ERROR as the message describes!  (thank you Microsoft! NOT!).

The cause of the error...
I wondered what was different between my clean test-VM and my server that I was now attempting to install SQL-SERVER 2008 R2 Client Tools and SSMS onto.  Both were 64-Bit OS's and same setup, etc., but one was a clean VM.  This got me thinking...

I had PREVIOUSLY installed JUST the SQLNCLI (SQL-Server Native Client) for SQL 2008 R2 onto my physical system, in order to test application connectivity to a SQL2008R2 database.  So, could that be it!?  YES!  After uninstalling any previously installed SQLNCLI applications, and re-running the SQL-Server installer, amazingly my "network errors" were gone and the installation was fixed!  

Microsoft: GIVE MEANINGFUL ERROR MESSAGES!  All the installer had to do was say that "previous installations of SQLNCLI / native client exist and must be removed before installing"... in fact, the PREREQUISITES-CHECK SHOULD HAVE TESTED FOR THIS if it can cause a total failure to install!  

This may affect SQL-Server Express Edition installs as well.  I was doing a SQL-Server 2008 Enterprise install, but I would bet the installer code is the same... whether standard edition, enterprise edition, express edition, or developer edition 2008 R2.  

I do not know if this only affects x64 (64-bit) installs or x32 (32-bit) as well, but perhaps if you encounter a similar problem, this article may help.  I was able to confirm the error occurs installing on Windows-7 Professsional 64-bit x64, so good luck and get past this quickly.

32 comments:

Jeff said...

Thanks - same issue here. Your resolution worked for me. SQLNCLI was the give-away.

Anonymous said...

Ran into this problem today. Nearly identical situation. Thanks for the help.

Anonymous said...

Thanks, this fixed my issue.

Lorenz said...

Same error and same solution also for Win 2003 x32. ;)

Thank you!

L.

Anonymous said...

Thanks! That solved my problem.

Anonymous said...

Oh. And it's worth mentioning that you remove it using the add/remove programs feature in the control panel. And my machine is a 32 bit machine.

Anonymous said...

Thanks. I ran into the same issue with SQL Server Express 2008 R2 Advance on a 64 bit Win 7 Enterprise machine. The fix worked for me. Ditto for the stupid Microsoft error message.

Unknown said...

Same for me. Installing 2008 R2 x64 express on a Win7 Ultimate x64 box. I got the native client from a GreatPlains 2010 install.

Thanks for posting this

zhijie said...

thank you from Singapore

Carl said...

As above, I had the Native client installed due to a GP install. Then tried to install the Sql Server Manangement tools from a mounted ISO and came accorss this stupid error message.

Remove the client first solved my problem. Thanks.

Hans said...

Many thanks for this one. It solved the issue for me!

Anonymous said...

Thanks! I was getting the network error too, but I was working locally. This solved the problem.

Anonymous said...

Cool Story Bro!

Anonymous said...

Thanks, that helped!
Saved some hours for me

Benni

Anonymous said...

Same issue for me, uninstalled an old version of SQLNCLI and everything worked great.

Reed said...

Great help. Thanks. Exact issue on my PC. As soon as I uninstalled the SQL Native Client, I was able to install the SQL Mgmt. Studio Express install.

Drilon Blakaj said...

WORKED!

You rock!

Anonymous said...

holy crap, I would never have figured this out. Thanks that worked for me...

Sascha said...

Thanks a lot for sharing and yes, MS should definitely use more meaningful error messages!

klee said...

Thanks a lot!! that solved my problem.. Your are right the error message was meaningless!!

Anonymous said...

Thanks!! This solved my problem!

Anonymous said...

Fixed my issue right away. Thank you!

Anonymous said...

Same problem and your fix worked for me as well. Thanks mate.

Anonymous said...

Server 2012, trying to get SQL Mgmt Studio installed, same error, this worked. Thanks!

Unknown said...

Yep, worked for me. Uninstalled SQL Server Clients via Control Panel and reran the installer.

Thanks!

Anonymous said...

Thanks for this fix! It worked for me with SQL Server 2012, too. Obviously I not skilled with network errors :o)

Anonymous said...

Another thanks here , I thought I had a damaged file in the ISO

Erwin said...

For SQL Server 2012 this worked for us:

In [installation path]\1033_ENU_LP\x64\Setup\x64\SQLNCLIX.msi where [installation path] is the path that SQL server installer makes automatically on install, e.g., C:\77c9e725bfe50a1257ade137aa439be1) rename the SQLCNLIX.msi file to SQLNCLIX64-2012-EN-300.msi (notice the small extension, so make sure you show file extensions in that particular folder under View and Advanced). Then reinstall without problems.

Anonymous said...

I just tried something different and it worked, too. I wasn't sure where my SQL client came from or what it might be doing because it was installed months before I came along, so I simply renamed the \{SQL Svr Std 2008 R2 install location}\1033_ENU_LP\x64\Setup\x64\sqlncli.msi to the sqlncli_64.msi that it was looking for. Started the install again, and it completed with no errors.

Average Joe said...

thanks a lot bro, it solved my issue

Anonymous said...

Thanks for this, finally installed after uninstalling previous 2008R2 content. Would be nice to have more informative error messages

Kaushal said...

Thanks heaps, helped save me time.