I didn't say to Alter the master database in you stored procedure. You really shouldn't make changes like that to the Master database.
Just run SET statements to change the values for your session:
SET ANSI_NULLS On
SET arithabort On
SET CONCAT_NULL_YIELDS_NULL On
SET QUOTED_IDENTIFIER On
CODO ERGO SUM