This script shows the users inside the databases, to easy view and documentation.
Este script mostra os usuários que estão dentro da base, para uma facil vizualização e documentação.
Para mais... http://leka.com.br
Ricardo-Leka,
2011-05-30 (first published: 2011-05-23)
This script shows the users inside the databases, to easy view and documentation.
Este script mostra os usuários que estão dentro da base, para uma facil vizualização e documentação.
Para mais... http://leka.com.br
create table #UsrDataMapping( [database_name] [sysname] NULL, [name] [sysname] NULL, [schema] [sysname] NULL ) EXEC sp_MSforeachdb 'insert into #UsrDataMapping SELECT ''?'' as DBNAME, --u.name AS [Name], SUSER_SNAME(sid) AS [Name], ISNULL(u.default_schema_name,N'''') AS [DefaultSchema] FROM [?].sys.database_principals AS u LEFT OUTER JOIN [?].sys.database_permissions AS dp ON dp.grantee_principal_id = u.principal_id WHERE (u.type in (''U'', ''S'', ''G'', ''C'', ''K'')) and dp.state = ''G'' ' select * from #UsrDataMapping order by database_name drop table #UsrDataMapping
Easily and quickly delete all database accounts even if they don't have the same name as server login.
2015-05-05 (first published: 2013-07-18)
5,788 reads
2013-02-18
2,193 reads
At most large companies one business requirement is that all reports have the same look and feel. This may vary...
2009-11-24
5,979 reads
This past Friday I received a call from our systems team stating that they were running low on Disk Space...
2009-09-22
4,608 reads