TAILIEUCHUNG - Microsoft SQL Server 2000 Weekend Crash Course phần 5

Thứ bảy Morning Mặc dù nó là có thể, bạn không bao giờ nên cố gắng sửa đổi bất kỳ hệ thống cơ sở dữ liệu trực tiếp thông qua việc sử dụngBắt đầu bằng cách kiểm tra các tập tin lỗi đăng nhập SQL quá trình cài đặt đã tạo ra cho (nằm trong thư mục Windows) và ErrorLog (không có phần mở rộng). | 142 Saturday Afternoon You can encrypt triggers or stored procedures to prevent anyone from looking into your source code. Just add the modifier WITH ENCRYPTION right before the AS keyword. Recursive triggers A trigger can call itself recursively if the database option that allows it is set to true . For example if a FOR UPDATE trigger contains an UPDATE statement for the base table this trigger will be called again as this UPDATE executes and again and yet again. The maximum number of recursive calls is 32 which is also the maximum nesting depth. While a valid programming tool recursive triggers can be tricky to write and you should exercise caution in using them. Besides implementing business logic triggers are mainly used to enforce referential integrity see Session 5 . Though the best way to maintain referential integrity is normally to use the FOREIGN KEY constraint triggers and stored procedures become a viable alternative in some situations. Check out Books Online or some advanced books on SQL Server 2000 for some examples of such situations. Nested triggers Triggers can be nested. They follow the same rules defined for stored procedures and cannot exceed 32 levels. One example of nested triggers can be a table whose FOR UPDATE makes an INSERT into the same table thus invoking a FOR INSERT trigger which in turn invokes a FOR DELETE trigger. It is possible that one trigger will invoke another that in turn invokes the first one causing a so-called indefinite loop. Because of the maximum depth of nesting levels this loop will stop after 32 cycles. The SQL Server 2000 default setting allows nested triggers. You can disable this option on the Server-level right-click menu by selecting Properties followed by an option on the Server Settings menu or by executing the following system stored procedure exec sp_configure nested triggers 0 Session 12 Trigger Happy 143 Disabling nested triggers will automatically disable recursive triggers regardless of the setting you .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.