C# Class SonarQubeBootstrapper.Helpers.SqlConnectionExtensions

ファイルを表示 Open project: SonarQubeCommunity/sonarqube-windows-installer

Public Methods

Method Description
ChangeSqlUserDbRole ( this connection, string rolename, string username ) : bool

Changes role of the user for given database

Needs connection to sql server with a database

CreateNewSqlServerLogin ( this connection, string username, string password ) : bool

Creates a new sql server login that is used to create users in database

Needs connection to sql server only without specifying any database

CreateSqlServerDatabase ( this connection, string databaseName ) : bool

Creates a new sql database

Needs connection to sql server only without specifying any database

CreateSqlUserFromSqlLogin ( this connection, string username, string loginName ) : bool

Creates a new user for a database from a login

Needs connection to sql server with a database

Method Details

ChangeSqlUserDbRole() public static method

Changes role of the user for given database
Needs connection to sql server with a database
public static ChangeSqlUserDbRole ( this connection, string rolename, string username ) : bool
connection this
rolename string eg. db_owner
username string user name
return bool

CreateNewSqlServerLogin() public static method

Creates a new sql server login that is used to create users in database
Needs connection to sql server only without specifying any database
public static CreateNewSqlServerLogin ( this connection, string username, string password ) : bool
connection this
username string
password string
return bool

CreateSqlServerDatabase() public static method

Creates a new sql database
Needs connection to sql server only without specifying any database
public static CreateSqlServerDatabase ( this connection, string databaseName ) : bool
connection this
databaseName string
return bool

CreateSqlUserFromSqlLogin() public static method

Creates a new user for a database from a login
Needs connection to sql server with a database
public static CreateSqlUserFromSqlLogin ( this connection, string username, string loginName ) : bool
connection this
username string
loginName string
return bool