I have creating my system using Entity Framework code first for it create database automatic if it is not exist, but first, I need a user for access database
But I know only create user of SQL Server with SQL Server Management Studio, but I'm in a situation, where computer have SQL Server 2012 installed, but have not SQL Server Management Studio
What can I do for create a new database user without SQL Server Management Studio? Or have any solution with Entity Framework like it create database automatic?
To create a login from windows domain account using SQL Server Windows Authentication
CREATE LOGIN [Domain\Windows_UserName] FROM WINDOWS;
GO
Then you have to Create A user with that Login
CREATE USER [Domain\Windows_UserName] FOR LOGIN [Domain\Windows_UserName];
GO
For Sql Server Authentication
CREATE LOGIN Login_Name WITH PASSWORD = 'ksblaksvfdh&';
GO
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