INF: ????? ????? ????? ????? ?????? ????? ????? ???? ??? ????? ?????? ???? ?? ????? ????? ????

?????? ????????? ?????? ?????????
???? ???????: 272424 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

??? SQL Server ??????? ???? ????? ??????? ??? ?????? ?? ????????? ??????? ???? ???? ???? ????? ????????. ????? ?????? ??? ?????? ??? ????? ???? ???????? ??????? ?? ?? ????? ?????? ????? ?????? ???. ??? ???? ??? ??? ???? ?????????? ?? ??? ????? ???????? ???? ??? ??? ????? ???????? ???? ?? ??? ????? ????? ?????? ??? (?????? ??? ???? ?? ???? ????? ???????? [DBO]) ? ?? ???? ?? ???? ????? ?????? ????? ??????? ???? ??? ????. ??? ???? ??????? ??? ?? ????? DBO ??? ????? ?????? ????? ?????? ??? ???? ???????? ???????? ?? ????? ???????? ?? DBO ?? ??? ????? ??????. ??? ???? ??? ?? ????? DBO ??? ????? ?????? ??? ????? ???? ?????? ? ??? ????? ????? ???????. ???? ?? ???? ??? ?? ???????? ??? ??? DBO ??? ????? ????? ?????????? ????? ????? ??????.

??????? ????

???? ??? ?????? ??? ????? ??? ?? ????? ???? ?????? ?? ????? ??????. ??? ??? ??? ????? ????? ?? ??????? ?????? ??????? ??? ???????? ?? ????? ?????? ???? ???? ?????? ?????? ??? ????? ???? ?????? ? ??? ????? ???????? ??????? ???????. ??? ?? ??? ???????? ?????? ??? ?????? ?? ????? ???????? ?????? ? ??? ????? ????? ??????:
?? ??? ??? ???? ????? % ls ??? 229: ' %. * ls '? ?? ????? ????????' %. * ls ? ?????? ' %. * ls'.
??? ???? ?? ???? ????? ?????? ???????? ??????? ???????? ?? ????????? ???? ? ?? ??? ?????? ?? ???????? ???? ????? ????????? ??? ????? ????? ??? ??? ?? ??? ??? ???????? ?????? ??? ????? ??????.

??????? ???? ?? ??? ???? ??????? ???????:
  1. ????? ????? ???? ????? ????? ?? ?????? ?????? ????????; db1 ????? "???????" ?? ???????? ?????? db2 ????? ??? ????? ?? ?????? ?? db1.
    USE master
    GO
    CREATE DATABASE db1
    CREATE DATABASE db2
    EXEC sp_addlogin Owner1
    EXEC sp_addlogin Owner2
    EXEC sp_addlogin TestUser
    GO
    -- setup database #1, DBO is Owner1
    USE db1
    EXEC sp_changedbowner Owner1
    EXEC sp_adduser TestUser
    CREATE TABLE BaseTable (TableColumn CHAR(20))
    INSERT BaseTable VALUES ('Select Succeeded')
    GO
    -- setup database #2
    USE db2
    EXEC sp_adduser TestUser
    GO
    CREATE VIEW      CrossDatabaseView           AS SELECT * FROM db1.dbo.BaseTable
    GO
    GRANT SELECT  ON CrossDatabaseView           TO public
    GO
    					
  2. ????? ????????? ???????? ??????? ???? ????? ?????? ???????? ??? ?? ??? ??? DBO ??? ?? ??????:
    SET NOCOUNT ON
    GO
    PRINT '***** results with both DBOs the same *****'
    PRINT ''
    USE db2
    EXEC sp_changedbowner Owner1
    SETUSER 'TestUser'
    GO
    SELECT * FROM CrossDatabaseView
    GO
    SETUSER
    GO
    
    PRINT ''
    PRINT '***** results with each DBO different *****'
    PRINT ''
    USE db2
    EXEC sp_changedbowner Owner2
    SETUSER 'TestUser'
    GO
    SELECT * FROM CrossDatabaseView
    GO
    SETUSER
    GO
    					
  3. ????? ????? ???????? ? ??????? ?????? ???? ?? ??????? ?? ??? ??????:
    USE master
    GO
    DROP DATABASE db1
    DROP DATABASE db2
    EXEC sp_droplogin Owner1
    EXEC sp_droplogin Owner2
    EXEC sp_droplogin TestUser
    GO
    					

???????

???? ???????: 272424 - ????? ??? ??????: 14/?? ?????/1424 - ??????: 4.3
????? ???
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
????? ??????: 
kbmt kbinfo kbpending KB272424 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????272424

????? ???????

 

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