Data Model > Accessing the UNICOM Intelligence Data Model > Working with the Case Data Model > Accessing case data from third party applications > Accessing case data from SQL Server > Using linked servers
 
Using linked servers
You can access the flat (VDATA) view of a UNICOM Intelligence data source by defining a linked server for that data source in SQL Server and then using the Transact-SQL OPENQUERY function to query the linked server. If your query will refer to more than one UNICOM Intelligence data source, you must create a separate linked server for each data source.
Is not possible to return category names instead of category values using the OPENQUERY function, because you cannot set the MR Init Category connection property (see Connection properties) when you define a linked server. If you need to return category names, see Using the OPENDATASOURCE function.
To define a linked server
1 For SQL Server, start SQL Server Management Studio.
2 In the Object Explorer pane on the left of the Management Studio window, open the Server Objects folder.
3 Right-click Linked Servers, and then click New Linked Server.
This opens the Linked Server Properties dialog box.
4 In the Linked server box, add a name for the linked server.
5 From the Provider name list, select UNICOM Intelligence DM-2 OLE DB Provider.
6 Complete the remaining boxes as required for your UNICOM Intelligence data source. If you are connecting to a UNICOM Intelligence Interviewer (RDB) data source, see Connecting to a relational MR database. If you are connecting to a non-RDB data source, see Connecting to case data with and without metadata.
For example, to connect to the The Short Drinks sample RDB database, enter these values:
Product name
UNICOM Intelligence
Provider string
mrOleDB.Provider.2
Catalog
[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Mdd\short_drinks.mdd
Because Data source and Location have not been specified, the default data source defined in the .mdd file will be used.
7 Click OK to add the linked server to the tree view.
See also
Accessing case data from SQL Server