StrataFrame Forum

Incorrext syntax near 'sname'

http://forum.strataframe.net/Topic21695.aspx

By Tim Dol - 1/28/2009

I have a package file that I have deployed on 5 or 6 different databases without any problems, however I have two database where the attached error occurs and I can't figure out what the problem is.  Any earlier version of the package, a week ago, worked fine on these two databases and now the new one and the actual original pacakge that worked, has failed.

Any Ideas?  Can you suggest how I can narrow down the problem?

Thanks,

Tim

By Tim Dol - 1/28/2009

Some additional Info....

I traced the database migrator code and discovered the function causing the problem (GetListOfViewsSprocsAndUdfsToDrop).

See attached screen shot.

This is quite urgent so any help would be appreciated.

By Trent L. Taylor - 1/28/2009

Tim, it would be impossible for me to diagnose what yoy may be experiencing with this information.  I will need, at the veryleast, your PKG file so that I can deploy it here and see if it is reproducable.  If so, then I will be able to debug this and try and determine what you are running into.

Also, we are about to post a new beta that has full SQL Server 2008 support for the DDT as well as all other areas of the framework.  In the process of updating this, we moved to SMO 10 which required that we make a few modifications to the migrator class. 

Finally, the environment to which you are deploying can also make a difference.  If there is something with a pre-deployed database that is unexpected by SMO and the migrator class, then this could be a factor as well.  So let's start with a PKG file and go from there.

By Tim Dol - 1/28/2009

I will email you the database and package file shortly.

Thanks,

Tim

By Trent L. Taylor - 1/28/2009

For those wondering what happened here, the database was originally on SQL Server 2000.  It was then moved to SQL Server 2005, however, the server compatability wasn't changed.  Since the compatability level was left at 2000, yet it was being hosted in a 2005 server, the DDT attempted to execute the extended properties query for 2005 yet the database wouldn't support those queries since it was set to 2000 compatability.  To change this, just do the following:

  1. Right-click the pre-exiting database from with Sql Server Management Studio and then click properties
  2. Go to Options
  3. Set the Compatibility level to 2005