How to use the SQL import utility |
The SQL Import utility allows you to import data from a Microsoft SQL Server database as new documents into Kentico CMS content repository. If your source data is in a different format, you may need to import them to some Microsoft SQL Server database using Microsoft SQL Server tools.
Before you run the SQL Import utility, you need to configure its parameters. The utility is stored in folder <Kentico CMS installation in Program Files>\SQLImport. Open the SQLImport.exe.config file and set the following values:
Now you can start the import utility using SQLImport.exe. The import wizard starts:
Click Next. Select the target web site:
Click Next. Select the target content culture:
Click Next. Enter the SQL query that will return the data to be imported from the source database:
Click Next. Select the type of the imported documents.
Click Next. Map the source and target fields and check the fields that should be imported. You can add the source fields manually multiple times if you need to import one source field into several target fields.
If the source field contains the path to the file, check the box Import file. In this case, the source field must contain a relative path to the path in the ImportFilesDiskPath web.config parameter - both values are joined and the file is imported from the specified location.
Click Next. Select the field that will be used for the name of the document:
Click Next. Select the target alias path where the documents should be imported:
Click Next. Review the import settings:
Now the data is imported into Kentico CMS database.
|