Monday, January 31, 2011

Fix: "Error occurred while configuring the connection uri. Invalid URI: The hostname could not be parsed."

While generating schemas using WCF-SQL Adapter wizard, following error occurs if server name and instance name are not provided separately in Server Name and Instance Name fields under Config Adapter\Uri Properties tab,

"Error occurred while configuring the connection uri. Invalid URI: The hostname could not be parsed."

HTH.

Wednesday, January 19, 2011

Tip: To find last updated timestamp of SQL Server objects

Recently, I was having a need to quickly find the recently deployed stored procedure between two SQL Servers. But I found that, only Created date property is available when I right clicked and looked at the properties of Stored procedure. We can get this information by querying for modify_date column in Sys.Objects system view (or object specific views like Sys.Procedures/Sys.Tables/Sys.Views etc.)

HTH.

Monday, January 17, 2011

Tip: How to add shortcut/hot key to open Source Control explorer in Visual Studio

Although we currently have various ways to open Source Control Explorer in Vistual Studio IDE, I though it would be nice to have a shortcut or hot key to open Source Control Explorer (as we access it frequently for various needs while working in team environment). We can seet that, View->Other Windows-> Source Control Explorer does not have any shortcut key associated with it like other options do. But VS team has not left us without options to add/update these shortcut keys at our will. Here is how we can add our own shortcut key to open Source Control Explorer,
  1. Navigate to Tools->Options->Environment->Keyboard
  2. Type view.tfssource in "show commands containing" criteria and we can see respective command listed in the results list 
  3. Place cursor in "Press shortcut keys" text box and type in the key that you like to use as shortcut (make sure that, you are providing a key which is not currently being used) and click on Assign and OK buttons.

Now we can directly open the Source control by hitting our custom shortcut key. We can follow similar steps to have our own custom shortcut keys for any feature that has an associated command.

HTH.

Thursday, January 6, 2011

TIp: related to adapters of BizTalk Adapter Pack

After installing the BizTalk Adapter Pack, we can see it listed in the programs list and bindings get listed when we choose WCF-Custom adapter type. But I recently realized that, we need to manually add each adapter of Adapter pack in order use directly instead of WCF-Custom adapter with respective binding type. Steef has explained these steps in detail nicely in this blog post. Although we could technically use both WCF-Custom and explicit WCF adapter, properties in the Configuration wizard of explicit WCF adapter provides more relevant properties for respective receive location or send port. One of the observations I had was, send port of WCF-Custom->sqlBinding  type shows polling properties which are applicable only for receive location and these are not shown if we use WCF-SQL adapter and also we get neat categorized view of properties with this. If there are any other major differences between WCF-Custom and explicit WCF adapter, please feel free to mention as comment to this post.

Also remember that, name of the adapter is not updatable once it is added and the work around to do this is to delete the adapter and add it again.

Thanks.