Database/MS SQL

MS SQL User Mapping 정보 확인

catchv 2014. 1. 6. 14:36
반응형

CREATE TABLE #tempww (
    LoginName nvarchar(max),
    DBname nvarchar(max),
    Username nvarchar(max),
    AliasName nvarchar(max)
)
GO

INSERT INTO #tempww
EXEC master..sp_msloginmappings

-- display results
SELECT *
FROM   #tempww
ORDER BY dbname, username

-- cleanup
DROP TABLE #tempww

반응형