INF: Quy?n s? h?u c s? d? li?u Cross lo?t thay ?i hnh vi trong SQL Server 2000 Service Pack 3

D?ch tiu ? D?ch tiu ?
ID c?a bi: 810474 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

? Trang ny

TM T?T

Microsoft SQL Server Service Pack 3 (SP3) cung c?p m?t m?i nng cao b?o m?t lin quan ?n ty ch?n c?u h?nh c s? d? li?u qua quy?n s? h?u lo?t, Cho php quy?n s? h?u c s? d? li?u qua lo?t cho t?t c? cc c s? d? li?u trong khi thi?t l?p. Bi vi?t ny th?o lu?n v? quy?n s? h?u c s? d? li?u qua lo?t hnh vi trong SQL Server 2000 SP3. V?i ty ch?n m?i ny, b?n c th? ki?m sot hay khng b?n cho php quy?n s? h?u c s? d? li?u qua lo?t. Theo m?c ?nh, i?u ny ty ch?n l v hi?u ho. Microsoft khuy?n co b?n s? d?ng ty ch?n m?c ?nh, b?i v? n lm cho my ch? c s? d? li?u c?a b?n an ton hn.

THNG TIN THM

Quy?n s? h?u lo?t

Theo m?c ?nh, t?t c? cc c s? d? li?u ?i t?ng c ch? s? h?u. Khi m?t ?i t?ng nh v?y nh l m?t ci nh?n, m?t th? t?c ?c lu tr?, ho?c m?t ng?i dng xc ?nh ch?c nng tham kh?o khc ?i t?ng, m?t chu?i quy?n s? h?u ?c thnh l?p. V d?, m?t b?ng m l thu?c s? h?u b?i cng m?t ng?i dng. Khi cng m?t ng?i dng s? h?u ?i t?ng ngu?n, xem, lu tr? th? t?c, ho?c ng?i s? d?ng ?nh ngh?a ch?c nng, v t?t c? cc ?i t?ng m?c tiu (n?m bn d?i b?ng, quan i?m, ho?c ?i t?ng khc), dy chuy?n quy?n s? h?u ?c g?i l khng gin o?n. Khi cc quy?n s? h?u chu?i l khng gin o?n, SQL Server s? ki?m tra quy?n truy c?p vo ?i t?ng ngu?n nhng khng ph?i trn cc ?i t?ng m?c tiu.

Cross-c s? d? li?u quy?n s? h?u lo?t

Quy?n s? h?u c s? d? li?u qua lo?t x?y ra khi cc ?i t?ng ngu?n ph? thu?c vo cc ?i t?ng trong c s? d? li?u khc. Quy?n s? h?u c s? d? li?u qua m?t chu?i cc cng tr?nh trong cng m?t cch nh quy?n s? h?u lo?t trong c s? d? li?u, ngo?i tr? r?ng m?t khng gin o?n quy?n s? h?u chu?i d?a trn t?t c? cc ?i t?ng ch? ?c l?p b?n ? ? cng ti kho?n ng nh?p. V? v?y, trong m?t chu?i cc quy?n s? h?u c s? d? li?u qua, n?u cc ngu?n ?i t?ng trong c s? d? li?u ngu?n v cc ?i t?ng m?c tiu trong c s? d? li?u m?c tiu ?c s? h?u b?i cng m?t ti kho?n ng nh?p, SQL Server khng ki?m tra quy?n truy c?p vo cc ?i t?ng m?c tiu.

N?u b?n c nhi?u hn m?t c s? d? li?u ?c s? d?ng b?i m?t ?ng d?ng v ?ng d?ng cc cu?c g?i th? t?c ?c lu tr? ho?c xem trong m?t c s? d? li?u l d?a trn cc ?i t?ng trong m?t c s? d? li?u, sau cross-database quy?n s? h?u lo?t ?c s? d?ng. ?ng d?ng d?a trn quy?n s? h?u c s? d? li?u qua lo?t c th? t?o ra s? cho php t? ch?i l?i n?u cross-c s? d? li?u quy?n s? h?u lo?t l?a ch?n b? t?t.

R?i ro lin quan ?n quy?n s? h?u c s? d? li?u qua lo?t

Microsoft khuy?n co b?n v hi?u ha cc quy?n s? h?u c s? d? li?u qua lo?t l?a ch?n v? hnh ?ng cao ?c quy?n ng?i dng c th? c?a th?c hi?n:
  • C s? d? li?u ch? s? h?u v cc thnh vin c?a cc db_ddladmin ho?c cc db_owners vai tr? c s? d? li?u c th? t?o cc ?i t?ng ?c s? h?u b?i ng?i dng khc. Cc ?i t?ng c th? c kh? nng nh?m m?c tiu cc ?i t?ng trong c s? d? li?u khc. i?u ny c ngh?a N?u b?n cho php quy?n s? h?u c s? d? li?u qua lo?t, b?n ph?i hon ton tin t?ng nh?ng ng?i s? d?ng v?i d? li?u trong c s? d? li?u t?t c?. ? xc ?nh cc thnh vin c?a cc db_ddladmin v cc db_owners vai di?n trong c s? d? li?u hi?n t?i, th?c thi Transact-SQL sau y l?nh:
    exec sp_helprolemember 'db_ddladmin' exec sp_helprolemember 'db_owner'
  • V?i s? cho php t?o ra c s? d? li?u ng?i dng c th? t?o m?i c s? d? li?u v nh km cc c s? d? li?u hi?n c. N?u s? d? li?u qua quy?n s? h?u lo?t l c ?c kch ho?t, nh?ng ng?i s? d?ng th? truy c?p cc ?i t?ng trong c s? d? li?u khc t? m?i ?c c s? d? li?u t?o ra ho?c nh km.
M?c d Microsoft khuy?n co b?n h?y t?t s? d? li?u qua quy?n s? h?u lo?t cho an ninh t?i a, c m?t s? mi tr?ng ni m b?n c th? hon ton tin t?ng ng?i dng cao ?c quy?n c?a b?n; V? v?y, b?n c th? b?t cho quy?n s? h?u c s? d? li?u cho c s? d? li?u c? th? ? p ?ng cc yu c?u c?a cc ?ng d?ng c? th?.

Lm th? no ? c?u h?nh quy?n s? h?u c s? d? li?u qua lo?t trong khi thi?t l?p

Trong Microsoft SQL Server Service Pack 3 (SP3) thi?t l?p, m?t h?p tho?i m?i h?p ? ?c thm vo cho php ng?i qu?n tr? h? th?ng ? ki?m sot hay khng qua quy?n s? h?u c s? d? li?u lo?t s? ?c cho php. Neu ban chon Cho php quy?n s? h?u c s? d? li?u qua lo?t cho t?t c? cc c s? d? li?u trong khi thi?t l?p SQL Server 2000 SP3, b?n cho php i?u ny ty ch?n trn t?t c? cc c s? d? li?u. y l hnh vi m?c ?nh tr?c khi SQL Server 2000 SP3. B?t k? c?a cc ty ch?n m b?n ch?n trong khi thi?t l?p, b?n c th? sau ny S?a ?i cc my ch? v c s? d? li?u h? tr? quy?n s? h?u c s? d? li?u qua lo?t ho?c b?ng cch s? d?ng l?nh Transact-SQL ho?c t? SQL Server Enterprise Manager.

Lm th? no ? c?u h?nh quy?n s? h?u c s? d? li?u qua lo?t sau khi ci ?t

? thay ?i cc quy?n s? h?u c s? d? li?u qua lo?t c?u h?nh, s? d?ng cc ty ch?n m?i trong cc sp_configure v cc sp_dboption th? t?c ?c lu tr?.

Chu y N?u b?n tch v reattach sau c s? d? li?u, b?n ph?i kch ho?t l?i quy?n s? h?u c s? d? li?u qua lo?t.
  • C?u h?nh quy?n s? h?u c s? d? li?u qua lo?t b?ng cch s? d?ng Transact-SQL l?nh:
    • C?u h?nh quy?n s? h?u c s? d? li?u qua lo?t h? tr? cho th? hi?n c?a SQL Server v?i cc m?i Bng qua quy?n s? h?u DB lo?t ty ch?n cho sp_configure. Khi ty ch?n ny ?c ?t thnh 0, b?n c th? ki?m sot qua c s? d? li?u quy?n s? h?u lo?t ? c?p ? c s? d? li?u b?ng cch s? d?ng sp_dboption. Khi ty ch?n ny ?c thi?t l?p ? 1, b?n khng th? h?n ch? qua c s? d? li?u quy?n s? h?u lo?t. y l hnh vi SP3 pre-SQL Server 2000. N?u b?n thay ?i ty ch?n ny, bao g?m ty ch?n RECONFIGURE ph?i c?u h?nh l?i tr?ng h?p m khng c b?n ph?i kh?i ?ng l?i n. V d?, s? d?ng l?nh sau ? cho php Cross-database quy?n s? h?u lo?t trong t?t c? cc c s? d? li?u:
      EXEC sp_configure 'Cross DB Ownership Chaining', '1'; RECONFIGURE 
      
    • C?u h?nh quy?n s? h?u c s? d? li?u qua lo?t t?i cc c s? d? li?u c?p ? v?i cc m?i DB lo?t ty ch?n cho sp_dboption. Khi ty ch?n ny ?c ?t thnh false, c s? d? li?u khng th? tham gia vo quy?n s? h?u c s? d? li?u qua lo?t l m?t trong hai ngu?n ho?c cc m?c tiu c s? d? li?u. Khi ty ch?n ny ?c ?t thnh true, c s? d? li?u c th? tham gia trong m?t chu?i quy?n s? h?u c s? d? li?u qua. Theo m?c ?nh, ty ch?n ny l sai cho t?t c? c s? d? li?u ng?i dng sau khi b?n p d?ng SQL Server 2000 SP3. L?nh sau y cho php cross-database quy?n s? h?u lo?t cho c s? d? li?u Northwind:
      EXEC sp_dboption 'Northwind', 'db chaining', 'true'

    Nh?ng ?nh h?ng c?a sp_dboption ?c th? hi?n ch? khi cc sp_configure Bng qua quy?n s? h?u DB lo?t ty ch?n ?c ?t thnh 0. Ngoi ra, ? cho php quy?n s? h?u c s? d? li?u qua lo?t ? c?p ? c s? d? li?u, b?n ph?i b?t ty ch?n ny trn c? hai ngu?n v c s? d? li?u m?c tiu.
  • C?u h?nh quy?n s? h?u c s? d? li?u qua lo?t b?ng cch s? d?ng SQL Enterprise Manager:
    • ? thi?t l?p ty ch?n ny cho t?t c? cc c s? d? li?u, lm theo cc b?c sau:
      1. Nh?p chu?t ph?i <server></server>.
      2. B?m ? ch?n Thu?c tnh.
      3. Nh?p vo Bao mt.
      4. B?m ? ch?n Cho php cross-c s? d? li?u quy?n s? h?u lo?t trong cc Quy?n s? h?u lo?tke tiep.
      5. Nh?p vo Ok. B?n s? ?c nh?c ? ngn ch?n v kh?i ?ng l?i d?ch v? SQL Server.
      6. Nh?p vo Ok .
    • ? b?t tu? ch?n ny ? c?p ? c s? d? li?u, h?y lm theo cc b?c sau:
      1. Nh?p chu?t ph?i vo cc <database></database>.
      2. B?m ? ch?n Thu?c tnh.
      3. Nh?p vo Tuy chon.
      4. B?m ? ch?n Cho php qua c s? d? li?u Quy?n s? h?u lo?t trong cc Thit t ph?n

Thu?c tnh

ID c?a bi: 810474 - L?n xem xt sau cng: 28 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft SQL Server 2000 Service Pack 3
T? kha:
kbproductlink kbinfo kbsysadmin kbupgrade kbsqlserv2000sp3fea kbmt KB810474 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:810474

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com