Profile

Thursday, 23 May 2013

Find Server Name, Database name from Tables

When querying data from multiple database across multiple server, a simple two lines of SQL code can tell where the data comes from 

SELECT
@@servername,
DB_NAME() as 'Database name'

FROM dbo.tablename

Thursday, 16 May 2013

Microsoft Visual Studio 2010 Tools Box Empty and Recovery

It has been an known issue in the middle of debugging a SSIS package might cause Visual Studio to reset its Tools Box into empty.
It looks like you could right click the area and drag items back to the toolbox area. However most of the options are pointers and they are grey out.

You need to do something in order to cause Visual Studio to reset/rebuild the tool box into its default state. To do so you need to delete the backup entries files AND remove cache registry keys.

1. Close and exit Visual Studio 2010, using windows explorer go to "c:\Users\<your_user_name>\AppData\Local\Microsoft\VisualStudio\10.0" 

2. delete all *.TBD files

3. Click "Start", "Run" type REGEDIT to open registry editor. go to "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller_AssemblyFoldersExCache" 
and "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstallerCache"

4. Remove all sub keys as highlighted.

5. Open Visual Studio. open a project and wait for the Toolbox recover itself. then ready to use.
End