TAILIEUCHUNG - SQL Server Tacklebox- P9

SQL Server Tacklebox- P9: This book, as with almost all books, started out as an idea. I wanted to accumulate together those scripts and tools that I have built over the years so that DBAs could sort through them and perhaps adapt them for their own circumstances. | 2 The SQL Server landscape Security For security reporting we essentially want to know who has access to which databases and with which permissions. A sample query of the kind of information that can be gathered is in shown in Listing . IF EXISTS SELECT FROM WHERE id OBJECT_ID N tempdb . dbo . SQL_DB_REP DROP TABLE tempdb . dbo . SQL_DB_REP GO CREATE TABLE tempdb . dbo . SQL_DB_REP Server varchar 100 NOT NULL DB_Name varchar 70 NOT NULL User_Name nvarchar 90 NULL Group_Name varchar 100 NULL Account_Type varchar 22 NULL Login_Name varchar 80 NULL Def_DB varchar 100 NULL ON PRIMARY INSERT INTO tempdb . dbo . SQL_DB_REP Exec sp_MSForEachDB SELECT CONVERT varchar 100 SERVERPROPERTY Servername AS Server AS DB_Name u_name CASE WHEN is null THEN public ELSE END as Group_Name CASE WHEN 1 THEN Windows Domain Account WHEN 1 THEN Windows Group WHEN 1 THEN SQL Account WHEN 1 THEN SQL Role END as Account_Type AS Def_DB FROM .sysusers usu LEFT OUTER JOIN .sysmembers mem INNER JOIN .sysusers usg ON ON LEFT OUTER JOIN lo ON WHERE 40 2 The SQL Server landscape 1 AND 0 AND 1 AND 1 OR is null Listing Query to return security information about database access. As for the database management query a temp table is populated again using sp_msforeachdb. Ultimately our SSIS package Populate_DBA_Repository will read the data from this temp table and then store it in our central repository DBA_Rep . A simple Select from tempdb . dbo . SQL_DB_REP the output of which is shown in Figure delivers a lot of information about security some of which may be surprising. You might be interested to know for example that MyDomain BadUser has DBO access to several user databases. Figure Database user access levels. Over time .

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.