I'm not sure if this gets at what you are having trouble with, but you haven't gotten a reply, so I'll give it a go. First, changing the name of your sde connection will generally not change the data sources for the items in your table of contents. The connection name is just a name and can be changed to whatever you want just like the layers in the table of contents can be called whatever you want regardless of the actual name of the data. However, if you add another connection to a different SDE database, then manually go to each layer 'properties' and set the data source, it should change it- but of course that is pretty cumbersome.
One way to change the data sources for all your layers in bulk is to use arcCatalogue, right-click on your .mxd, and select "Set Data Source(s)..." The rest of the process is pretty obvious once you get there- you can highlight just one of the layers or highlight all of them to change them. The .mxd will carry this connection information with it.
Another approach is to stop serving your old versions of the database (a good practice anyway to prevent confusion like this...), open the .mxd which will create red exclamation points on all the layers that were using the old data source, right-click one of them and select "Repair Data Source". Then navigate to the correct source. It should then automatically correct all of them that failed if it can find equivalent feature classes at the new source. The new source info will then be carried in the .mxd.
I hope this is helpful- forgive me if I misunderstood your question or told you things you already know!
If you're working on making this happen with a script, I'd like to see it when you're done!