How to Set Compatibility Level for SQL Server 2008 or 2005 Database Bagaimana ke Tetapkan Kompatibilitas Tingkat untuk SQL Server 2008 atau 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: Bila memilih data atau melakukan permintaan Microosft pada SQL Server 2008 atau SQL Server 2005 database, berikut pesan error atau tidak dapat dikembalikan:
[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] Permintaan menggunakan non-ANSI ("*=" operator luar bergabung atau "=*"). 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. Untuk menjalankan permintaan ini tanpa modifikasi, silahkan mengatur tingkat kompatibilitas database untuk saat ini ke 80, menggunakan SET COMPATIBILITY_LEVEL pilihan untuk merubah DATABASE. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Sangat dianjurkan untuk menggunakan penulisan ulang permintaan bergabung ANSI operator luar (Outer LEFT JOIN, RIGHT JOIN Outer). In the future versions Di masa mendatang versi
of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. dari SQL Server, non-ANSI bergabung operator tidak akan didukung bahkan di kompatibilitas ke belakang-mode.
or, atau,
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 “=*”). Permintaan menggunakan non-ANSI ("*=" operator luar bergabung atau "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. Untuk menjalankan permintaan ini tanpa modifikasi, silahkan mengatur tingkat kompatibilitas database untuk saat ini ke 80 atau lebih rendah, dengan menggunakan prosedur yang tersimpan sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). Sangat dianjurkan untuk menggunakan penulisan ulang permintaan bergabung ANSI operator luar (Outer LEFT JOIN, RIGHT JOIN Outer). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. Di masa mendatang versi SQL Server, non-ANSI bergabung operator tidak akan didukung bahkan di kompatibilitas ke belakang-mode.
The error happens because Microsoft has dropped support for and eliminated old-style *= and =* outer join operators. Kesalahan yang terjadi karena Microsoft telah menurun dan dukungan untuk dihapuskan lama-gaya *= =* luar dan bergabung operator.
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. Untuk memperbaiki kesalahan di atas SQL Server, DB Administrator telah menetapkan database tingkat kompatibilitas ke 80, yang setara dengan SQL Server 2000 sebagai Workaround sementara. 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. Tentu saja, solusi yang terbaik adalah untuk mengubah atau query SQL pernyataan kode untuk menghapus gaya lama bergabung dengan operator sekarang bergabung sintaks standar SQL.
For example, SQL query below is not valid: Misalnya, SQL query di bawah ini tidak valid:
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: Dan harus diganti dengan kode berikut:
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: Atau disingkat batin berikut bergabung Pernyataan:
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. Untuk administrator yang tidak dapat mengubah kode Workaround termudah adalah untuk mengembalikan tingkat kompatibilitas database untuk menyediakan kompatibilitas mundur untuk bergabung dengan gaya lama. 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 disimpan prosedur (usang) atau transact-SQL dapat digunakan untuk menetapkan tertentu (sebagian, tidak semua) database perilaku agar kompatibel dengan versi SQL Server. This Ini MSDN article MSDN artikel provides overview on what behaviors are changed on each compatibility level. memberikan gambaran umum tentang perilaku apa yang berubah pada setiap tingkat kompatibilitas.
Version of SQL Server that can be reverted to can be one of the following: Versi SQL Server yang dapat dikembalikan untuk dapat menjadi salah satu berikut ini:
60 = SQL Server 6.0 60 = SQL Server 6,0
65 = SQL Server 6.5 65 = 6,5 SQL Server
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. Catatan: Kompatibilitas tingkat 60, 65, dan 70 tidak lagi tersedia dalam SQL Server 2008. And future version of SQL Server will support only two (2) prior version of backward compatibility. Dan masa depan versi SQL Server akan mendukung hanya dua (2) sebelum versi kompatibilitas ke belakang. A database containing an indexed view cannot be changed to a compatibility level lower than 80. J berisi data yang diindeks melihat tidak dapat diubah ke tingkat kompatibilitas yang lebih rendah dari 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. Apakah juga akan diketahui bahwa bila database diatur ke modus backward-kompatibilitas, beberapa fungsi baru bisa hilang, seperti SQL CLR SSMS dukungan dan diagram untuk database. Beside, the compatibility mode affects behaviors only for the specified database, not for the entire server. Disamping, kompatibilitas modus mempengaruhi perilaku hanya untuk ditentukan database, tidak untuk seluruh server.
Steps to Change and Set Compatibility Level of A Database in SQL Server Langkah-langkah untuk Perubahan dan Tetapkan Kompatibilitas Tingkat J Database di SQL Server
The following SQL commands can be issued in SQL Server Management Studio Query window. Perintah SQL berikut ini dapat dikeluarkan di SQL Server Management Studio Permintaan jendela. Remember to execute Go after each command. Jangan lupa untuk menjalankan perintah Menuju setelah masing-masing.
- Optional: Set the database to single user access mode: Opsional: Atur database untuk satu user mengakses mode:
ALTER DATABASE database_name SET SINGLE_USER; - Set the database compatibility level to one of the earlier version stated above: Mengatur database tingkat kompatibilitas ke salah satu versi di atas:
Transact-SQL Method Metode transact-SQL
ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = { 80 | 90 | 100 }For example, Misalnya,
ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 80 Alter DATABASE my_db SET COMPATIBILITY_LEVEL = 80
sp_dbcmptlevel Stored Procedure Method Metode sp_dbcmptlevel Stored Prosedur
EXEC sp_dbcmptlevel database_name, compatibility_level value;For example, Misalnya,
EXEC sp_dbcmptlevel my_db, 90; EXEC sp_dbcmptlevel my_db, 90;
- Optional: Put back the database in multiuser access mode: Opsional: Pasang kembali database dalam mode multiuser akses:
ALTER DATABASE database_name SET MULTI_USER;
IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman yang diterjemahkan mesin dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Mesin terjemahan mungkin sulit dimengerti. Please refer to Silakan merujuk ke original English article artikel asli Inggris whenever possible. bila memungkinkan.
Related Articles Artikel Terkait
- Uninstall and Remove Multiple Database Instances of Microsoft SQL Server 2005 Uninstall dan Hapus Beberapa Contoh Database Microsoft SQL Server 2005
- Microsoft DreamSpack Offers Free Download and License of Visual Studio 2008, Server 2003, SQL Server 2005 and More Microsoft DreamSpack Penawaran Gratis Download dan Lisensi dari Visual Studio 2008, Server 2003, SQL Server 2005 dan Lagi
- Optimize SQL Server 2000, 2005 or 2008 in Large RAM System by Locking Pages in Memory and AWE Optimasi SQL Server 2000, 2005 atau 2008 di Besar RAM Sistem oleh Locking Halaman dalam memori dan AWE
- Download Update for Windows 7 and Server 2008 R2 Beta (KB967062) to Fix Common Application Compatibility Issue Update download untuk Windows 7 dan Server 2008 R2 Beta (KB967062) untuk Perbaiki Masalah Kompabilitas Aplikasi common
- Error Has Occurred While Establishing A Connection To SQL Server 2005 Which Does Not Allow Local and Remote Connections Kesalahan Telah Terjadi Saat Membuat J Sambungan Untuk SQL Server 2005 yang Tidak Mengijinkan Sambungan Lokal dan Remote
- Microsoft Virtual Server 2005 R2 Download Available for Free Microsoft Virtual Server 2005 R2 Tersedia untuk Download Gratis
- Check System Compatibility Via Microsoft New Application Compatibility Toolkit Version 5.5 Periksa Kompatibilitas Sistem Via Microsoft Application Compatibility Toolkit Baru Versi 5,5
- Microsoft Virtual Server 2005 R2 SP1 (Enterprise Edition) Direct Download Links Microsoft Virtual Server 2005 R2 SP1 (Enterprise Edition) Direct Download Link
- Internet Explorer (IE) Hang When Opening Virtual Server 2005 Web Administration Site Internet Explorer (IE) Hang Ketika Membuka Virtual Server 2005 Web Administrasi Situs
- Change Oracle Database User Password Ubah Oracle Database User Password









































