I am developing a C# application with SQL Server, and would like to call a stored procedure to create a login and a user.
I am looking for the simplest way to do th
here is an example on how to create a login for the server-wide, and a user for your db adapt it to a procedure
USE [master]
GO
CREATE LOGIN [usr] WITH PASSWORD=N'pass', DEFAULT_DATABASE=[yourDb], DEFAULT_LANGUAGE=[English], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE [yourDb]
GO
CREATE USER [usr] FOR LOGIN ['usr]
GO
you only have to receive usr and password as a parameter and use it