< Back

New-DevartSqlDatabaseConnection

Mon Jan 13, 2020 7:07 pm

NAME New-DevartSqlDatabaseConnection



SYNOPSIS

Build connection object to database.





SYNTAX

New-DevartSqlDatabaseConnection [-Server] <string> [-Database] <string> [[-UserName] <string>] [[-Password]

<string>] [[-WindowsAuthentication] <SwitchParameter>] [[-ConnectionTimeout] <int>] [<CommonParameters>]





DESCRIPTION

Returns DevartDatabaseConnectionInfo object.





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? 2

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 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

Devart.DbForge.DevOpsAutomation.SqlServer.DevartDatabaseConnectionInfo





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



$connection = New-DevartSqlDatabaseConnection -Server $serverName -Database $database -UserName $userName

-Password $password





RELATED LINKS

See web documentation for a default values for parameters. https://docs.microsoft.com/en-us/dotnet/api/system.data.

sqlclient.sqlconnection.connectionstring?view=netframework-4.7.2

Online help:

https://docs.devart.com/devops-automati ... ction.html