C# Class Wix.SonarQube.SqlServerHelper

Afficher le fichier Open project: SonarQubeCommunity/sonarqube-windows-installer

Méthodes publiques

Méthode Description
CreateSqlConnectionWithSqlLogin ( string dataSource, string username, string password, string databaseName = null ) : SqlConnection

Creates sql connection object with sql login

CreateSqlConnectionWithWindowsLogin ( string dataSource, string databaseName = null ) : SqlConnection

Create SqlConnection object for windows authentication

IsSqlServerInstalled ( ) : bool

Checks if sql is already installed on the machine

TestSqlConnectionWithSqlServerLogin ( string dataSource, string username, string password ) : bool

Tries to connect to sql database with user provided credentials

TestSqlServerConnectionWithWindowsLogin ( string dataSource ) : bool

Tries to connect to sql database with windows login.

Private Methods

Méthode Description
CheckSqlServer ( RegistryKey instanceKey ) : bool

Method Details

CreateSqlConnectionWithSqlLogin() public static méthode

Creates sql connection object with sql login
public static CreateSqlConnectionWithSqlLogin ( string dataSource, string username, string password, string databaseName = null ) : SqlConnection
dataSource string
username string
password string
databaseName string
Résultat System.Data.SqlClient.SqlConnection

CreateSqlConnectionWithWindowsLogin() public static méthode

Create SqlConnection object for windows authentication
public static CreateSqlConnectionWithWindowsLogin ( string dataSource, string databaseName = null ) : SqlConnection
dataSource string
databaseName string
Résultat System.Data.SqlClient.SqlConnection

IsSqlServerInstalled() public static méthode

Checks if sql is already installed on the machine
public static IsSqlServerInstalled ( ) : bool
Résultat bool

TestSqlConnectionWithSqlServerLogin() public static méthode

Tries to connect to sql database with user provided credentials
public static TestSqlConnectionWithSqlServerLogin ( string dataSource, string username, string password ) : bool
dataSource string
username string
password string
Résultat bool

TestSqlServerConnectionWithWindowsLogin() public static méthode

Tries to connect to sql database with windows login.
public static TestSqlServerConnectionWithWindowsLogin ( string dataSource ) : bool
dataSource string
Résultat bool