after changing the virtual server in WSP, you’ll notice that existing customers still point to the ‘old’ sql server when creating and deleting databases.
New users will start using the new sql server immediately.
This is because the entries in the websitepanel database bound to the wsp enterprise server are not updated.
To fix this do the following:
– take a backup of the sql database through WSP or management studio
– take a note of the sqldb name and sql username.
open up the sql management studio and open the websitepanel db
open up serviceproperties table and find the serviceid for the old and new sql server.
Note these down.
open up dbo.serviceitems table and check which packageid belongs to your database and to your database user ( this should always be the same one )
Let’s assume now this is ’14’ in our example.
Also note the serviceid that belongs to your sql database and dbuser. In our example this is ‘6’
open up dbo.packageservices and under packageid search the id noted down in the previous step ( which is the id corresponding to this specific customer ).
In this example we search the column packageid for the netry ’14’
when you find the corresponding entries with the correct packageid , look at the adjacent column ( Serviceid )
Replace the serviceid entry matching the old sql server ( this was ‘6’ ) with the new sql serviceid ( this is in our example ’15’ )
Now re-add a database under the customer with the same name as before and also create a new sql user with the same name ( and preferably pass ) as before.
You’ll notice the ip for sql has changed to the new sql server and the db is now created on the new sql server.
Restore the previous backup to the newly created database.
Adapt your website ( most likely the web.config file ) to have the connection string point to this new sql server and database. If the pass was changed, change the pass at this location as well.
Install-WindowsFeature Web-Server,NET-Framework-Core,NET-Framework-45-ASPNET,Web-Net-Ext,Web-Net-Ext45,Web-Asp-Net,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter