All Knowledge Base information is stored in SQL Server database, so with that database, you can create the KB and build all again. You can also copy or duplicate a Knowledge Base in a new folder.
All that you need to do for creating a KB from an MDF, is just to select the mdf file in the "Open KB" dialog:
Steps to manually restore the KB or duplicate it in another folder#
Supposing you have the GX_KB_TEST.mdf and GX_KB_TEST.LDF files, and you want to open it as a KB with GeneXus, then you must follow these steps:
- Copy GX_KB_TEST.mdf and GX_KB_TEST.LDF files to a directory, like, for example, c:\Models\Test.
- Create an empty file called Test.gxw in C:\Models\Test.
- Create a text file named 'knowledgebase.connection'. Open it with notepad, and add the following text:
Make sure to change connection parameters accordingly to your local environment.
- Go to the SQL Server Management Studio, log in to SERVERNAME\SQLEXPRESS with integrated security (trusted connection) and Attach the MDF.
- You are ready. In GeneXus go to the File/Open/Open Knowledgebase dialog and select the C:\Models\Test\Test.gxw. Enjoy!
If you encounter any troubles, check Basic tips about Managing KBs using SQL Server.
Copying an mdf from another PC#
There is an easier way to create a Knowledge Base from an .mdf file, that only works when the .mdf file is brought from another PC. The following steps are not supposed to be used in order to duplicate a local KB to another folder in the same PC.
- Copy GX_KB_TEST.mdf file to a directory, like, for example, c:\Models\Test.
- In GeneXus go to the File/Open/Open Knowledgebase dialog and select the C:\Models\Test\GX_KB_TEST.mdf. Enjoy!