OracleDbaServices

Provides DBA services for Oracle

Namespace:
Inetdev.Data.Oracle.Dba
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
No
Inherits from:
System.Object

Constructors

OracleDbaServices

Default constructor

Signature:
public Void OracleDbaServices()

Properties

DataAccessAPI

Database comunication API.

Signature:
public IDbAccess DataAccessAPI { get; set; }

Formatter

Builder to construct database commands.

Signature:
public IDbFormatter Formatter { get; set; }

Methods

ChangeUserPasswordAsync

Changes a user password.

Signature:
public Task ChangeUserPasswordAsync(user)
Parameters
Name Type Summary
user User A User to change it's password.
Exceptions
Type Summary
ArgumentNullException Thrown when user is null.
ValidationException Thrown when the provided input is not valid to run this operation.
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

CreateRoleAsync

Creates a role.

Signature:
public Task CreateRoleAsync(name, identifiedBy)
Parameters
Name Type Summary
name String Name of the role to create.
identifiedBy String Password to identify the role by (optional).
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

CreateTablespaceAsync

Creates a tablespace.

Signature:
public Task CreateTablespaceAsync(tablespace)
Parameters
Name Type Summary
tablespace Tablespace Tablespace configuration.
Exceptions
Type Summary
ValidationException Thrown when tablespace contains an invalid configuration.
ArgumentNullException Thrown when tablespace is null.
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

CreateUserAsync

Creates a user (or schema).

Signature:
public Task CreateUserAsync(user)
Parameters
Name Type Summary
user User User configuration.
Exceptions
Type Summary
ValidationException Thrown when the configuration is not valid for user creation.
ArgumentNullException Thrown when user is null.
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

DropRoleAsync

Drops a role.

Signature:
public Task DropRoleAsync(name)
Parameters
Name Type Summary
name String Name of the role to drop.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

DropTablespaceAsync

Drops a tablespace including it's content and data files.

Signature:
public Task DropTablespaceAsync(name)
Parameters
Name Type Summary
name String Name of the tablespace to drop.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

DropUserAsync

Drops a user.

Signature:
public Task DropUserAsync(name)
Parameters
Name Type Summary
name String Name of the user to drop.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

ExistsRoleAsync

Checks if a role named name exists.

Signature:
public Task<Boolean> ExistsRoleAsync(name)
Returns

true is the role exists, otherwise false.

Parameters
Name Type Summary
name String Name of the role to check.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

ExistsTablespaceAsync

Checks if a tablespace named name exists.

Signature:
public Task<Boolean> ExistsTablespaceAsync(name)
Returns

true is the tablespace exists, otherwise false.

Parameters
Name Type Summary
name String Name of the tablespace to check.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

ExistsUserAsync

Checks if a user named name exists.

Signature:
public Task<Boolean> ExistsUserAsync(name)
Returns

true is the user exists, otherwise false.

Parameters
Name Type Summary
name String Name of the user to check.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when name is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.

GrantRoleToUserAsync

Grants the roleName to userName.

Signature:
public Task GrantRoleToUserAsync(roleName, userName)
Parameters
Name Type Summary
roleName String Role to grant.
userName String User to grant the role to.
Exceptions
Type Summary
SchemaManipulationException Thrown when an error occurs while manipulating the schema.
ArgumentNullOrEmptyException Thrown when roleName is null or empty.
ArgumentNullOrEmptyException Thrown when userName is null or empty.
MissingRequiredPropertyException Thrown when the object has not been correctly initialized.