SSMS getting confused

  • I have a SQL Server 2008 table with a couple of Date columns. If I right click, script table as create, I get:

    "...

    Column Begin_Date in object PQM_Data contains type Date, which is not supported in the target server version, SQL Server 2005. (Microsoft.SqlServer.Smo)

    ...

    "

    I'm on SQL Server 2008 R2 (build 10.50.2500.0 to be exact). I do still have 2005 on my machine as we have some legacy systems.

    If I do the same operation on my SQL Server 2008 DEV server, I don't get the error. Just my local machine.

    Anyone else seen this? Know of a fix? (Will uninstalling 2005 fix it?)

  • I may be wrong, but it looks like when you are scripting from your local system that it may be defaulting to generating scripts that are targeted for SQL Server 2005. If you are scripting a database that uses SQL Server 2008 features, I could see you getting an error message like that.

    Have you checked to see what defaults may be set?

  • I think Lynn nailed it; In SSMs if you go to Tools>>Options

    then expand SQL Server Object Explorer and select "Scripting", a form opens, and one of the options is "Script for server version" and it probably says "SQL Server 2005"

    change it and i think you'll be back in business.

    my screenshot below doesn't shot that specific option, but it helps visualize it:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Yup, that did it.

    Now why in the world would they do something like that...

    Oy.

  • Pam Brisjar (4/26/2012)


    Yup, that did it.

    Now why in the world would they do something like that...

    Oy.

    Maybe you upgraded instead of a fresh install?Just shooting in the dark...

    Jared
    CE - Microsoft

  • I have a side by side install (2005 and 2008) as noted above. But yeah, I suspect it felt it was "helping" me as I had 2005 installed.

  • Pam Brisjar (4/26/2012)


    I have a side by side install (2005 and 2008) as noted above. But yeah, I suspect it felt it was "helping" me as I had 2005 installed.

    Just so I am clear (obviously the issue is fixed, so not a big issue), but is the 2008 install on the machine you are using SSMS on? If so, are you sure you are opening SSMS from the 2008 folder and not the 2005?

    Jared
    CE - Microsoft

  • SQLKnowItAll (4/26/2012)


    Pam Brisjar (4/26/2012)


    I have a side by side install (2005 and 2008) as noted above. But yeah, I suspect it felt it was "helping" me as I had 2005 installed.

    Just so I am clear (obviously the issue is fixed, so not a big issue), but is the 2008 install on the machine you are using SSMS on? If so, are you sure you are opening SSMS from the 2008 folder and not the 2005?

    I have both 2005 and 2008 SSMS installed on my machine. I am opening up 2008 - verified right before I posted (is how I got the build version).

  • Pam Brisjar (4/26/2012)


    SQLKnowItAll (4/26/2012)


    Pam Brisjar (4/26/2012)


    I have a side by side install (2005 and 2008) as noted above. But yeah, I suspect it felt it was "helping" me as I had 2005 installed.

    Just so I am clear (obviously the issue is fixed, so not a big issue), but is the 2008 install on the machine you are using SSMS on? If so, are you sure you are opening SSMS from the 2008 folder and not the 2005?

    I have both 2005 and 2008 SSMS installed on my machine. I am opening up 2008 - verified right before I posted (is how I got the build version).

    Awesome, thanks! My "shot in the dark" here is that 2005 was installed first and that when SSMS "configures environment for first time use" it imported the settings from the previous version. Thoughts?

    Jared
    CE - Microsoft

  • hmm...yes...could be...that's very logical Jared.

    A very good shot in the dark. 🙂

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply