Sunday, July 22, 2012

Adding a 'self' linked SQL Server (SQL Server R2)

To mimic a multi-SQL Server environment of one of our clients on a single server, I needed to link the SQL Server to itself. If found several suggestions by googling it, but only this one worked for me:

EXEC sp_addlinkedserver @server='alias', --the name of the linked server
                                             @srvproduct='',
                                             @provider='SQLNCLI',
                                             @datasrc='.',--the data source
                                             @provstr='Integrated Security=SSPI';

The other suggestions I found, used the same approach, but with a different provider. SQLNCLI worked for me.

Friday, July 13, 2012

Missing intellisense for aspx / masterpages in Visual Studio 2010 / SharePoint 2010 Projects

I've been working recently on a SharePoint 2010 project that I inherited from a colleague, and some of the aspx pages and the .master page did not have any intellisense, which was pretty annoying.

I've found this blogpost from Sanna Pehkonen, which states to simply open the page using the 'View Markup' option in the solution explorer (right click). And behold... intellisense is working again.