How to change application server database in k2 blackperl application?

1.9k Views Asked by At

I have K2 blackpearl application which have 2 databases: 1 is k2 database i.e. product database and another is the application database for keeping application data. I am not aware how the application database was configured, but I want to change the application database location to some different serer.

I have already checked smartobject tester and hostserver configuration.

Any idea where i can make connection string changes for this?

3

There are 3 best solutions below

0
On

To do this you need to run the K2 setup tool - you can access it from the start menu. You just need to run through the wizard (which will be pre-populated with your existing settings), and update the K2 database settings when you get to it.

0
On

If your K2 application uses SQL Server as a data source then it most likely uses SQL Server Service broker for this type of integration. If you are new to K2 you have the following logical hierarchy:

  • Service Type
  • Service Broker
  • Service Instance
  • SmartObjects

Service Broker it is something that allows you to connect to external system (SQL Server in your case) and Service Instance represents instance of this system accessible to K2 (SQL Server database) based on which you can create SmartObjects - representations of objects within external system with which K2 can interact (SQL tables, stored procedures etc. in your case).

I hope from description above it is clear that your app DB connection string lives at Service Instance level. To adjust it you have to do the following:

1) Run SmartObjects Services Tester (default location: "C:\Program Files (x86)\K2 blackpearl\Bin\SmartObject Service Tester.exe")

2) Expand SQL Server Service category and select service instance corresponding to your app database. It should be clear from name (if naming conventions were followed when it was created), but if not just edit its properties - there you will see Database and Server properties corresponding to SQL database name and SQL Server name respectively.

3) Once you located right service instance just edit its properties adjusting server and database name. Here how it looks like:

enter image description here

If necessary refer to @Dragan Panjkov answer or documentation I mentioned above for information about additional settings you may need to adjust.

0
On

If your "Application Data" contains LOB data and is used in your custom solution, you need to perform the following to change it to different server:

  1. Backup that database
  2. Restore it to different server
  3. Edit configuration of Service Instance (SQL Service Instance) corresponding for that database according to that different server configuration. Usually, it is required to change "Server Name", "Use Native SQL Execution" and "On Different Server" properties on that service instance. You can perform these changes using K2 Management site or SmartObject Service Tester Tool