Skip to content
  • Home
  • About
  • Blog
  • Contact
  • Oracle
  • SQL Server
  • MongoDB
  • Home
  • About
  • Blog
  • Contact
  • Oracle
  • SQL Server
  • MongoDB

Create a SQL Login not using Windows User

USE [master]
GO

CREATE LOGIN [Mary] 
WITH PASSWORD=N'password123' --<< password does not meet complexity (use upper 'P')
MUST_CHANGE, DEFAULT_DATABASE=[master], 
CHECK_EXPIRATION=ON, 
CHECK_POLICY=ON
GO

USE [AdventureWorks2012]
GO

CREATE USER [Mary] FOR LOGIN [Mary] --<< Create a SQL Login
GO

USE [AdventureWorks2012]
GO

ALTER ROLE [db_datareader] --<< Add SQL Login to database Role (db_datareader)
ADD MEMBER [Mary]
GO
Top 50 SQL Blog
  • SQL Server In-Memory OLTP Overview -2
  • SQL Server In-Memory OLTP Overview – 1
  • SQL Server Cardinality Estimation
  • SQL Server Automatic tuning
  • SQL Server Statistics
  • SQL Server Resource Governor
  • Upgrading Databases using Query Tuning Assistant
  • Using SQL Server Management Studio
  • Partitioned Tables and Indexes
  • SQL Server Execution Plans
  • Database Engine Tuning Advisor
  • Intelligent query processing in SQL databases
  • Top Reasons for Slow Performance
  • SQL Server 2019 Performance Tuning
  • Security features of SQL Server on Linux
  • High availability for SQL Server containers
  • Troubleshoot SQL Server on Linux
  • SQL Server Replication on Linux
  • Performance best practices for SQL Server on Linux
  • Upgrade Availability Groups on Linux
  • Always On Availability Group on Linux
  • Availability Group Configurations
  • Always On Availability Groups on Linux
  • Failover Cluster Instances – SQL Server on Linux
  • SQL Server on Linux VDI client SDK Specification
  • Twitter
  • Facebook
  • Instagram
  • Pinterest
  • RSS
© 2020 iSqlPlus - All Rights Reserved.