New-DevartSQLDatabaseConnection

Synopsis

Builds a connection object to a database.

Description

Returns the DevartDatabaseConnectionInfo object.

Syntax

New-DevartSqlDatabaseConnection [-Server] <string> [-Database] <string> [[-UserName] <string>] [[-Password] <string>] 
[[-WindowsAuthentication] <SwitchParameter>] [[-ConnectionTimeout] <int>] [<CommonParameters>]

Parameters

-Server <string>

Name or network address of the SQL Server instance to connect to.

Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false

-Database <string>

Database to connect to on the server specified in Server parameter.

Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false

-UserName <string>

User name for the SQL Server account that cmdlets will use to connect to the database.

Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false

-Password <string>

Password for the SQL Server account that cmdlets will use to connect to the database.

Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false

-WindowsAuthentication <SwitchParameter>

Allows a user to connect through a Windows user account to a server.

Required? false

Position? 5

Default value False

Accept pipeline input? false

Accept wildcard characters? false

-ConnectionTimeout <int>

The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.

Required? false

Position? 6

Default value 15

Accept pipeline input? false

Accept wildcard characters? false

<CommonParameters>

This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, InformationAction, InformationVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.

Outputs

Devart.DbForge.DevOpsAutomation.SqlServer.DevartDatabaseConnectionInfo

Examples

---------- EXAMPLE 1 ----------
$connection = New-DevartSqlDatabaseConnection -Server $serverName -Database $database -UserName $userName -Password $password

See web documentation for a default values for the parameters.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge DevOps Automation for SQL Server.
Request a demo

Request a demo

If you consider employing the DevOps Automation for your business, request a demo to see it in action.
Ready to start using dbForge DevOps Automation for SQL Server?