Top > How to import data > Importing SQL Server data > To import data from a SQL Server query:

To import data from a SQL Server query:

  1. Go to the Data Management workspace > Import view.

  2. In the Tasks pane, click Import SQL Server Data. The Import Wizard opens.

  3. Choose a Template Definition. Even if you do not wish to create a new template, you can choose not to save the template at the end of the wiz­ard.

  4. Select an Error Handling option to determine whether the wizard should proceed or not when it encounters an error.

  5. Click Next. The Enter Database Information & Query page opens.

  6. Select the Database server name from the list of database servers found on the network. If a database server is new, it may not appear in the list. If your database server does not appear on the list, enter the name manually.

  7. Select the Database name from the list of databases found on the server or enter the name manually.

  8. Click Test Connection to ensure that the management pack can connect to the database.

  9. Enter the SQL Server query in the Query Definition field. The SQL query is saved with the template if you choose to save it.

  10. Click Next. The Source Preview page opens. The preview lets you deter­mine whether the query and connection details return the results you expect. Click Previous if you need to change the database or your query.

  11. Click Next to map the data retrieved from the database to an object and its properties.

  12. Continue with Creating and configuring objects.