SQL Server Loopback Linked Server

Occasionally I run across companies that make use of linked servers. This can be a nasty little detail in a development environment to fully test database code. The solution is to create a loopback linked server so that code referencing a linked server will run as if it were running in the distributed production environment.

  1. Get a backup of the database on the other end of the linked server call.
  2. Restore the backup on your local SQL Server instance
  3. Run the code below to create the loopback linked server

EXEC sp_addlinkedserver @server = N’name_for_linked_server’,

@srvproduct = N’ ‘,

@provider = N’SQLNCLI’,

@datasrc = N’name_of_my_sqlserver_instance’,

@catalog = N’name_of_database’



BizTalk 2010 ESB 2.1 Portal Issue

Long live Google. I was having an issue with the ESB Portal (2.1) on a BizTalk 2010 machine. I found the fix at the following link.


I was seeing this error when I would attempt to navigate to the Registry tab of the ESB Portal.

Exception information:

Exception type: SqlException

Exception message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The 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: TCP Provider, error: 0 – No connection could be made because the target machine actively refused it.)

Request information:

Request URL: http://localhost/ESB.Portal/Lists/RegistrySummaryContainer.aspx

Request path: /ESB.Portal/Lists/RegistrySummaryContainer.aspx

The solution was to enabled TCPIP in the SQL Server Configuration Manager under SQL Server Network Configuration–>Protocols for MSSQLSERVER.

The same issue is addressed at this blog post and has an interesting comment.

I solved the problem the opposite way: I altered the connection string to remove “Network Library=dbmssocn”, thus eliminating the requirement to use TCP/IP.Richard

I did not try that solution, but it sounds plausible as well.

BizTalk Map Documenter for 2010

I have a project with BizTalk 2010 and really want to use the BizTalk Map Documenter for the maps. I pointed it to my maps and the output did not show the content from Constant Functoids or Links into Functoids.

I looked through the XSLT file and discovered a couple of tweaks that got it all working.

Basically, everywhere in the XSLT where it references “@Type = ‘Link'” or “@Type = ‘Constant'” had to be changed to “@Type = ‘link'” and “@Type = ‘constant'”.

XLST is a case-sensitive language. Apparently in BizTalk 2010 the Type for Links and Constants in the map-generated code has all lower-case “link” and “constant”.

Anyway, I am glad to have found an easy solution. It sure beats having to put all that documentation together by hand! There will be lots of maps by the end of this project, so I am happy to have an automated tool to create useful docs.