Apr 14, 2015

How to hard reset Visual Studio instance

When developing extensions sometimes you just mess up, others someone else does. If you start getting errors loading even the most mundane extensions, these are the instructions to hard reset your instance.
1. Close Visual Studio (if you haven’t already).
2. Open the registry editor (regedit.exe)
3. Delete the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}
4. Delete the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}_Config
5. Delete the %USERNAME%\AppData\Local\Microsoft\VisualStudio\{version} directory.
  • Enjoy your brand new Visual Studio instance.
Use {version}=10.0 for Visual Studio 2010
Use {version}=11.0 for Visual Studio 2012
Use {version}=12.0 for Visual Studio 2013
If on the other side you want to reset the experimental hive you can do the same to with the ‘{version}Exp’ ones.

(source: http://www.corvalius.com/site/hacks/how-to-hard-reset-visual-studio-instance/)

Apr 4, 2015

Connect to a SQL Server DB which is on a client Network while you are using your office PC

Trusted Authentication will use the credentials that you are logged into the machine with to try and connect, there’s not a way round this, if you want to use trusted authentication for management studio, you need to be logged on to your machine with an account that is allowed access to SQL, if not then you will have to use SQL authentication.

Try this: Use RUNAS to set your Windows Auth domain for database connections

runas /user:domain\user "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\ssmsee.exe"

runas /user:domain\user "C:\WINDOWS\system32\mmc.exe /s \'C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC\'"

runas /user:domain\user isqlw





Example:

runas /netonly /user:cricket\mdatta " C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe"

runas /netonly /user:cricket\mdatta isqlw