Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 2.11 KB

sp-syscollector-set-warehouse-database-name-transact-sql.md

File metadata and controls

68 lines (48 loc) · 2.11 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_syscollector_set_warehouse_database_name (Transact-SQL)
Specifies the database name defined in the connection string used to connect to the management data warehouse.
markingmyname
maghan
randolphwest
07/04/2023
sql
system-objects
reference
sp_syscollector_set_warehouse_database_name
sp_syscollector_set_warehouse_database_name_TSQL
sp_syscollector_set_warehouse_database_name
data collector [SQL Server], stored procedures
TSQL

sp_syscollector_set_warehouse_database_name (Transact-SQL)

[!INCLUDE SQL Server]

Specifies the database name defined in 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

Syntax

sp_syscollector_set_warehouse_database_name [ [ @database_name = ] N'database_name' ]
[ ; ]

Arguments

[ @database_name = ] N'database_name'

The name of the management data warehouse. @database_name is sysname, with a default of an empty string.

Return code values

0 (success) or 1 (failure).

Remarks

You must disable the data collector before changing the data collector-wide configuration. This procedure fails if the data collector is enabled.

To view the current database name, query the syscollector_config_store system view.

Permissions

Requires membership in the dc_admin (with EXECUTE permission) fixed database role to execute this procedure.

Examples

The following example sets the name of the management data warehouse to RemoteMDW.

USE msdb;
GO
EXEC sp_syscollector_set_warehouse_database_name N'RemoteMDW';
GO

Related content