Is there a difference between (local), ‘.’ and localhost?

The final result is the same. The difference is: ‘localhost’ resolves at the TCP/IP level and is equivalent to the IP address 127.0.0.1 Depending on the application “(local)” could be just an alias for ‘localhost’. In SQLServer, ‘(local)’ and ‘.’ mean that the connection will be made using the named pipes (shared memory) protocol within … Read more

How to delete server entries in SQL Server Management Studio’s “Connect to Server” Screen? [duplicate]

Looks like this file is a binary serialized version of the Microsoft.SqlServer.Management.UserSettings.SqlStudio class defined in the Microsoft.SqlServer.Management.UserSettings, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 assembly (located at c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Microsoft.SqlServer.Management.UserSettings.dll). With a bit of development skill (Visual Studio or even Powershell) you can deserialize this file into the original class, find the entries you want to remove and … Read more

Is SQL Server Express good enough for a developer, or should they get Developer edition?

If you have access to it, you’re better off using Developer Edition because it supports more features and larger databases. For example, if you want to restore a 50gb database from your production server onto your workstation to do testing, you’ll need Developer Edition. Another example is if you’re working with Enterprise-only features like partitioning, … Read more

Refactoring ADO.NET – SqlTransaction vs. TransactionScope

You won’t immediately gain anything by switching your existing code to use TransactionScope. You should use it for future development because of the flexibility it provides. It will make it easier in the future to include things other than ADO.NET calls into a transaction. BTW, in your posted example, the SqlCommand instances should be in … Read more

Update XML node value in SQL Server

You can do something like this: UPDATE dbo.profiles SET ProfileXML.modify(‘replace value of (/ProblemProfile/GroupID/text())[1] with “0”‘) WHERE id = 23 Check out this article on SQL Server 2005 XQuery and XML-DML for more details on what you can do with the .modify keyword (insert, delete, replace etc.). Marc PS: In order to get the value, it … Read more

Best (easiest) way to make a SQL Server dump and import that dump in another SQL Server

An easy way would be to use SQL Server Management Studio, in the Object Explorer right click on the database you want to export, select Tasks -> Back Up, then select a destination and file name in the Destination box at the bottom of the dialog. You can play around with the various settings, but … Read more