How to Set Compatibility Level for SQL Server 2008 or 2005 Database Kā Uzstādīt saderības līmeni SQL Server 2008 vai 2005 Database

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: Izvēloties datus vai veic query par Microosft SQL Server 2008 vai SQL Server 2005 datu bāzes, šādas kļūdas paziņojumu vai neveiksmes var ATGRIEZĀS

[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] [Ziņu 4147, Level 15, State 1, Line 4] vaicājumu izmanto ne-ANSI ārējā pievienoties uzņēmēju ("*=" vai "=*"). 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. Lai veiktu šo jautājumu, bez izmaiņām, lūdzu, iestatiet saderības līmeni pašreizējā datu bāzē līdz 80, izmantojot SET COMPATIBILITY_LEVEL iespēju ALTER datubāzē. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Ir stingri ieteicams pārrakstīt jautājumu, izmantojot ANSI ārējā pievienoties operatoriem (KREISAIS ĀRĒJAIS JOIN, tiesības ĀRĒJAIS JOIN). In the future versions Paredzams, ka turpmāk redakcijas
of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. no SQL Server, non-ANSI pievienoties operatoriem nebūs atbalstīja pat atpalikušajās saderību veidiem.


or, vai,

Msg 4147, Level 15, State 1, Line 3 Ziņu 4147, Level 15, State 1, Line 3
The query uses non-ANSI outer join operators (”*=” or “=*”). Vaicājuma izmanto ne-ANSI ārējā pievienoties uzņēmēju ("*=" vai "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Lai veiktu šo jautājumu, bez izmaiņām, lūdzu, iestatiet saderības līmeni pašreizējās datu bāzes uz 80 vai mazāka, izmantojot uzglabā procedūra sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Ir stingri ieteicams pārrakstīt jautājumu, izmantojot ANSI ārējā pievienoties operatoriem (KREISAIS ĀRĒJAIS JOIN, tiesības ĀRĒJAIS JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. Paredzams, ka turpmāk versijām SQL Server, non-ANSI pievienoties operatoriem nebūs atbalstīja pat atpalikušajās saderību veidiem.

The error happens because Microsoft has dropped support for and eliminated old-style *= and =* outer join operators. Kļūda notiek, tāpēc, ka Microsoft ir samazinājies atbalsts un jāizskauž vecmodīgās *= un =* ārējā pievienoties operatoriem.

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. Lai noteiktu SQL Server kļūda iepriekš, DB administrators ir noteikt datu bāzē savietojamības līmenis līdz 80, kas ekvivalents ar SQL Server 2000 kā pagaidu PROFILAKSE. 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. Protams, labākais risinājums ir pārveidot SQL paziņojumus vai vaicājumu kods, lai novērstu vecmodīgās pievienoties operatoriem ar pašreizējo standarta SQL pievienoties sintaksi.

For example, SQL query below is not valid: Tā, piemēram, SQL query zemāk nav spēkā:

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: Un būtu jāaizstāj ar šādu kodu:

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: Vai pēc saīsinātā iekšējās pievienoties paziņojums:

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. Par administratoru, kuri nevar mainīt kodu, vienkāršākais PROFILAKSE ir atgriezties saderību līmeņa datu bāzes, lai nodrošinātu atgriezenisku savietojamību ar vecmodīgās pievienojas. 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 uzglabā procedūras (nosodāms) vai darījumus-SQL var izmantot, lai noteiktus (daļēji, ne visas) datu bāzes uzvedību par saderīgu ar iepriekšējo versiju, SQL Server. This Šis MSDN article MSDN article provides overview on what behaviors are changed on each compatibility level. sniedz pārskatu par to, kas uzvedību tiek mainīti katru saderība līmenī.

Version of SQL Server that can be reverted to can be one of the following: Versija SQL Server, ko var atgriezta var būt viens no šiem:

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. Piezīme: Compatibility līmenis 60, 65, un 70 vairs nav pieejams SQL Server 2008. And future version of SQL Server will support only two (2) prior version of backward compatibility. Un turpmākās versijas SQL Server atbalstīs tikai divi (2) pirms versiju atgriezenisku savietojamību. A database containing an indexed view cannot be changed to a compatibility level lower than 80. Izveido datu bāzi, kurā ir indeksēti apskatīt nevar mainīt uz saderību zemākas par 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. Vai arī ņem vērā, ka tad, ja datu bāzē tiek noteikta, lai atpakaļ saderību režīmā, dažās no jaunajām funkcijām var zaudēt, kā, piemēram, SQL CLR atbalstu un SSMS diagrammas datu bāzē. Beside, the compatibility mode affects behaviors only for the specified database, not for the entire server. Blakus, saderības režīms ietekmē uzvedību tikai paredzētajiem datu bāzes, nevis par visu serveri.

Steps to Change and Set Compatibility Level of A Database in SQL Server Pasākumus, lai pārmaiņu un Set saderības pakāpe datu bāzei SQL Server

The following SQL commands can be issued in SQL Server Management Studio Query window. Turpmāk SQL komandas var izdot SQL Server Management Studio Query logā. Remember to execute Go after each command. Neaizmirstiet izpildīt Go pēc katras komandu.

  1. Optional: Set the database to single user access mode: Pēc izvēles: Set datubāzes vienu lietotāju piekļuves veids:

    ALTER DATABASE database_name SET SINGLE_USER;

  2. Set the database compatibility level to one of the earlier version stated above: Izveidot datu bāzi saderība līmenis uz vienu no agrākajām versija minēts iepriekš:

    Transact-SQL Method Darījumus-SQL metode

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

    For example, Piemēram,

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

    sp_dbcmptlevel Stored Procedure Method sp_dbcmptlevel Stored Procedure metode

    EXEC sp_dbcmptlevel database_name, compatibility_level value;

    For example, Piemēram,

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

  3. Optional: Put back the database in multiuser access mode: Pēc izvēles: Uzlieciet atpakaļ datu bāze multiuser piekļūt veids:

    ALTER DATABASE database_name SET MULTI_USER;

IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.


Leave a Reply Atstāj atbildi

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> Jūs varat izmantot šos tagus: <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. Parakstīties uz komentāriem iezīme ir atspējota. To receive notification of latest comments posted, subscribe to Lai saņemtu paziņojumu par jaunāko komentāri norīkots darbā, abonēt My Digital Life Comments RSS feed Mani Digital Life Comments RSS feed or vai register to receive reģistrēties, lai saņemtu new comments in daily email digest. jauni komentāri ikdienas e-pasta sagremot.
Custom Search

New Articles Jauns pants

Incoming Search Terms for the Article Incoming Meklēt Noteikumi par pants

The query uses non-ANSI outer join operators ("*=" or "=*"). Vaicājuma izmanto ne-ANSI ārējā pievienoties uzņēmēju ("*=" vai "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Lai veiktu šo jautājumu, bez izmaiņām, lūdzu, iestatiet saderības līmeni pašreizējās datu bāzes uz 80 vai mazāka, izmantojot uzglabā procedūra sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Ir stingri ieteicams pārrakstīt jautājumu, izmantojot ANSI ārējā pievienoties operatoriem (KREISAIS ĀRĒJAIS JOIN, tiesības ĀRĒJAIS JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. Paredzams, ka turpmāk versijām SQL Server, non-ANSI pievienoties operatoriem nebūs atbalstīja pat atpalikušajās saderību veidiem. - -- sql server compatibility level SQL Server savietojamības līmenis - -- sql 2005 compatibility mode SQL 2005 saderības režīmā - -- sql server compatibility levels SQL Server savietojamības līmeņus - -- sql server 2008 compatibility mode SQL Server 2008 saderības režīmā - -- sql compatibility mode SQL saderības režīms - -- check compatibility level in sql server 2008 pārbaudīt saderību līmenī SQL Server 2008 - -- sql serveer 2005 SET COMPATIBILITY_LEVEL SQL serveer 2005 SET COMPATIBILITY_LEVEL - -- how to set to, kā - -- SET COMPATIBILITY_LEVEL SET COMPATIBILITY_LEVEL - -- SQLSERVER compatibility level SQLSERVER savietojamības līmenis - -- SQL compatibility level SQL savietojamības līmenis - -- how to set compatibility level 80 of sql server 2005 , kā noteikts savietojamības līmenis 80 SQL Server 2005 - -- sql 2000 2005 select compatibility SQL 2000 2005 Izvēlēties saderību - -- compatibility level sql server saderības līmeni SQL Server - -- please set the compatibility level for current database to 80,using the set compatibility_level option of alter database. lūdzu, iestatiet saderības līmeni pašreizējā datu bāzē līdz 80, izmantojot komplektā compatibility_level iespēju mainīt datu bāzē. - -- database compatibility mode is set to 90 Datubāzes saderības režīms ir iestatīts uz 90 - -- set sql server 2008 to 80 noteikt SQL Server 2008-80 - -- sql server 2008 compatibility SQL Server 2008 saderību - -- The query uses non-ANSI outer join operators ("*=" or "=*"). Vaicājuma izmanto ne-ANSI ārējā pievienoties uzņēmēju ("*=" vai "=*"). 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. Lai veiktu šo jautājumu, bez izmaiņām, lūdzu, iestatiet saderības līmeni pašreizējā datu bāzē līdz 80, izmantojot SET COMPATIBILITY_LEVEL iespēju ALTER datubāzē. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Ir stingri ieteicams pārrakstīt jautājumu, izmantojot ANSI ārējā pievienoties operatoriem (KREISAIS ĀRĒJAIS JOIN, tiesības ĀRĒJAIS JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. Paredzams, ka turpmāk versijām SQL Server, non-ANSI pievienoties operatoriem nebūs atbalstīja pat atpalikušajās saderību veidiem. - -- non-ANSI outer join operators ("*=" or "=*"). non-ANSI ārējā pievienoties uzņēmēju ("*=" vai "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower Lai veiktu šo jautājumu, bez izmaiņām, lūdzu, iestatiet saderības līmeni pašreizējās datu bāzes uz 80 vai zemāka - -- changing compatibility level in sql 2008 from 2000 mainīgajām savietojamības līmeni SQL 2008 no 2000 - -- setting sql compatibility Nosakot SQL saderību - -- set compatibility_level option of alter database noteikt compatibility_level iespēja mainīt datu bāze - -- set compatibility level using sp_dbcmptlevel noteikt saderību līmenim, izmantojot sp_dbcmptlevel - -- non-ansi outer join operators and database compatibility non-ANSI ārējā pievienoties operatoriem un datu bāzes saderību - -- set compatibility to 80 on sql server 2008 noteikt saderību ar 80 par SQL Server 2008 - -- sql 2008 6.5 compatibility mode SQL 2008 6,5 saderības režīms - -- The query uses non-ANSI outer join operators ("*=" or "=*"). Vaicājuma izmanto ne-ANSI ārējā pievienoties uzņēmēju ("*=" vai "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Lai veiktu šo jautājumu, bez izmaiņām, lūdzu, iestatiet saderības līmeni pašreizējās datu bāzes uz 80 vai mazāka, izmantojot uzglabā procedūra sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Ir stingri ieteicams pārrakstīt jautājumu, izmantojot ANSI ārējā pievienoties operatoriem (KREISAIS ĀRĒJAIS JOIN, tiesības ĀRĒJAIS JOIN). - -- compatibility level sqlserver saderības līmeni sqlserver - -- cpmpatibility level sql 2005 lower 80 cpmpatibility līmenis SQL 2005 zemāks 80 - -- SQL Server 2008 + IE 6 compatibility SQL Server 2008 + IE 6 saderību - -- the query uses non-ansi outer join operators. vaicājumā izmanto ne-ANSI ārējā pievienoties operatoriem. compatibility level for current database to 80 or lower saderības līmeni pašreizējās datu bāzes uz 80 vai zemāka - -- "sql server 2008" compatibility transact sql "SQL Server 2008" saderība darījumus SQL - -- SQL Server 2008 database in compatibility mode 90 SQL Server 2008 datubāzes saderības režīms 90 - -- compatibility setting for SQL SERVER 2008 saderības iestatījumu SQL SERVER 2008 - -- compatibility mode is set to 90. saderības režīms ir iestatīts uz 90. JOIN USING JOIN izmantojot - -- how to set sql 2005 compatibility mode to, kā SQL 2005 saderības režīmā - -- level sql server līmenis SQL Server - -- Running 2008 SQL Server Databases in 2005 mode Running 2008 SQL Server Databases 2005 mode - -- set sql server multi user mode noteikt SQL Server multi lietotāja režīmā - -- sql 2005 set SQL 2005, kas - -- sql server ansi compatibility SQL Server ANSI saderību - -- sql set compatibility mode SQL noteikt saderību veids - -- sql server 2005 + windows 2008 server + compatibility SQL Server 2005 + Windows 2008 servera + saderību - -- sql 2008 compatibility mode 2005 SQL 2008 saderības režīmā 2005 - -- windows server 2008 + vs 2005 + compatibility Windows Server 2008 + vs 2005 + saderību - -- "Setting database option COMPATIBILITY_LEVEL to 100" ", Kurā datubāzē iespēja COMPATIBILITY_LEVEL līdz 100" - -- 2005 SQL to 2008 SQL database compatibility 2005 SQL-2008 SQL datubāzē saderību - -- change compatibility mode is set to 90. mainīt saderības režīms ir iestatīts uz 90. - --