Can you please let me know what this command doesn't work in SQL 2008r2 but it does work in SQL 2012?
Error: Incorrect syntax near the keyword 'ADD'.
How I scan fix this so it would run in SQL 2008r2 ?
CREATE USER [mdy\SF Tech] FOR LOGIN [mdy\SF Tech]
EXEC sp_addrolemember N'db_datareader', N'mdy\SF Tech'
ALTER ROLE db_owner ADD MEMBER [mdy\SF Tech]
-- alter authorization on SCHEMA::[ABOr.AB] to dbo
-- drop all local users
drop user [mdy\bag]
drop user [mdy\Bal]
drop user [mdy\Bhar]