Just nu i M3-nätverket
Jump to content

7.0 i 6.5 mode?


Bo Anders Svensson

Recommended Posts

  • 2 months later...
Bo Anders Svensson

Jag förstår överhuvud taget inte ditt svar alls...

Troligen för att jag var otydlig i min fråga i första rummet, vi utvecklar:

 

Klienten (vår applikation som vi utvecklar) kommunicerar med en databas. I detta fallet version 6.5 av MS-SQL Server.

 

Kan man få version 7.0 av denna dbms att försättas i ett sådant läge att en klient upplever det, vid en db-uppkoppling mot en viss bestämd namngiven databas i servern, som om att den kommunicerar med en dbms av version 6.5?

 

 

../BAS

Link to comment
Share on other sites

Bo Anders Svensson

use master

select @@version

exec sp_help sp_dbcmptlevel

 

------

Microsoft SQL Server 6.50 - 6.50.281 (Intel X86)

Nov 4 1997 17:58:00

Copyright © 1988-1997 Microsoft Corporation

 

Msg 15009, Level 16, State 1

The object 'sp_dbcmptlevel' does not exist in database 'master'.

 

 

;-)

Link to comment
Share on other sites

Tomas Johansson

Nej jag förstår att du fick det felmeddelandet, jag tror knappast att det kommandot finns i SQL6.5.... Däremot finns kommandot i SQL7.0 och det var väl det du frågade om eller?

 

Utdrag ur Books On Line från SQL7.0

 

 

sp_dbcmptlevel (T-SQL)

Sets certain database behaviors to be compatible with the specified earlier version of Microsoft® SQL Server™.

 

Syntax

sp_dbcmptlevel [[@dbname =] name] [, [@new_cmptlevel =] version]

 

Arguments

[@dbname =] name

Is the name of the database whose compatibility level is to be changed. Database names must conform to the rules for identifiers. name is sysname, with a default of NULL.

[@new_cmptlevel =] version

Is the version of SQL Server with which the database is to be made compatible. version is tinyint, with a default of NULL. The value must be 70, 65, or 60.

Return Code Values

0 (success) or 1 (failure)

 

Result Sets

sp_dbcmptlevel returns this message if no parameters are specified or if the name parameter is not specified:

 

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

 

 

 

If name is specified with no version, SQL Server displays a message with the compatibility setting for the named database.

 

Executing sp_dbcmptlevel with the value 70 restores the level of functionality associated with SQL Server 7.0.

 

Remarks

Use sp_dbcmptlevel as an interim migration aid. If existing SQL Server version 6.x applications are affected by the differences in SQL Server version 7.0 behaviors controlled by the compatibility level setting of sp_dbcmptlevel, use this procedure to set the earlier version behaviors until the application can be converted to work properly with the SQL Server 7.0 compatibility level. sp_dbcmptlevel does not restore full backward compatibility.

 

sp_dbcmptlevel affects the behaviors in the specified database, not the entire server. The compatibility setting for a database takes effect when the database is made the current database with the USE statement, or if the database is the default database for the login. When a stored procedure is executed, the current compatibility level of the database in which the procedure is defined is used. All stored procedures in the database are recompiled when the compatibility setting is changed in that database.

 

Setting the compatibility level to 65 or 60 affects these behaviors. For more information about backward compatible behaviors, see SQL Server Backward Compatibility Details.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...