Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
montu
Yak Posting Veteran
60 Posts |
Posted - 2008-02-19 : 01:00:06
|
| need help-------------i understand sp_MSforeachdb system stored procedure can be used to do the same task on all the databases. but when i tried this what i does execute that task/command number of times the available databases on same database instead execute that task once on each database. this is what i was doinguse masterexec sp_msforeachdb @command1 = "exec sp_grantdbaccess @loginame ='test',@name_in_db = 'test'"GOcan some one ther please help me how i can execute this for each database |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|