| title | sp_syscollector_set_warehouse_instance_name (Transact-SQL) | ||
|---|---|---|---|
| description | Specifies the instance name for the connection string used to connect to the management data warehouse. | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| ms.reviewer | randolphwest | ||
| ms.date | 06/23/2025 | ||
| ms.service | sql | ||
| ms.subservice | system-objects | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
[!INCLUDE SQL Server]
Specifies the instance name for the connection string used to connect to the management data warehouse.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_syscollector_set_warehouse_instance_name [ [ @instance_name = ] N'instance_name' ]
[ ; ]
The instance name. @instance_name is sysname, and defaults to the local instance if NULL.
@instance_name must be the fully qualified instance name, which consists of the computer name and the instance name in the form <computerName>\<instanceName>.
0 (success) or 1 (failure).
You must disable the data collector before changing this data collector-wide configuration. This procedure fails if the data collector is enabled.
To view the current instance name, query the syscollector_config_store system view.
Requires membership in the dc_admin (with EXECUTE permission) fixed database role to execute this procedure.
The following example illustrates how to configure the data collector to use a management data warehouse instance on a remote server. In this example, the remote server is named RemoteSERVER and the database is installed on the default instance.
USE msdb;
GO
EXECUTE sp_syscollector_set_warehouse_instance_name N'RemoteSERVER'; -- the default instance is assumed on the remote server
GO