Changing Server Name and Database Name

Posts   
 
    
tippy
User
Posts: 35
Joined: 29-Jun-2016
# Posted on: 11-Oct-2016 09:21:54   

I have to move the database to the new server and also rename the database name.

for example, Original: Server Name: melya Database name: cds1

New: Server Name: melyb Database name: cds2

I have LLBL project set up for LLBL Gen 5. when I am trying to Sync Relational Model Data > Perform Tasks > change the server name to "melyb". > new database name shown > select the database "cds2"

All tables/storedproc/functions selected by default.

Is there anyway I don't have to re-select them again? I just want to have the same selection as I did before the database name changed.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 11-Oct-2016 19:36:21   

Could you please try editing the LLBLGenProj file in notepad or an XML Editor? Change the ServerName and Catalog Name under Catalogs.

<ConnectionElements>
        <ConnectionElement Name="ServerName" Value=".\SQLExpress" />
.
.
.
<Catalogs>
        <Catalog Name="NORTHWND">
tippy
User
Posts: 35
Joined: 29-Jun-2016
# Posted on: 12-Oct-2016 01:40:53   

thanks. It works! Also I have to update the catalog name in the elements mapping , for example, <EntityMapping>, <TypedViewMapping>, <SPCallMapping> etc

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 12-Oct-2016 18:55:38   

Indeed.

Wavel
User
Posts: 8
Joined: 11-Sep-2017
# Posted on: 10-Apr-2018 20:23:12   

Is there a way to rename the server name/database name for all elements at once? I too had to move the database to a different server, but now I've got hundreds of elements to rename the target... ugh.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 10-Apr-2018 20:42:36   

Wavel wrote:

Is there a way to rename the server name/database name for all elements at once? I too had to move the database to a different server, but now I've got hundreds of elements to rename the target... ugh.

In the llblgen pro project: right click the database in catalog explorer -> Rename

in the generated code using llblgen pro runtime framework: use catalog name overwriting: https://www.llblgen.com/Documentation/5.3/LLBLGen%20Pro%20RTF/Using%20the%20generated%20code/gencode_applicationconfiguration.htm#catalog-name-overwriting-sql-server-mysql

Frans Bouma | Lead developer LLBLGen Pro