Search code examples
sql-serversmo

SMO and Sql Server 7.0


Does anyone have a definitive answer to whether Sql Server Management Objects is compatible with Sql Server 7.0? The docs state:

Because SMO is compatible with SQL Server version 7.0, SQL Server 2000, SQL Server 2005, and SQL Server 2008, you easily manage a multi-version environment.

But trying to connect to a Sql 7 instance gets me:

"This SQL Server version (7.0) is not supported."

Has anyone been successful in getting these 2 to play nice?


Solution

  • you can use SMO to connect to SQL Server versions 7, 2000, and 2005, but SMO does not support databases set to compatibility levels 60, 65, and 70.

    for SQL Server 7.0 the compatibility level is 70

    Obviously this is conflicting information...I assume if your compatibility level of your DB is 70 you can not connect.

    To check run: EXEC sp_dbcmptlevel 'databasename'

    Looking through this link, it seems you might be able to change the compatibility level by running this:

    EXEC sp_dbcmptlevel 'databasename', 80

    Obviously make a back up before changing anything.