Change Compitibility Level

  • Hai All,

    I unable to change the compitibility level from 80 to 90 in SQL SERVER 2005., in my database its default compitibility level is 80.

    I write the below query in query analyzer.

    ALTER DATABASE PUBS SET COMPATIBILITY_LEVEL, 90

    Error: Incorrect syntax near 'COMPATIBILITY_LEVEL'

    EXEC sp_dbcmptlevel PUBS, 90

    Error: Usage: sp_dbcmptlevel [dbname [, compatibilitylevel]]

    Valid values of database compatibility level are 60, 65, 70, or 80.

    So please anybody help me......

    Thanks &Regards

    Mansoor

    ----------------------------------------------------------------------------------------------------
    Mistakes are common.....and i am not an exception....
    catch me if i am wrong....

    MAK.................!

  • Use sp_dbcmptlevel

    EXEC dbo.sp_dbcmptlevel @dbname=N'PUBS', @new_cmptlevel=90

    [font="Comic Sans MS"]+++BLADE+++[/font]:cool:

  • Sorry..............the reply above was totally by mistake

    [font="Comic Sans MS"]+++BLADE+++[/font]:cool:

  • Are you sure that you are on SQL 2005? Are you trying to change this in SQL 2000 by any chance?

  • OH thats correct krishna............i'm also having a doubt whether he is trying to do it on sql2000

    [font="Comic Sans MS"]+++BLADE+++[/font]:cool:

  • And the error resembles so

    [font="Comic Sans MS"]+++BLADE+++[/font]:cool:

  • Dear All,

    Thanks for giving response.

    I am sure that i m using SQL SERVER 2005, and i tryed to executed the scripts also in SQL SERVER 2005.

    Ref: You can see the below attachments..

    Thanks &Regards

    Mansoor

    ----------------------------------------------------------------------------------------------------
    Mistakes are common.....and i am not an exception....
    catch me if i am wrong....

    MAK.................!

  • Mansoor (5/8/2009)


    Dear All,

    Thanks for giving response.

    I am sure that i m using SQL SERVER 2005, and i tryed to executed the scripts also in SQL SERVER 2005.

    Ref: You can see the below attachments..

    Thanks &Regards

    Mansoor

    Hi Mansoor,

    According to the attachment (second one) you are using SSMS but connected to SQL Server 2000.

    Notice the server name in the bottom "XNSSRVRIS002 (8.0 SP3)".

    8.0 means SQL Server 2000.

    Regards,

    Suresh

  • Actually the BMP files don’t prove that it is SQL Server 2005. We can see that the client tool is SQL Server Management studio, but that doesn’t prove that the server is also SQL Server 2005 (you can use SSMS to connect to SQL Server 2000). According to the error that you get it does seem that the server is SQL Server 2000 and not SQL Server 2005. Can you run select @@version to see for sure the server’s version?

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Mansoor,

    The database you are tying to connect in an sql2000 DB server.......Then how can you change the compatibility level to 90........

    For your clarification use this ........."select @@version"

    [font="Comic Sans MS"]+++BLADE+++[/font]:cool:

  • There is atually an easy way to resolve this in SMS the user can go the databases section right click on Pubs and go to properties, then options and change the compatibility level there. I have Northwind it was 80 and I just go to options and change it to 90.

    Kind regards,
    Gift Peddie

  • Dear Blade

    Thanks for giving reply.once i check select @@version its showing sql2000 server.

    Can we change the database PUBS from Sql2000 to sql2005.then how ?

    +++Mansoor +++

    ----------------------------------------------------------------------------------------------------
    Mistakes are common.....and i am not an exception....
    catch me if i am wrong....

    MAK.................!

  • Mansoor (5/10/2009)


    i check select @@version its showing sql2000 server.

    Can we change the database PUBS from Sql2000 to sql2005.then how ?

    No. Not without upgrading to SQL Server 2005.

  • Blade you the man. Tried to do an ad hoc update which is not allowed without a single mode Séance which can't be done.

    I had to change like 50 of these on an instance I'm upgrading then you came along.

    select 'EXEC dbo.sp_dbcmptlevel @dbname=N''' +name + ''', @new_cmptlevel=100'

    from master..sysdatabases

    where cmptlevel = 80

  • Hi

    You All,

    Why you are not using the SSMS as Gift Peddie said. Its Easy.

    Ali
    MCTS SQL Server2k8

Viewing 15 posts - 1 through 15 (of 15 total)

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