Class SqlDatabaseCollection
- Namespace
- CENTREL.XIA.Configuration.Types
- Assembly
- CENTREL.XIA.Configuration.Types.dll
Represents a collection of SQL databases.
public class SqlDatabaseCollection : Collection<SqlDatabase>, IList<SqlDatabase>, ICollection<SqlDatabase>, IList, ICollection, IReadOnlyList<SqlDatabase>, IReadOnlyCollection<SqlDatabase>, IEnumerable<SqlDatabase>, IEnumerable
- Inheritance
-
SqlDatabaseCollection
- Implements
- Inherited Members
Constructors
SqlDatabaseCollection()
Initializes a new instance of the CENTREL.XIA.Configuration.Types.SqlDatabaseCollection class.
public SqlDatabaseCollection()
Methods
Exists(Guid)
Returns a System.Boolean value that indicates whether a zone with the specified identifier exists within the collection.
public bool Exists(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.MicrosoftDnsServerZone to locate.
Returns
- bool
A System.Boolean value that indicates whether a zone with the specified identifier exists within the collection.
FindAssembly(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlAssembly with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlAssembly with that identifier is found.
public SqlAssembly FindAssembly(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlAssembly to locate.
Returns
- SqlAssembly
The CENTREL.XIA.Configuration.Types.SqlAssembly with the specified identifier.
FindAsymmetricKey(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlAsymmetricKey with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlAsymmetricKey with that identifier is found.
public SqlAsymmetricKey FindAsymmetricKey(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlAsymmetricKey to locate.
Returns
- SqlAsymmetricKey
The CENTREL.XIA.Configuration.Types.SqlAsymmetricKey with the specified identifier.
FindAutoCloseDatabases()
Finds the databases that are configured to AUTO_CLOSE.
public SqlDatabaseCollection FindAutoCloseDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured to AUTO_CLOSE.
FindAutoCloseDatabases(bool)
Finds the databases that are configured to AUTO_CLOSE.
public SqlDatabaseCollection FindAutoCloseDatabases(bool containedOnly)
Parameters
containedOnlyboolDetermines whether only contained databases should be included.
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured to AUTO_CLOSE.
FindAutoCreateStatisticsDisabledDatabases()
Finds the databases that are configured with "Auto Create Statistics" (AUTO_CREATE_STATISTICS) disabled.
public SqlDatabaseCollection FindAutoCreateStatisticsDisabledDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured with "Auto Create Statistics" (AUTO_CREATE_STATISTICS) disabled.
FindAutoCreateStatisticsDisabledDatabases(bool)
Finds the databases that are configured with "Auto Create Statistics" (AUTO_CREATE_STATISTICS) disabled.
public SqlDatabaseCollection FindAutoCreateStatisticsDisabledDatabases(bool includeSystemDatabases)
Parameters
includeSystemDatabasesboolDetermines whether to include system databases
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured with "Auto Create Statistics" (AUTO_CREATE_STATISTICS) disabled.
FindAutoShrinkDatabases()
Finds the databases that are configured with AUTO_SHRINK set to "True".
public SqlDatabaseCollection FindAutoShrinkDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured to AUTO_SHRINK.
FindAutoShrinkDatabases(bool)
Finds the databases that are configured with AUTO_SHRINK set to "True".
public SqlDatabaseCollection FindAutoShrinkDatabases(bool includeSystemDatabases)
Parameters
includeSystemDatabasesboolDetermines whether to include system databases
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured to AUTO_SHRINK.
FindAutoUpdateStatisticsDisabledDatabases()
Finds the databases that are configured with "Auto Update Statistics" (AUTO_UPDATE_STATISTICS) disabled.
public SqlDatabaseCollection FindAutoUpdateStatisticsDisabledDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured with "Auto Create Statistics" (AUTO_UPDATE_STATISTICS) disabled.
FindAutoUpdateStatisticsDisabledDatabases(bool)
Finds the databases that are configured with "Auto Create Statistics" (AUTO_UPDATE_STATISTICS) disabled.
public SqlDatabaseCollection FindAutoUpdateStatisticsDisabledDatabases(bool includeSystemDatabases)
Parameters
includeSystemDatabasesboolDetermines whether to include system databases
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are configured with "Auto Create Statistics" (AUTO_UPDATE_STATISTICS) disabled.
FindByIdentifier(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlDatabase with the specified identifier, or null if no CENTREL.XIA.Configuration.Types.SqlDatabase with that identifier is found.
public SqlDatabase FindByIdentifier(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlDatabase to locate.
Returns
- SqlDatabase
The CENTREL.XIA.Configuration.Types.SqlDatabase with the specified identifier.
FindByName(string)
Returns the database with the specified name, or null if no database with that name is found.
public SqlDatabase FindByName(string name)
Parameters
namestringThe name of the database to locate.
Returns
- SqlDatabase
The database with the specified name.
FindByOwnerName(string)
Finds the databases that are owned by the owner with the specified name.
public SqlDatabaseCollection FindByOwnerName(string ownerName)
Parameters
ownerNamestringThe name of the owner for which the databases are to be found.
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are owned by the owner with the specified name.
FindByOwnerSid(string)
Finds the databases that are owned by the owner with the specified SID.
public SqlDatabaseCollection FindByOwnerSid(string ownerSid)
Parameters
ownerSidstringThe SID of the owner for which the databases are to be found.
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are owned by the owner with the specified SID.
FindByOwnerSid(string, bool)
Finds the databases that are owned by the owner with the specified SID.
public SqlDatabaseCollection FindByOwnerSid(string ownerSid, bool includeSystemDatabases)
Parameters
ownerSidstringThe SID of the owner for which the databases are to be found.
includeSystemDatabasesboolDetermines whether to include system databases
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are owned by the owner with the specified SID.
FindBySaOwner()
Finds the databases that are owned by built-in 'sa' account.
public SqlDatabaseCollection FindBySaOwner()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are owned by built-in 'sa' account.
FindBySaOwner(bool)
Finds the databases that are owned by built-in 'sa' account.
public SqlDatabaseCollection FindBySaOwner(bool includeSystemDatabases)
Parameters
includeSystemDatabasesboolDetermines whether to include system databases
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are owned by built-in 'sa' account.
FindByType(SqlDatabaseSearchType)
Finds the databases of the specified type.
public SqlDatabaseCollection FindByType(SqlDatabaseSearchType searchType)
Parameters
searchTypeSqlDatabaseSearchTypeThe type of database to find.
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases of the specified type.
FindCertificate(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlCertificate with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlCertificate with that identifier is found.
public SqlCertificate FindCertificate(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlCertificate to locate.
Returns
- SqlCertificate
The CENTREL.XIA.Configuration.Types.SqlCertificate with the specified identifier.
FindColumn(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlColumn with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlColumn with that identifier is found.
public SqlColumn FindColumn(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlColumn to locate.
Returns
- SqlColumn
The CENTREL.XIA.Configuration.Types.SqlColumn with the specified identifier.
FindContainedDatabases()
Finds the contained databases.
public SqlDatabaseCollection FindContainedDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the contained databases.
FindCrossDatabaseOwnershipChainingDatabases()
Finds the databases that have cross‑database ownership chaining enabled.
public SqlDatabaseCollection FindCrossDatabaseOwnershipChainingDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that have cross‑database ownership chaining enabled.
FindCrossDatabaseOwnershipChainingDatabases(bool)
Finds the databases that have cross‑database ownership chaining enabled.
public SqlDatabaseCollection FindCrossDatabaseOwnershipChainingDatabases(bool includeSystemDatabases)
Parameters
includeSystemDatabasesboolDetermines whether to include system databases
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that have cross‑database ownership chaining enabled.
FindForeignKey(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlForeignKey with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlForeignKey with that identifier is found.
public SqlForeignKey FindForeignKey(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlForeignKey to locate.
Returns
- SqlForeignKey
The CENTREL.XIA.Configuration.Types.SqlForeignKey with the specified identifier.
FindStoredProcedure(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlStoredProcedure with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlStoredProcedure with that identifier is found.
public SqlStoredProcedure FindStoredProcedure(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlStoredProcedure to locate.
Returns
- SqlStoredProcedure
The CENTREL.XIA.Configuration.Types.SqlStoredProcedure with the specified identifier.
FindStoredProcedures()
Finds the stored procedures in all databases.
public SqlStoredProcedureCollection FindStoredProcedures()
Returns
- SqlStoredProcedureCollection
A CENTREL.XIA.Configuration.Types.SqlStoredProcedureCollection containing stored procedures in all databases.
FindSymmetricKey(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlSymmetricKey with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlSymmetricKey with that identifier is found.
public SqlSymmetricKey FindSymmetricKey(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlSymmetricKey to locate.
Returns
- SqlSymmetricKey
The CENTREL.XIA.Configuration.Types.SqlSymmetricKey with the specified identifier.
FindTable(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlTable with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlTable with that identifier is found.
public SqlTable FindTable(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlTable to locate.
Returns
- SqlTable
The CENTREL.XIA.Configuration.Types.SqlTable with the specified identifier.
FindTables()
Finds the tables in all databases.
public SqlTableCollection FindTables()
Returns
- SqlTableCollection
A CENTREL.XIA.Configuration.Types.SqlTableCollection containing tables in all databases.
FindTrigger(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlTrigger with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlTrigger with that identifier is found.
public SqlTrigger FindTrigger(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlTrigger to locate.
Returns
- SqlTrigger
The CENTREL.XIA.Configuration.Types.SqlTrigger with the specified identifier.
FindTrustworthyDatabases()
Finds the databases that are marked as trustworthy.
public SqlDatabaseCollection FindTrustworthyDatabases()
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are marked as trustworthy.
FindTrustworthyDatabases(bool)
Finds the databases that are marked as trustworthy.
public SqlDatabaseCollection FindTrustworthyDatabases(bool excludeMsdb)
Parameters
excludeMsdbboolDetermines whether to exclude the MSDB database.
Returns
- SqlDatabaseCollection
A CENTREL.XIA.Configuration.Types.SqlDatabaseCollection containing the databases that are marked as trustworthy.
FindUser(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlDatabaseUser with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlDatabaseUser with that identifier is found.
public SqlDatabaseUser FindUser(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlDatabaseUser to locate.
Returns
- SqlDatabaseUser
The CENTREL.XIA.Configuration.Types.SqlDatabaseUser with the specified identifier.
FindUserDefinedFunction(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlUserDefinedFunction with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlUserDefinedFunction with that identifier is found.
public SqlUserDefinedFunction FindUserDefinedFunction(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlUserDefinedFunction to locate.
Returns
- SqlUserDefinedFunction
The CENTREL.XIA.Configuration.Types.SqlUserDefinedFunction with the specified identifier.
FindUserDefinedFunctions()
Finds the user defined functions in all databases.
public SqlUserDefinedFunctionCollection FindUserDefinedFunctions()
Returns
- SqlUserDefinedFunctionCollection
A CENTREL.XIA.Configuration.Types.SqlUserDefinedFunctionCollection containing user defined functions in all databases.
FindView(Guid)
Returns the CENTREL.XIA.Configuration.Types.SqlView with the specified identifier regardless of the database in which it resides, or null if no CENTREL.XIA.Configuration.Types.SqlView with that identifier is found.
public SqlView FindView(Guid identifier)
Parameters
identifierGuidThe identifier of the CENTREL.XIA.Configuration.Types.SqlView to locate.
Returns
- SqlView
The CENTREL.XIA.Configuration.Types.SqlView with the specified identifier.
FindViews()
Finds the views in all databases.
public SqlViewCollection FindViews()
Returns
- SqlViewCollection
A CENTREL.XIA.Configuration.Types.SqlViewCollection containing views in all databases.
Sort()
Sorts the values in the collection.
public void Sort()
ToDatabaseNames()
Converts the databases in the collection to a CENTREL.Support.SerializableStringCollection containing the database names.
public SerializableStringCollection ToDatabaseNames()
Returns
- SerializableStringCollection
A CENTREL.Support.SerializableStringCollection containing the names of the databases in the collection.