How to Set Compatibility Level for SQL Server 2008 or 2005 Database Cum se setează nivelul de compatibilitate pentru SQL Server 2008 sau 2005 Baza de date

When selecting data or performing query on Microosft SQL Server 2008 or SQL Server 2005 database, the following error message or failure may be returned: La selectarea de date sau de performanţă pe Microosft interogare SQL Server 2008 sau SQL Server 2005 de baze de date, următorul mesaj de eroare sau eşecul poate fi returnate:

[Microsoft][ODBC SQL Server Driver][SQL Server][Msg 4147, Level 15, State 1, Line 4] The query uses non-ANSI outer join operators (”*=” or “=*”). [Microsoft] [ODBC SQL Server Driver] [SQL Server] [Msg 4147, Level 15, State 1, Line 4] Interogarea utilizează non-ANSI exterior alătura operatorii ("*=" sau "=*"). To run this query without modification, please set the compatibility level for current database to 80, using the SET COMPATIBILITY_LEVEL option of ALTER DATABASE. Pentru a rula această interogare fără modificări, vă rugăm să setaţi nivelul de compatibilitate pentru curent la 80 de baze de date, folosind opţiunea de a COMPATIBILITY_LEVEL SET ALTER baza de date. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Este recomandat să rescrie de interogare folosind ANSI exterior alătura operatori (stânga ALaTURAtI exterior, nu ALaTURAtI exterior). In the future versions In versiunile viitoare
of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. de SQL Server, non-ANSI alătura operatori nu va fi susţinut, chiar şi în înapoi-moduri de compatibilitate.


or, sau,

Msg 4147, Level 15, State 1, Line 3 Msg 4147, Level 15, State 1, Line 3
The query uses non-ANSI outer join operators (”*=” or “=*”). Interogarea utilizează non-ANSI exterior alătura operatorii ("*=" sau "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Pentru a rula această interogare fără modificări, vă rugăm să setaţi nivelul de compatibilitate pentru curent de baze de date la 80 sau mai mic, folosind procedura sp_dbcmptlevel stocate. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Este recomandat să rescrie de interogare folosind ANSI exterior alătura operatori (stânga ALaTURAtI exterior, nu ALaTURAtI exterior). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. In versiunile viitoare ale SQL Server, non-ANSI alătura operatori nu va fi susţinut, chiar şi în înapoi-moduri de compatibilitate.

The error happens because Microsoft has dropped support for and eliminated old-style *= and =* outer join operators. Eroarea se întâmplă, deoarece Microsoft a renuntat la suportul pentru eliminate şi vechi în stil *= şi =* exterior alătura operatori.

In order to fix the SQL Server error above, DB administrator has to set the database compatibility level to 80, which equivalent with SQL Server 2000 as a temporary workaround. Pentru a stabili SQL Server de eroare de mai sus, a DB administrator de baze de date pentru a stabili compatibilitatea la nivel de 80, care echivalente cu SQL Server 2000 ca o soluţie temporară. Of course, the best solution is to modify the SQL statements or queries code to remove the old-style join operators with current standard SQL join syntax. Desigur, cea mai bună soluţie este de a modifica SQL declaraţii sau cereri de cod pentru a elimina vechi stil alătura operatorilor cu standardul actual de SQL syntax alăture.

For example, SQL query below is not valid: De exemplu, interogare SQL de mai jos nu este valabil:

SELECT o.name FROM sys.objects o, sys.views v WHERE o.object_id *= v.object_id;

And should be replaced with the following code: Şi ar trebui să fie înlocuit cu următorul cod:

SELECT o.name FROM sys.objects o LEFT JOIN sys.views v ON o.object_id = v.object_id;

Or the following abbreviated inner join statement: Sau următoarele abreviat interior se alăture declaraţie:

SELECT o.name FROM sys.objects o, sys.views v WHERE o.object_id = v.object_id;

For administrator who can't change the code, the easiest workaround is to revert the compatibility level of the database in order to provide the backward compatibility to old-style joins. Pentru administrator care nu se pot schimba codul, cea mai uşoară soluţie este de a reveni la nivelul de compatibilitate de la baza de date, pentru a dispune de compatibilitate pentru a se alătură în stil vechi. sp_dbcmptlevel stored procedures (deprecated) or Transact-SQL can be used to set certain (partially, not all) database behaviors to be compatible with the earlier version of SQL Server. sp_dbcmptlevel procedurilor stocate (deprecated) sau la învoială-SQL poate fi utilizat pentru a stabili anumite (parţial, nu toate) comportamentele de baze de date pentru a fi compatibile cu versiunea anterioară a SQL Server. This Acesta MSDN article MSDN articol provides overview on what behaviors are changed on each compatibility level. prevede de ansamblu asupra a ceea ce comportamente sunt modificate pe fiecare nivel de compatibilitate.

Version of SQL Server that can be reverted to can be one of the following: Versiune de SQL Server, care poate fi revenit pentru a putea fi unul din urmatoarele:

60 = SQL Server 6.0 60 = SQL Server 6.0
65 = SQL Server 6.5 65 = SQL Server 6.5
70 = SQL Server 7.0 70 = SQL Server 7.0
80 = SQL Server 2000 80 = SQL Server 2000
90 = SQL Server 2005 90 = SQL Server 2005
100 = SQL Server 2008 100 = SQL Server 2008

Note: Compatibility level 60, 65, and 70 no longer available in SQL Server 2008. Notă: nivelul de compatibilitate 60, 65, şi 70 nu mai sunt disponibile în SQL Server 2008. And future version of SQL Server will support only two (2) prior version of backward compatibility. Şi viitoare versiune de SQL Server va sprijini numai două (2) înainte de versiunea de compatibilitate. A database containing an indexed view cannot be changed to a compatibility level lower than 80. O bază de date care conţine o indexate vedere nu poate fi schimbat la un nivel mai mic de compatibilitate 80. Do also take note that when a database is set to backward-compatibility mode, some of the new functionalities may be lost, such as SQL CLR support and SSMS diagrams for the database. Face de asemenea, să ia act de faptul că, atunci când o bază de date este setată la înapoi-modul de compatibilitate, unele dintre noi funcţionalităţi pot fi pierdut, cum ar fi SQL CLR SSMS scheme de sprijin şi pentru baza de date. Beside, the compatibility mode affects behaviors only for the specified database, not for the entire server. În afară, în modul de compatibilitate afectează comportamentele specificate doar pentru baza de date, nu pentru întreaga server.

Steps to Change and Set Compatibility Level of A Database in SQL Server Paşi pentru Schimbare şi la nivel de set de compatibilitate a unei baze de date în SQL Server

The following SQL commands can be issued in SQL Server Management Studio Query window. Următoarele comenzi SQL pot fi emise în SQL Server Management Studio Interogare fereastra. Remember to execute Go after each command. Amintiţi-vă pentru a executa Du-te după fiecare comandă.

  1. Optional: Set the database to single user access mode: Optional: set de baza de date pentru a singur utilizator Mod de acces:

    ALTER DATABASE database_name SET SINGLE_USER;

  2. Set the database compatibility level to one of the earlier version stated above: Setare baza de date la un nivel de compatibilitate de versiunea anterioară a declarat de mai sus:

    Transact-SQL Method Învoială-SQL Metoda

    ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = { 80 | 90 | 100 }

    For example, De exemplu,

    ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 80 ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 80

    sp_dbcmptlevel Stored Procedure Method sp_dbcmptlevel stocate procedură Metoda

    EXEC sp_dbcmptlevel database_name, compatibility_level value;

    For example, De exemplu,

    EXEC sp_dbcmptlevel my_db, 90; Exec sp_dbcmptlevel my_db, 90;

  3. Optional: Put back the database in multiuser access mode: Optional: Puneţi înapoi în baza de date multiuser Mod de acces:

    ALTER DATABASE database_name SET MULTI_USER;

IMPORTANT : The page is machine translated and provided "as is" without warranty. IMPORTANT: pagina este masina de tradus şi "ca atare", fără garanţie. Machine translation may be difficult to understand. Machine traducere poate fi dificil de înţeles. Please refer to Vă rugăm să original English article original English articol whenever possible. ori de câte ori este posibil.


Leave a Reply Plecare un Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Puteţi folosi aceste tag-uri: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Aboneaza-te la comentarii facilitate a fost dezactivat. To receive notification of latest comments posted, subscribe to Pentru a primi notificarea din ultimele comentarii postate, abonaţi la My Digital Life Comments RSS feed Meu Digital Viaţă Comentarii RSS feed or sau register to receive registru de a primi new comments in daily email digest. noi comentarii la e-mail zilnic digest.
Custom Search

New Articles Articole noi

Incoming Search Terms for the Article Incoming termenii de căutare pentru a articolului

The query uses non-ANSI outer join operators ("*=" or "=*"). Interogarea utilizează non-ANSI exterior alătura operatorii ("*=" sau "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Pentru a rula această interogare fără modificări, vă rugăm să setaţi nivelul de compatibilitate pentru curent de baze de date la 80 sau mai mic, folosind procedura sp_dbcmptlevel stocate. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Este recomandat să rescrie de interogare folosind ANSI exterior alătura operatori (stânga ALaTURAtI exterior, nu ALaTURAtI exterior). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. In versiunile viitoare ale SQL Server, non-ANSI alătura operatori nu va fi susţinut, chiar şi în înapoi-moduri de compatibilitate. - -- sql server compatibility level SQL Server nivelul de compatibilitate - -- sql 2005 compatibility mode SQL 2005 modul de compatibilitate - -- sql server compatibility levels SQL Server compatibilitatea niveluri - -- sql server 2008 compatibility mode SQL Server 2008 modul de compatibilitate - -- sql compatibility mode sql modul de compatibilitate - -- check compatibility level in sql server 2008 verifica nivelul de compatibilitate în SQL Server 2008 - -- sql serveer 2005 SET COMPATIBILITY_LEVEL sql serveer 2005 SET COMPATIBILITY_LEVEL - -- how to set Cum se setează - -- SET COMPATIBILITY_LEVEL SET COMPATIBILITY_LEVEL - -- SQLSERVER compatibility level SQLServer nivelul de compatibilitate - -- SQL compatibility level SQL nivel de compatibilitate - -- how to set compatibility level 80 of sql server 2005 Cum se setează nivelul de compatibilitate 80 din SQL Server 2005 - -- sql 2000 2005 select compatibility SQL 2000 2005 selecta compatibilitate - -- compatibility level sql server compatibilitate nivel SQL Server - -- please set the compatibility level for current database to 80,using the set compatibility_level option of alter database. vă rugăm să setaţi nivelul de compatibilitate pentru curent la 80 de baze de date, utilizând setul compatibility_level opţiunea de a modifica baza de date. - -- set sql server 2008 to 80 set SQL Server 2008 - 80 - -- sql server 2008 compatibility SQL Server 2008 compatibilitate - -- non-ANSI outer join operators ("*=" or "=*"). non-ANSI exterior alătura operatorii ("*=" sau "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower Pentru a rula această interogare fără modificări, vă rugăm să setaţi nivelul de compatibilitate pentru curent de baze de date la 80 sau mai mic - -- changing compatibility level in sql 2008 from 2000 schimbare la nivel de compatibilitate sql 2008 din 2000 - -- setting sql compatibility sql setarea de compatibilitate - -- set compatibility level using sp_dbcmptlevel seta nivelul de compatibilitate cu ajutorul sp_dbcmptlevel - -- non-ansi outer join operators and database compatibility non-ANSI exterior se alăture şi operatori de baze de date de compatibilitate - -- set compatibility to 80 on sql server 2008 stabilit la 80 de compatibilitate pe SQL Server 2008 - -- sql 2008 6.5 compatibility mode SQL 2008 6,5 modul de compatibilitate - -- The query uses non-ANSI outer join operators ("*=" or "=*"). Interogarea utilizează non-ANSI exterior alătura operatorii ("*=" sau "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Pentru a rula această interogare fără modificări, vă rugăm să setaţi nivelul de compatibilitate pentru curent de baze de date la 80 sau mai mic, folosind procedura sp_dbcmptlevel stocate. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Este recomandat să rescrie de interogare folosind ANSI exterior alătura operatori (stânga ALaTURAtI exterior, nu ALaTURAtI exterior). - -- compatibility level sqlserver nivelul de compatibilitate SQLServer - -- cpmpatibility level sql 2005 lower 80 cpmpatibility nivel SQL 2005 mai mici 80 - -- "sql server 2008" compatibility transact sql "SQL Server 2008" compatibilitate învoială sql - -- SQL Server 2008 database in compatibility mode 90 SQL Server 2008 bază de date în modul de compatibilitate 90 - -- compatibility setting for SQL SERVER 2008 setarea de compatibilitate pentru SQL Server 2008 - -- compatibility mode is set to 90. modul de compatibilitate este setat la 90. JOIN USING ALaTURAtI UTILIZAREA - -- how to set sql 2005 compatibility mode Cum se setează sql 2005 modul de compatibilitate - -- level sql server nivel de SQL Server - -- Running 2008 SQL Server Databases in 2005 mode Rularea 2008 Baze de date SQL Server, în 2005, Mod de - -- set sql server multi user mode SQL Server set multi Mod de utilizator - -- sql 2005 set SQL 2005 set - -- sql server ansi compatibility SQL Server ANSI compatibilitate - -- sql set compatibility mode sql stabilit modul de compatibilitate - -- sql server 2005 + windows 2008 server + compatibility SQL Server 2005 + Windows 2008 server + compatibilitate - -- sql 2008 compatibility mode 2005 sql 2008 modul de compatibilitate 2005 - -- windows server 2008 + vs 2005 + compatibility Windows Server 2008 + vs 2005 + compatibilitate - -- "Setting database option COMPATIBILITY_LEVEL to 100" "Configurarea bazei de date opţiune COMPATIBILITY_LEVEL la 100" - -- 2005 SQL to 2008 SQL database compatibility SQL 2005 la 2008 de baze de date SQL compatibilitate - -- change compatibility mode is set to 90. schimba modul de compatibilitate este setat la 90. - -- compatibility level sql 2005 compatibilitate nivel SQL 2005 - -- Compatibility mode of SQL database Modul de compatibilitate de bază de date SQL - -- compatibility mode for the database from 90 (sql 2005) to 100 (sql 2008). modul de compatibilitate pentru baza de date de la 90 (SQL 2005) la 100 (SQL 2008). - -- how to set the compatibility level 80 to sql server cum pentru a seta nivelul de 80 la compatibilitatea SQL Server - -- microsoft sql 2005 compatibility with server 2008 Microsoft SQL 2005 compatibilitatea cu server 2008 - --