Specified cast is not valid.

ashawashaw Posts: 12
edited December 31, 2006 12:42PM in SQL Data Compare Previous Versions
I am getting an error: Specified cast is not valid when trying to view the tables and views within a database that I am trying to data compare against another database.

What might be the cause of this issue. I have Sql Profiled the calls made to the database and nothing there throws an error when I run it within Management Studio.

Sql Server 2005
SqlDataCompare 5.3.0.68

Comments

  • I also want to clarify... this is occuring when I am creating my project for comparison. It happens when I switch to the second tab to select views and tables. It also occurs if I fill out the server and login information and click Compare Now
  • Here is an image of what I'm experiancing

    sdc.png
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    Thanks for your post. This problem does come up occasionally and I have to apologize for the vagueness of the error message. What's happened is that SQL Data Compare's schema query had run successfully, but one or more of the fields in the results has come up as NULL when it normally wouldn't.

    In some cases in SQL 2005, it fixes the issue to use a SQL account with higher privileges. Rights to one of the schemas could have been denied to you. Failing that, there could be database corruption or a configuration problem. But please try registering the database as a SYSADMIN first and see if permissions are the problem.
  • Thanks Brian for your reply and your apology of the vagueness of the error message. I did talk to our DB admin and he assigned DBO to myself for the db in question and it did work after that.

    I also found a similar post in the Sql Compare forum as well... Maybe this could become a FAQ item?
  • That would not be a bad idea! SQL and Data Compare use the same logic to gather database schema, so it's not a surprise if it affects both products (and Packager, I'd imagine).
Sign In or Register to comment.