TAILIEUCHUNG - Hướng dẫn học Microsoft SQL Server 2008 part 98

Bạn có thể gặp phải một tình huống trong đó cơ sở dữ liệu là không thể truy cập và bạn không có một bản sao lưu. Để truy cập vào cơ sở dữ liệu bất kể trạng thái trực tuyến offline /, các thành viên của vai trò quản trị hệ thống có thể đặt các cơ sở dữ liệu ở chế độ KHẨN CẤP. Một lần trong KHẨN CẤP chế độ, cơ sở dữ liệu ở chế độ chỉ đọc và chỉ được truy cập bởi các thành viên của vai trò quản trị hệ thống | Part VI Enterprise Data Management To revert this change and make the AdventureWorks2008 database online and available do the following ALTER DATABASE AdventureWorks2008 SET ONLINE You may encounter a situation in which the database is inaccessible and you do not have a backup. To access the database regardless of online offline state members of the sysadmin role can put the database in EMERGENCY mode. Once in EMERGENCY mode the database is in read-only mode and is accessible only by members of the sysadmin role. To put the AdventureWorks2008 sample database in EMERGENCY mode in code do the following ALTER DATABASE AdventureWorks2008 SET EMERGENCY The READ_ONLY database-state settings are used to allow only selects from the database. READ_ONLY cannot take effect if any users are in the database. To reset the database to a normal read-and-write state the READ_WRITE database setting is used. To set the AdventureWorks2008 sample database to a READ_ONLY state in code do the following ALTER DATABASE AdventureWorks2008 SET READ_ONLY The restricted access database-state settings are also available. The three restricted access levels are single_user restricted_user and multi_user states. These settings control which users are allowed to access the database. The SINGLE_USER setting is appropriate when you are doing database maintenance. The RESTRICTED_USER setting allows database access only to users in the db_owner dbcreator and sysadmin roles. The MULTI_USER setting is used to set the database in the normal operating state. The following sets the AdventureWorks2008 sample database to SINGLE_USER access ALTER DATABASE AdventureWorks2008 SET SINGLE_USER To revert the preceding setting and set the AdventureWorks2008 database access to MULTI_USER access do the following ALTER DATABASE AdventureWorks2008 SET MULTI_USER Compatibility level In SQL Server the database-compatibility level can be set to 80 SQL Server 2000 90 SQL Server 2005 or 100 SQL Server 2008 . When a database

Đã 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.