anushahanna
asked on
adding database name in sp_helpuser
is it possible to add the database name in the below code, so i can know which databases have the users with the role backupoperator
thanks
thanks
create table #DBO (GName varchar(80),GID int,User_id_DB varchar(80),uid smallint)
exec sp_msforeachdb 'use [?] insert into #DBO exec sp_helpuser db_backupoperator'
select * from #DBO where User_id_DB <> 'dbo'
drop table #DBO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
rockiroads, db_name() does not quiet work right inside the sp.
ASKER