SQLGlenn
Ten Centuries
Points: 1370
More actions
September 4, 2003 at 4:35 pm
#176331
I swear I've seen a script out here somewhere that will create a script file so I can update each db with sp_addrolemember for ie: db_datawriter. But I've been looking for 3 days thru the site and can't find anything, I am crazy?
mccork
SSC-Insane
Points: 22288
September 4, 2003 at 8:56 pm
#472715
I'm not quite sure of your requirement, but here's code I would use:
set quoted_identifier off exec sp_msForeachdb " use print '?' if '?' not in ('master','msdb') exec sp_addrolemember 'db_datawriter', 'Mark' "
Cheers,
- Mark
Cheers,- Mark
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply