Can someone please tell me how I can create a user with a password and grant it owner permission to a database that I created in LocalDB in Visual Studio.
It creates a user with no login but I need to create one with a password and owner rights to a database.
...
CREATE LOGIN [SomeUser] WITH PASSWORD = 'topsecret';
CREATE USER [SomeUser] FOR LOGIN [SomeUser];
exec sp_addrolemember 'db_owner', 'SomeUser'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With