Please see the T-SQL below:
create database db;
go
use [db]
create login [standard] with password ='dkdkdkqajHGgbh56'
CREATE USER [standard] FROM LOGIN [standard];
exec sp_addrolemember 'db_owner', 'standard'
After running this I try to login to SQL Server Management Studio as standard
and I am prompted with this error:
login failed for user: standard
What am I doing wrong?
PS: I cannot even login as sa. I have enabled 'SQL Server Windows Authentication mode'. I am a developer (not a DBA) trying to setup a local instance of SQL Server.
Best Answer
I had to enable: 'SQL Server and Windows Authentication Mode', then restart the SQL Server 2012 service.