/* --if the account is exists,please execute the following
USE [master]
GO
DROP LOGIN [WRS_USER]
GO
*/
USE [master]
GO
CREATE LOGIN [WRS_USER] WITH PASSWORD=N'@##$ha_04ps', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE WRSDB
go
exec sp_change_users_login 'AUTO_FIX', '[WRS_USER]'
GO
--CREATE USER [WRS_USER] FOR LOGIN [WRS_USER]
EXEC sp_addrolemember N'db_datawriter', N'WRS_USER'
GO
USE [WRSDB]
GO
EXEC sp_addrolemember N'db_ddladmin', N'WRS_USER'
GO