|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 5,317,
Visits: 11,307
|
|
the developers are asking a lot of you there, the code should be flexible enough to cope with changes in server names for DR and migration from test to prod at least. Investigate using DNS aliases in their connection strings so these can just be repointed.
It is easier to change connection strings then rename servers.
---------------------------------------------------------------------
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 4:11 AM
Points: 1,474,
Visits: 2,344
|
|
george sibbald (3/6/2013) the developers are asking a lot of you there, the code should be flexible enough to cope with changes in server names for DR and migration from test to prod at least. Investigate using DNS aliases in their connection strings so these can just be repointed.
It is easier to change connection strings then rename servers.
+1
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 8:39 AM
Points: 1,059,
Visits: 2,263
|
|
We use dns aliases for this purpose. Although, we DO have some app folks that ping that name and find out the real name and use it. Frustrating when we move the server and their connections don't work.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 5,317,
Visits: 11,307
|
|
Markus (3/6/2013) We use dns aliases for this purpose. Although, we DO have some app folks that ping that name and find out the real name and use it. Frustrating when we move the server and their connections don't work.
Doh!
---------------------------------------------------------------------
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 1,639,
Visits: 2,843
|
|
Thanks all,
We have situation like this; We have 3 servers, for example they are named as SQL1, (dev)and SQL2(test), SQL3(prod). test and prod are same hardware and RAM. When doing upgrade we do on dev first and test everything, this include windows upgrade and sQL server new version, migrating dbs. Then we want to use the test box test1 to do the exactly the same thing but when done, we want switch this as a production server, then the old production server we will use as testing server.
In this case, we want to rename back for prod SQL3, and test SQL2. We can keep the servername as they are, the developrs need to change the connection string.
Situation 2 When doing virtual to virtual server copy, after that we need to rename the server name, for the cloned copy still has the original copy name.
But by reading this post answers, do you mean most DBA don't do renaming server much.
You tell developers to change their connection string. also you use alias name, it seems using alias name sometimes confusing too.
I really don't like to rename servers, because it leaves footprint of old computer name, that is why my original question raised.
What should I tell developers that renaming servers is harder than changing connection string in their code?
Thanks
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 5,317,
Visits: 11,307
|
|
I've not heard of anyone else changing server names and switching test and prod environments as part of an upgrade cycle. Keep prod as prod and test as test, then you won't have to change server names and devs won't have to change their code.
I can count the number of times I have changed a SQL server name on the thumbs of one hand.
There are a number of loose ends with changing a server name as you have already found, and I suspect to fully rename a server at the OS level you would have to go right down to the BIOS level.
Industry practice would be to put the flexibility in the connection strings, so keep it simple and push for that. You may be getting away with it now but start introducing complications like SSIS, SSRS, replication it will bite you sooner or later.
---------------------------------------------------------------------
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 1,639,
Visits: 2,843
|
|
george sibbald (3/6/2013) I've not heard of anyone else changing server names and switching test and prod environments as part of an upgrade cycle. Keep prod as prod and test as test, then you won't have to change server names and devs won't have to change their code.
I can count the number of times I have changed a SQL server name on the thumbs of one hand.
There are a number of loose ends with changing a server name as you have already found, and I suspect to fully rename a server at the OS level you would have to go right down to the BIOS level.
Industry practice would be to put the flexibility in the connection strings, so keep it simple and push for that. You may be getting away with it now but start introducing complications like SSIS, SSRS, replication it will bite you sooner or later.
Thanks,
For the switching prod and test server I mentioned above, because we only have those 3 servers, and this has to be a side by side upgrade, not in place upgrade, it also includs windows version upgrade.
I have to intall on test server first, then switch with the produciton box. Because we only have the 2 hardware available.
If I don't do that way, what else would you recommend?
Thanks
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 5,317,
Visits: 11,307
|
|
upgrade dev, test till you are happy
upgrade test, test until you are happy
upgrade prod. If its a virtual, take a snapshot before the upgrade as a quick backout.
You cannot be doing OS and SQL upgrades that often for this to be a problem?
---------------------------------------------------------------------
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 1,639,
Visits: 2,843
|
|
george sibbald (3/7/2013) upgrade dev, test till you are happy
upgrade test, test until you are happy
upgrade prod. If its a virtual, take a snapshot before the upgrade as a quick backout.
You cannot be doing OS and SQL upgrades that often for this to be a problem?
Only dev is virtual, both test and prod are physical.
Not sure I understand you:
You cannot be doing OS and SQL upgrades that often for this to be a problem?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:21 PM
Points: 5,317,
Visits: 11,307
|
|
Not sure I understand you: You cannot be doing OS and SQL upgrades that often for this to be a problem?
you mentioned OS upgrades and new sql server versions in an earlier post, surely these are rare? If you mean just patches these are too quick to apply to warrant this approach.
---------------------------------------------------------------------
|
|
|
|