SQL Server Create new User and assign to database
CREATE LOGIN User_Name WITH PASSWORD = 'User123'
GO
Use YourDatabase;
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'User_Name')
BEGIN
CREATE USER [User_Name] FOR LOGIN [User_Name]
EXEC sp_addrolemember N'db_owner', N'User_Name'
END;
GO