Beginning SQL Server 2008 for Developers From Novice to Professional phần 4

Chúng tôi đi qua điều này trong chi tiết hơn trong Chương 2. Hộp thoại sẽ giống như hình 1-12. 9. Kiểm tra các thông báo lỗi xuất hiện, mà nên giống với những gì bạn nhìn thấy trong hình 1-13. JThakur như đăng nhập không được định nghĩa trong SQL Server cụ thể, không thuộc | 110 CHAPTER 4 SECURITY AND COMPLIANCE 4. Select Properties to bring up the Database Properties dialog box shown in Figure 4-20. On the General tab you will see an item named Owner. This is the fully qualified Vista XP Win2K account preceded by the domain or local machine name. Figure 4-20. Database Properties 5. Click Cancel to close this dialog box. Ownership of tables and other database objects is just as important. If you create a table using the same login ID as that which you created the database with or use a logon ID that is a member of the sysadmin role that is also implicitly mapped to the dbo user in the database the table will have a default schema of dbo. However if you logged in with a different user ID the table would have that user s default schema as the prefix to the table name replacing the dbo prefix. Now that we know who the database owner is it is up to that user or another user who has system administration rights in other words a login that has the sysadmin server role or has the db_owner database role to allow any other specified user the ability to create tables within the database. We have a user called JThakur who is not a system administrator but a developer. Recall we created this user in Chapter 1 and that this user could not log in to SQL Server. CHAPTER 4 SECURITY AND COMPLIANCE 111 The next section will go through a scenario where as a developer JThakur has no rights to create any new items. However we will rectify this situation in the next section where we will alter JThakur so that he can connect to SQL Server and create a table. Try It Out Allowing a User to Create a Table 1. Log on to SQL Server as a sysadmin if required. However you are probably already logged in as a sysadmin. Create a new login by right-clicking the Logins node on the Server Security node and selecting New Login. This brings up the new login screen which we can populate with the login name of the user by typing in the details of the login as shown in Figure

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
50    120    3    29-06-2024
Đã 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.