Totzkeeeeee's Blog

Just because I can...

  Home  |   Contact  |   Syndication    |   Login
  216 Posts | 4 Stories | 345 Comments | 321 Trackbacks


My blog is worth $14,678.04.
How much is your blog worth?

Tag Cloud


Post Categories

Blog Roll

Cool Sites

Here are some notes about my experience when testing an upgrade to the general distribution release of the Database Edition.

I installed the latest version of the VSTS Database Edition (GDR) on my laptop and loaded up a copy of the a database project.

Everything converts pretty much ok with the only issue being unresolved cross-database references.  DBPro is now model-based and as such does not require SQL Server to be installed locally.  This also allows them to have project references to other databases as well as linked server references.  This enables far more rigorous checking and enforcement of object references.  Also, there are some objects (i.e. logins) that are now treated as server level objects and should be moved into a project based on the new server project type that is then referenced in your database project.

Currently there are numerous warnings in this database project about unresolved references which do not stop the build or the deployment.  These warnings are now considered errors (TSD03006 specifically) and prevent the project from building or deploying.  This issue can be addressed in one of two ways; using either database project references or database schema file references.

We can create a new database project for each external database and import its schema.  We would then create a reference in our database project to that project.  This gives us extra projects to be concerned with.  This approach is generally used when the external databases are likely to be modified in future and you would do so using these new projects.

Using a database schema file still requires us to create a database project and import the schema.  Building the database then produces a .dbschema file.  Once we have that file, we can abandon the database project.   We can add the .dbschema file to our database project and reference it there.  We would do the same for any other external databases.  We can include these files in source control as well.  We can then edit these files should the other databases change or simply replace their contents with new versions of them.

Once we have these database references we will need to fix up places in the SQL that are currently giving us trouble.  Building the project right now gives a LOT of errors.  Roughly 300 of them.  Fortunately, a lot of them can be fixed by simply fixing up the table reference in the select statement because an error is generated for every column in that SELECT.  If 10 columns are selected then you get 10 errors.  Qualifying the table reference fixes all 10 at a go so it's not that bad really.

Further, we will need to change code that does a SELECT INTO a temporary table to define the temporary table with a CREATE TABLE statement and then do an INSERT.  This way DB Edition can also resolve these references at compile time.

I did a test with one of the external databases using by this application by creating a schema file and then referencing it.  It works very well.

I really believe that folks should bite the bullet now and get this done.  The GDR is the current shipping version of the product and contains bug fixes in other areas as well as new tools and functionality.  Any future service packs will target this edition.  An additional benefit of doing this is that you will know at build time if everything is going to work.  (well, at least find all the objects it needs) Right now, you can't be sure until you actually execute some things.

Just because I can…

Technorati Tags:
posted on Tuesday, March 31, 2009 5:08 PM