Email Article To a Friend View Printable Version

Suppressing Warnings in Data Dude

VSTS for Database Professionals

I've been working on migrating existing SQL Server database projects into Visual Studio for Database Professional projects. Most of the existing databases have imported without major problems, but there are a few that have warnings about cross-database joins in old unit tests.

TSD3025: The following cross-database dependencies could not be verified: ... Your database application might fail at runtime when ... is executed.

If you are tired of being warned about a known issue, Data Dude allows you to suppress warnings, in the database project's build properties (Project -> Properties -> Build tab -> Suppress Warnings).

Simply put the warning numbers you want to ignore in there (without "TSD" at the front) and save. Separate numbers with a semi colon (" ; ").

For a complete list of the errors in Data Dude, see Gert's page.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz




Email Article To a Friend View Printable Version

What with this database called [$(DatabaseName)] ?

VSTS for Database Professionals

I just handed a work mate an output script from DataDude, which he ran in Management Studio. Instead of producing the expected database he ended up with one called $(DatabaseName)

Remember database pro uses SQLCMD to deploy databases

If you use Management Studio to run an output script, you'll need to swap into SQLCMD mode through the Query -> SQLCMD Mode menu. Or click the red exclaimation icon in your toolbar



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

Tip: Use Named Parameters with Stored Procedures when Unit Testing (VSTS Database Professionals)

VSTS for Database Professionals

I've been migrating unit tests to a new Visual Studio Database Professionals project. So far there's been no problems (other than trying to find a naming standard). This problem had me scratching my head for a few minutes today.

I defined a unit test for a stored procedure as:

DECLARE @ItemCode varchar(32),
@PriceLevel varchar(32)

SELECT TOP 1
@ItemCode = ItemCode,
@PriceLevel = PriceLevel
FROM dbo.Price

EXEC dbo.GetItemPrice @ItemCode, @PriceLevel


Running the unit test was resulting in the error:

Error Message
Test method PricingTests.StoredProcedures.dbo_GetItemPrice threw exception: System.Data.SqlClient.SqlException: Procedure or Function 'GetItemPrice' expects parameter '@PriceLevel', which was not supplied..

Debug Trace
Execution test script...
Sql Error: 'Procedure or Function 'GetItemPrice' expects parameter '@PriceLevel', which was not supplied.' (Severity 16, State 4).

Huh? I checked the SQL code twice. Yup, @PriceLevel is passed in as the second parameter. What's up?

So I checked the original code of the sproc:

CREATE PROCEDURE dbo.GetItemPrice
@ItemCode varchar(32),
@Area varchar(64) = NULL,
@PriceLevel varchar(32)
...

Ahhhh.... The parameters are defined in a different order. Time to swap from positional parameters to named parameters to ensure values are passed into the correct parameter

The correct way to call a stored procedure is using named parameters:

EXEC dbo.GetItemPrice @ItemCode = @ItemCode, @PriceLevel = @PriceLevel



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

Wait Data Professionals! Don't Test Your Database!

VSTS for Database Professionals

Michael Hunter (a.k.a The Braidy Tester) has posted another useful article posing the question: "Do you even need to test your product?"

After covering The Five Easy Steps of Unit Testing for Database Professionals its interesting to see some expanded ideas on why you might choose not to test an application. Some of these things are obvious. But with an over-eager developer/tester on the team, it could be easy to end up with a lot of unnecessary tests being made and run.

Remember to test the things that matter to customers/consumers of the app, and things that other apps are dependant on. Make sure you react to test results "otherwise it is entertainment" James Bullock says.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

The Five Easy Steps of Unit Testing for Database Professionals

VSTS for Database Professionals

Now that Microsoft have released Visual Studio Team Suite for Database Professionals (aka Data Dude) its time for SQL Server developers and dbas to learn more about Unit Testing.

There is many different methods to test a database within the framework set by Visual Studio. So how do you know which way is best?

Well one of the best books of unit testing I've read would be the Big Book of Testing by James Bullock which should take you all of ten minutes to read.

Before you get to stuck on how to test your database, read his book and learn what is worthwhile testing.

Thanks to "The Braidy Tester" for first pointing this out.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

Seeking Help: Sachin Rekhi's Database Unit Testing Whitepaper Draft

VSTS for Database Professionals

Sachin has just published a draft whitepaper on database unit testing using Team Edition for Database Professionals.

The whitepaper includes details steps on creating your first unit test; automatic test generation; the standard test conditions available; and even delves briefly into the C#/VB.Net code used by the testing framework.

I highly recommend users of Database Professionals (Data Dude) read this whitepaper.

You can download the draft directly. Make sure you give feedback about the draft as well!



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

"Team Suite" Required to Install Database Professionals Trial

VSTS for Database Professionals

There has been a lot of discussion in the forums about which track of Visual Studio is required for the new Database Professionals (Data Dude) Trial to install.

Database Professionals TRIAL requires Visual Studio 2005 Team Suite to be installed.

A Visual Studio Team Edition for Database Professionals will be available as a standalone product in 2007.

If you do not have Team Suite installed, you can download the 180 day trial.

If you already have Team Edition installed the installation will upgrade you to suite.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

ITS HERE!: Visual Studio Team Edition for Database Professionals (Data Dude) RTM Available now in MSDN Downloads

VSTS for Database Professionals
MSDN Downloads updated this morning with the release of Database Professional aka "Data Dude".

Download the 20MB trial from here which is really a full version if you have a full license of Team Suite already installed.

The development manager explains the difference between the full DVD download and the trial:

The full product download on MSDN is a full image only, so 2.9 GB or so, if you already own Visual Studio Team Suite, you can simply download the trial SKU (which is only 20MB) and install this on top of your Team Suite instance. The installer will detect that you have a full license instead of a trial license and do the right thing.


Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

Setting Schema Compare Options in VSTS for Database Professionals (DataDude)

VSTS for Database Professionals

Changing the comparison rules for the Schema Compare is not as obvious as it should be. You need to go into the Tools -> Options menu to make changes.

  1. Click on the Tools Menu -> Options
  2. Expand Database Tools in the tree
  3. Select Schema Compare.

I'm waiting to see if this has changed in v1.0, but I'd suggest that a button is added to the default Schema Compare toolbar.

The same problem exists for Setting Data Compare Options in VSTS for Database Professionals (DataDude).



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

Setting Data Compare Options in VSTS for Database Professionals (DataDude)

VSTS for Database Professionals

Changing the comparison rules for the Data Compare is not as obvious as it should be. You need to go into the Tools -> Options menu to make changes.

  1. Click on the Tools Menu -> Options
  2. Expand Database Tools in the tree
  3. Select Data Compare.

I'm waiting to see if this has changed in v1.0, but I'd suggest that a button is added to the default Data Compare toolbar.

The same problem exists for Setting Schema Compare Options in VSTS for Database Professionals (DataDude).



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz







Gold Coast Aquarium Maintenance | Gold Coast Marine Fish | Gold Coast Tropical Fish
Jewel Jones - Counselling Service - Penrith, Richmond
 
     
 Copyright © 2017 Julian Kuiters
 All trademarks and copyrights on this page are owned by their respective owners.