This is a list of SQL Server/IT events that I am speaking at or volunteering.

Upcoming Events :

Voices from the past :

  1. You are a rock star Sanil!!! Geez, how am I suppose to keep up with you now?! I LOVE the website!!!

  2. Thanks Kim, you are too kind !

  3. Hey Sanil, created a Database project in VS 2010 for a current database. Imported all the schema files. All the schema objects appear in their proper place in the Schema View & the project built successfully, but the Create Unit Tests menu option is grayed out for all the stored procedures. Also, there is a yellow triangle on the stored procedure icons, as well. Why is the project not allowing the creation of unit tests?

    btw, followed the walkthrough ( examples prior to creating the project above, & the Create Unit Tests menu option was NOT grayed out; so, not sure why its was grayed out on the above project.



  4. I’m using is VSTS 2010 Ultimate.

    As mention in the October 28, 2013 at 9:21 pm post, the “Create Unit Tests” menu option was NOT grayed out while doing the “Walk Through” tutorial, it was only unavailable for a “real” development project.

    After a bit of editing, found that the database name had to be removed the FROM clause for the “Create Unit Tests” menu option to become functional; e.g. is will NOT work in a statement like this one:
    SELECT * FROM [database].[schema].[table]

    In order for the “Create Unit Tests” menu option to become functional, the query must be written as:
    SELECT * FROM [schema].[table]

    The same issue applies to the use of the [database]. prefix in any kind of JOIN.

    Also, found that the “Create Unit Tests” menu option is not available if a stored procedure contains Dynamic SQL.

    Are there configuration options to allow for using the [database]. prefix & use of Dynamic SQL?

    BTW, also using VSTS 2012 Ultimate, but it does seem to have the Unit Test feature. Does unit testing work on VSTS 2012 Ultimate?



    • Hi Ken,

      Unit Test feature is definitely available in VSTS2012 Ultimate edition, I used the same for my demos. Its difficult to troubleshoot without seeing your screen as to why the “create Unit Tests” option became grayed out for you. However, there are other ways to create a unit test as well. You can simply create a new unit test project for your solution, then simply “add new unit test” which will create an empty test. You could possibly use sqlcmd variables for the [database].prefix , but I haven’t tried it out yet.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: