# Changing name of DB Server connection?

**URL:** <https://forum.servoy.com/t/changing-name-of-db-server-connection/8183>\
**Category:** Classic Servoy\
**Created:** [September 27, 2007, 11:03am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183 "2007-09-27T11:03:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Huber](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Robert\_Huber](https://forum.servoy.com/u/Robert_Huber)\
**Post date:** [September 27, 2007, 11:03am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/1 "2007-09-27T11:03:08Z")

</div>

Hi all

I would like to change the name of the DB Server connection. As this name is set in each form of the solution and the name changing doesn’t seem to update the name in the forms, I wonder if there is way to accomplish that consistently. If I have to do it by hand, what is the prefered order of changing the names (DB Server connection, then each form, …?)

Thanks and regards, Robert

Servoy Developer  
Version 3.5.1-build 514  
Java version 1.5.0\_07-87 (Mac OS X)

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [September 27, 2007, 11:07am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/2 "2007-09-27T11:07:14Z")

</div>

As far as I know you have to do it by hand.

Calculations are pretty easy, you are notified at the beginning.

Forms would be the second project I guess.

BTW you can find out where your dbconnection is used pretty easily with the Analyzer ![:)]( "Smile")  
Never thought about a dbconnection renaming thing but that sure is doable…

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [September 27, 2007, 11:33am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/3 "2007-09-27T11:33:59Z")

</div>

Hi Robert,

This is quick and easy.

Open the repository from Servoy Developer, there you can change any reference to a DB Server connection to any other DB Server connection. You can also change the name of tables.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [September 27, 2007, 11:39am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/4 "2007-09-27T11:39:51Z")

</div>

oops, forgot about that (I work with 2.2.7 for my samples, should ceise that)…

---

<div class="post-metadata">

**Author:** ![Robert\_Huber](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Robert\_Huber](https://forum.servoy.com/u/Robert_Huber)\
**Post date:** [September 27, 2007, 12:24pm UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/5 "2007-09-27T12:24:52Z")

</div>

Hi Christian

Very handy, thanks!

Regards, Robert

> swingman:  
> Hi Robert,
> 
> This is quick and easy.
> 
> Open the repository from Servoy Developer, there you can change any reference to a DB Server connection to any other DB Server connection. You can also change the name of tables.
> 
> Hope this helps,

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [September 27, 2007, 1:28pm UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/6 "2007-09-27T13:28:04Z")

</div>

> oops, forgot about that (I work with 2.2.7 for my samples, should ceise that)…

This also works in 2.2.7… It’s called “Replace table”, I think.

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [September 27, 2007, 2:36pm UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/7 "2007-09-27T14:36:27Z")

</div>

but watch out!  
you will use loose ALL your Auto ENTER data!!  
(custom value, related lookup value, etc…)

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [September 27, 2007, 3:14pm UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/8 "2007-09-27T15:14:43Z")

</div>

nice tip !

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [September 27, 2007, 6:40pm UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/9 "2007-09-27T18:40:29Z")

</div>

![:lol:]( "Laughing")

that’s why I never have used this function! ![:wink:]( "Wink")

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [September 27, 2007, 8:18pm UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/10 "2007-09-27T20:18:47Z")

</div>

Well, if your solution is really big and u don’t want to go trough all the forms, etc you can consider to use databaseManager.switchServer(sourceName, destinationName) in your startup method.  
One line of code and you’re done ![;)]( "Wink")

---

<div class="post-metadata">

**Author:** ![Robert\_Huber](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Robert\_Huber](https://forum.servoy.com/u/Robert_Huber)\
**Post date:** [September 28, 2007, 9:50am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/11 "2007-09-28T09:50:54Z")

</div>

Hi Harjo

Thanks for the hint! The Servoy Sequence setting doesn’t seem to be affected, i. e. doesn’t seem to loose the setting when changing the DB Server connection!?  
I am wondering what exactly gets lost (in Version 3.5.1)?  
Did you already report this bug in the Support System?

Best regards, Robert

> HJK:  
> but watch out!  
> you will use loose ALL your Auto ENTER data!!  
> (custom value, related lookup value, etc…)

---

<div class="post-metadata">

**Author:** ![erdione](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@erdione](https://forum.servoy.com/u/erdione)\
**Post date:** [September 29, 2007, 6:30am UTC](https://forum.servoy.com/t/changing-name-of-db-server-connection/8183/12 "2007-09-29T06:30:41Z")

</div>

Another easy way of changing server name in the whole solution:  
Go in the repository,  
Export your solution  
go to prferences db servers rename your server or create a new one and disable the old one.  
Exit servoy and reopen  
ReImport the solution, Servoy will ask you what is the new server for the solution (because it can’t find the previous one)  
Chose the new one  
Everything ok …
