lundi 4 novembre 2013

SQL Server Management Studio unable to connect using server alias !

When you try to connect to SQL Server using an alias from SQL Server Management Studio you receive the error 53 :

A network-related  or instance-specific error occurred while establishing a connection to SQL Server.
The SQL Server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.(provider: Named Pipes Provider, error : 40- Could not open a connection to SQL Server) (Microsoft SQL Server, Error : 53)

 


But when you use SQLCMD to connect to the same server using the same ALIAS no problem !!!

  


The issue is related to the fact that SSMS is a 32 Bit application but SQLCMD is 64 bit application; when we use cliconfg.exe to create server SQL Server aliases thay are created only for the 64 bit registry entry :



But not created for the 32 bit registry tree as you can see on the screen capture:



To resolve this issue you have just to create a new string (REG_SZ) registry value on the the registry key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo with name of "Your SQL Server Alias" and value of "DBMSSOCN,<Your SQL Server Alias>,<port number>" .

Now you can connect to your SQL Server using the Alias and SSMS :





    

samedi 19 octobre 2013

Installing .Net Framework 3.5 on Windows 8 - Error 0x800F081F

When you try to install .Net Framework 3.5 on Windows 8 you will receive the error 0x800F081F, the origin of the problem is that the sources files needed for this feature are not present on the C:\Windows\WinSxS folder of your operating system.
As you can see on the following picture only the source files for .NET 4.5 are present :
 
To resolve this issue you have to use the Windows 8 installation media and form the command line run the following command to install the .Net Framework 3.5 feature :

dism /online /enable-feature /featurename:NetFx3 /All /Source:<Path> /LimitAccess

Where <Path> is <Drive Letter>:\Sources\SXS and <Drive Letter> is the driver letter associated to your Windows Installation media.  


  
     
 

How To : Enable Remote Desktop Connections by GPO

As the number of servers you administer growth you have to automate some administration action that you should perform each time you have a new server on your domain.
To enable automatically the remote desktop connections on any server you add to your domain you have just to create a new GPO and relate it to your servers organizational unit.


  • Create a new Group Policy Object and Edit it 
  • Expand  Computer Configuration ==> Administrative Templates ==> Network ==> Network Connections ==> Windows Firewall ==> Domain Profile 
  • Enable the rule Windows Firewall : Allow inbound Remote Desktop exception
  • Expand  Computer Configuration ==> Administrative Templates ==> Windows Components   ==> Remote Desktop Services ==> Remote Desktop Session Host ==> Connections 


  • Enable the setting Allow users to connect remotely by using Remote Desktop Services
  • Link the new GPO created to your servers Organizational Unit



Update the GPO configuration of your servers and all administrators accounts will be authorized to open remote session on the servers.