Created
September 11, 2018 08:04
-
-
Save MovGP0/32fa152fe5a562a22db55acd673e65c3 to your computer and use it in GitHub Desktop.
SQL Server Environment Variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE [master] | |
| EXEC sp_configure 'show advanced options', 1 | |
| RECONFIGURE | |
| GO | |
| EXEC sp_configure 'xp_cmdshell', 1 | |
| RECONFIGURE | |
| GO | |
| GRANT EXECUTE ON xp_cmdshell TO [ANPRIN\SVCCareCenter] | |
| GRANT CONTROL SERVER TO [ANPRIN\SVCCareCenter] | |
| GO | |
| -- determine the environment | |
| declare @Url varchar(2083) = 'http://carecenterservice.api.local/assistentfilters/tlstermineeintragen'; | |
| declare @environment varchar(50); | |
| declare @table table (value varchar(50)); | |
| insert into @table exec master..xp_cmdshell N'echo %ASPNETCORE_ENVIRONMENT%'; | |
| set @environment = (select top 1 value from @table); | |
| -- set the url to the service | |
| if @environment = N'Development' OR @environment = N'Staging' | |
| begin | |
| set @Url = 'http://carecenterservicestaging.api.local/assistentfilters/tlstermineeintragen'; | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment