This project has moved and is read-only. For the latest updates, please go here.

Another SQL Alias Question (32 / 64 bit)

Sep 29, 2011 at 2:52 PM

I'm getting set to add aliases in a new farm I'm building (prior to running AutoSPInstaller) because I will have separate database servers for Search and "everything else". wahidsaleemi provided a link in this thread that explains how to do this (Thanks!). His instructions cover how to create both 32-bit and 64-bit aliases.

I was comparing what I needed to do in preparation for creating the new farm to my TEST farm which only uses one database server. In that instance I let the AutoSPInstaller script create the SQL Alias.  I noticed that only the 32-bit alias was created in that case. Is this because SharePoint (currenlty) doesn't use the 64-bit SQL Server client? Could this be a problem in the future if an update starts using the 64-bit client?

I'm thinking that it would be best to create both, right?



Oct 1, 2011 at 8:42 PM

Hi Mike,

Let me clarify. SharePoint uses 64-bit client to access SQL and that is what AutoSPInstaller will create. On a 64-bit Windows OS, that's the same as C:\Windows\System32\cliconfg.exe (its confusing because of the system32 folder. On 32-bit machines, its 32-bit but on 64-bit machines, its 64-bits). The cliconfg.exe in C:\Windows\SysWOW64 is actually the 32-bit version.

The WOW64 emulator aliases an alias to the \Windows\SysWOW64 folder. This means that any time a 32-bit application needs to read or write anything to or from the \Windows\System32 folder, the WOW64 emulator transparently redirects the request to the \Windows\SysWOW64 folder. I know, I have to update my wiki.

I think its best to create both, because there could be a component in SharePoint that uses a specific SQL client. I had a problem with this last year where a web part related to User Profiles could not connect to SQL (I was getting Access Denied.) It turned out to be full-trust code accessing SQL directly using the 32-bit client. The alias was never set so it couldn't connect.

Its quick and easy to type in the two lines of PowerShell to set the aliases :)

New-ItemProperty HKLM:SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo –name Alias_SPDB -propertytype String -value "DBMSSOCN,SQL1\SHAREPOINT,1433"
New-ItemProperty HKLM:SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo –name Alias_SPDP -propertytype String -value "DBMSSOCN,SQL1\SHAREPOINT,1433"
Oct 3, 2011 at 2:02 PM

Thanks for the clarification! I thought it seemed odd that SP2010 would be using 32-bit SQL client!

I've created a little PowerShell script that checks for both aliases and creates them if they don't already exist...