![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have several production servers where I have to rename the sybase instance(long story). Some on windows and some on unix. What would be the cleanest way to rename the servers? I'm thinking that I could bcp out the syslogins, sysloginroles, syssrvroles, sysusages, sysdevices, syssegments. For windows then I could use sybatch with a resource file to rename the server and then bcp data back in. For unix i could use srvbuildres and then bcp in the data. I haven't done anything like this before so any advise is welcome. Thanks, H |
#3
| |||
| |||
|
|
If you're referring to changing the dataserver names, it's a bit easier than what you've proposed. For sake of discussion we'll assume we want to rename OLD_DS (current dataserver name) to NEW_DS (new dataserver name). 0 - shutdown OLD_DS 1 - edit the RUNserver file to change all instances of OLD_DS to NEW_DS, this includes the references to the name of the dataserver, the name of the RUNserver file, the name of the errorlog and the name of the config file; alternatively, copy the old RUNserver file and edit it (ie, keep the old copy around, just in case) 2 - edit the interfaces/sql.ini file by changing OLD_DS to NEW_DS; alternatively, create a new entry called NEW_DS and leave OLD_DS in place, again, just in case you want to go back 3 - rename the dataserver's config file from OLD_DS.cfg to NEW_DS.cfg; alternatively keep a copy of OLD_DS.cfg, just in case you want to go back 4 - startup NEW_DS; check errorlog for any issues 5 - log into NEW_DS and rename the local server name; 'sp_dropserver OLD_DS', 'sp_addserver NEW_DS,local'; bounce NEW_DS and now @@servername should equal NEW_DS If you happen to have MDA tables installed and have the 'loopback' server defined to point at OLD_DS ... you'll want to drop and recreate the 'loopback' definition to point at NEW_DS. I think that covers all (?) of the required bases ... a few other items to consider ... --------------- If you happen to have your database devices defined with OLD_DS in the name (directory or file name), it's up to you if you want to change these references. This will require a) possibly changing the master device reference in the RUNserver file and b) updating master..sysdevices to refer to the new device names. This step is a little trickier ... doable, but requires some knowledge on how to properly update system tables; probably best to change device names in master..sysdevices, shutdown dataserver, rename devices, bring up dataserver. --------------- As for other server types (backupserver, monserver, histserver, xpserver, etc.), if they have OLD_DS in their names ... shutdown said server(s), modify the RUNserver files and interfaces entries, and start back up. monserver - make sure RUNserver file references the NEW_DS dataserver (and not the OLD_DS dataserver) backupserver - will have to log into NEW_DS, 'sp_dropserver SYB_BACKUP', 'sp_addserver SYB_BACKUP,null,<new_backupservername>' --------------- If OLD_DS (now NEW_DS) is part of a replication system you have a couple options ... drop and recreate the various connections for databases that reside in NEW_DS ... or do some research on what config files and RSSD tables need to be patched (ie, change references to OLD_DS to now reference NEW_DS). --------------- If you have any proxies references in other databases (that reference OLD_DS), you'll have to either a) drop/recreate said proxies, or b) update the appropriate system tables. Same goes for external logins that currently point at OLD_DS ... need to change them (drop/recreate?) to point at NEW_DS. --------------- Last (?) but not least, if you have OLD_DS hardcoded in any database objects (view names, stored procs, etc.), you need to manually change these, too ... most likely via drop/recreate. NOTE: Name changes aren't important ... what will be important is any reference to OLD_DS that actually affects connectivity (eg, remote procedure calls, etc.). --------------- Obviously (?) try this process on a development dataserver first; make sure you (I?) didn't forget anything. harki.rehal (AT) gmail (DOT) com wrote: Hi, I have several production servers where I have to rename the sybase instance(long story). Some on windows and some on unix. What would be the cleanest way to rename the servers? I'm thinking that I could bcp out the syslogins, sysloginroles, syssrvroles, sysusages, sysdevices, syssegments. For windows then I could use sybatch with a resource file to rename the server and then bcp data back in. For unix i could use srvbuildres and then bcp in the data. I haven't done anything like this before so any advise is welcome. Thanks, H |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Mark, Every thing you said makes sense. But on windows how would the registry entries get cleaned out? Thanks, Harki |
![]() |
| Thread Tools | |
| Display Modes | |
| |