tags:

views:

412

answers:

2

We're deploying some new WCF calls in our SQL 2005 DB using the CLR. In testing, I hardcoded in the code the endpoint to connect to, and deployed it to our test server. When we go to deploy this to production, we will be deploying it to many different SQL DBs, and using different endpoints to connect to (same service running on different servers). How can something like this be done? Is there a config file that can be referenced for the deployment of the dll into SQL?

+1  A: 

The solutions above would work, but we found that the best practice approach would be to create a new table storing all of the different endpoints into the DB. Then, we updated the CLR to make a call to this table to get the endpoint(s) that were needed. So each server would have the proper metadata loaded for it, and it would all be retrieved from the DB. No hardcoding this way, and there's no need to worry about external text files on the SQL server. It's all contained in the DB.

Noah