< Back

Install-DBHistory

Mon Jan 13, 2020 4:04 am

NAME Install-DBHistory



SYNOPSIS

Adds a SQL Server to DBHistory.com monitoring.





SYNTAX

Install-DBHistory [-ServerName] <string> [-CertificateName <string>] [-CertificateSubject <string>]

[-DatabaseMasterKeyPassword <string>] [-DBHistoryAPI <string>] [-DBHistoryCredential <PSCredential>]

[-DBHistoryRouteAddress <string>] [-DBHistoryUserName <string>] [-DBHistoryUserPassword <string>] [-EndpointName

<string>] [-EventNotificationName <string>] [-GAOptOut <bool>] [-ListenerIP <string>] [-ListenerPort <ushort>]

[-ServiceRouteName <string>] [-SQLUserCredential <PSCredential>] [-SQLUserName <string>] [-SQLUserPassword

<string>] [<CommonParameters>]





DESCRIPTION

Configures a SQL Server instance to be monitored by DBHistory.com. This cmdlet is idempotent and can be run

repeatedly.





PARAMETERS

-ServerName <string>

The SQL Server your are adding to DBHistory.com. You must have CONTROL SERVER permission on the SQL Server

instance.



Use ".", "local" or "localhost" to connect to a local default instance.



Use "machine_name" to connect to an default instance.



Use "machine_name"\\"instance_name" to connect to a named instance.



The SQL Server must be able to connect TCP outbound to DBHistory.com on port 4022.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DBHistoryUserName <string>

The user name for your DBHistory.com account.



If you ommit this parameter and don't provide an alternate DBUserCredential, the cmdlet will prompt for user

name.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DBHistoryUserPassword <string>

The password you use on DBHistory.com.



If you ommit this parameter and don't provide an alternate DBUserCredential, the cmdlet will prompt for

password.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DBHistoryCredential <PSCredential>

Credentials used for DBHistory.com.



Use this as an alternative to DBHistoryUserName/DBHistoryUserPassword.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SQLUserName <string>

The SQL Server login name if you do not want to use integrated authentication.



This parmeter is optional, if omitted then the cmdlet will use integrated authentication to connect to SQL

Server.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SQLUserPassword <string>

The SQL Server login password if you do not want to use integrated authentication.



This parmeter is optional, if omitted then the cmdlet will use integrated authentication to connect to SQL

Server.



You can use SQLUserCredential parameter as an alternative for providing SQL user password as a clear text

parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SQLUserCredential <PSCredential>

The SQL Server login credentials if you do not use integrated authentication.



This parmeter is optional, if omitted then the cmdlet will use integrated authentication to connect to SQL

Server.



This parameter is an alternative for providing SQL user password as a clear text.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ListenerIP <string>

SQL Server Service Broker Endpoint listener IP.



This parameter is optional. If omitted then the default listener IP will be used.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ListenerPort <ushort>

SQL Server Service Broker Endpoint listener port.



This parameter is optional. If omitted then the default listener port will be used.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-CertificateName <string>

Name of the certificate used by SQL Server Service Broker.



This parameter is optional. If omitted then the certificate will be given the same name the SQL Server.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CertificateSubject <string>

Subject of the certificate used by SQL Server Service Broker.



This parameter is optional. If omitted then the certificate will be given the same subject as the SQL Server

name.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EndpointName <string>

SQL Service Broker Endpoint name.



This parameter is optional. If omitted the name service_broker_endpoint will be used.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EventNotificationName <string>

SQL Server Event Notification name used by DBHistory monitoring.



This parameter is optional. If omitted the name used will bd DBHistory.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ServiceRouteName <string>

Service Broker route name in msdb database for DBHistory.com service.



This parameter is optional. If omitted the name used will be DBHistory.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DBHistoryRouteAddress <string>

DBHistory.com Service Broker routing address for your account.



This parameter is only used for testing.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DBHistoryAPI <string>

DBHistory.com HTTP REST Service API address.



This parameter is only used for testing.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DatabaseMasterKeyPassword <string>

master database master key password.



This parameter is only needed if the cmdlet needs to create a database master key password in master database.

If a database master key password already exists in master database then this parameter is ignored, even if

provided.



If you do not provide a database master password and one is needed, this cmdlet will prompt for a password.



If a new database master key password is created by this cmdlet you will need to remember this password for

normal database cryptography related operations. Do not forget the password you provided.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GAOptOut <bool>

Opt out of application analytics



Do not collect and report anonymized usage information.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



---------- EXAMPLE 1 ----------



Install-DBHistory -ServerName . -DBHistoryUserName you@example.com -DBHistoryUserPassword secret



Adds the localhost default SQL Server instance to DBHistory.com monitoring on the account associated with

you@example.com. Uses Integrated Authentication to connect to SQL Server.

---------- EXAMPLE 2 ----------



Install-DBHistory -ServerName MACHINE02\\SQLEXPRESS `

-DBHistoryUserName you@example.com `

-DBHistoryUserPassword secret `

-SQLUserName sqllogin `

-SQLUserPassword sqlpassword `

-DatabaseMasterKeyPassword masterkeypassword



Adds the SQL Server named instance named SQLEXPRESS from the machine MACHINE02 to DBHistory.com monitoring on the

account associated with you@example.com. Connects to SQL Server using SQL Authentication with the login name

'sqllogin' and password 'sqlpassword'. The database master key in master database is created with the password

'masterkeypassword'. This example uses the PowerShell back-tick ` line continuation escape to split each parameter

on a new line for clarity, but this is not required.



RELATED LINKS

DBHistory.com http://dbhistory.com