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 |
|
asifbhura
Posting Yak Master
165 Posts |
Posted - 2010-03-22 : 01:46:42
|
| hiI want to create user for particular DB with all permission(Administrator) using queryregardsASIF |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-03-22 : 02:30:20
|
| Try it if it helps..Declare @NewUser Varchar(255)Set @NewUser ='MyDBNewUser2'Exec('CREATE LOGIN ' + @NewUser + ' WITH PASSWORD = ''hai'' ') EXEC master..sp_addsrvrolemember @loginame = @NewUser, @rolename = N'sysadmin'GORegards,Bohra |
 |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-03-22 : 02:33:37
|
| Find the template for create user for sysadmin in sql server template explorer from view -> template explorerVaibhav T |
 |
|
|
|
|
|