Recents
HowTo: Creating a KB From a .MDFOfficial Content

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:

Open KB from MDF

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:

  1. Copy GX_KB_TEST.mdf and GX_KB_TEST.LDF files to a directory, like, for example, c:\Models\Test.
  2. Create an empty file called Test.gxw in C:\Models\Test.
  3. Create a text file named 'knowledgebase.connection'. Open it with notepad, and add the following text:
<ConnectionInformation>
    <DBName>GX_KB_Test</DBName>
    <IntegratedSecurity>True</IntegratedSecurity>
    <ServerInstance>SERVERNAME\SQLEXPRESS</ServerInstance>
    <CreateDbInKbFolder>False</CreateDbInKbFolder>
</ConnectionInformation>

Make sure to change connection parameters accordingly to your local environment.

  1. Go to the SQL Server Management Studio, log in to SERVERNAME\SQLEXPRESS with integrated security (trusted connection) and Attach the MDF.
  2. 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.

  1. Copy GX_KB_TEST.mdf file to a directory, like, for example, c:\Models\Test.
  2. In GeneXus go to the File/Open/Open Knowledgebase dialog and select the C:\Models\Test\GX_KB_TEST.mdf. Enjoy! 






Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.