Export (0) Print
Expand All

SPDatabase Members

Windows SharePoint Services 3

Encapsulates access to Microsoft SQL Server databases.

The SPDatabase type exposes the following members.

  NameDescription
Public method SPDatabase() Reserved for internal use.
Public method SPDatabase(String, SPDatabaseServiceInstance) Initializes a new instance of the SPDatabase class based on the specified name and instance.
Top

  NameDescription
Public property CanRenameOnRestore Gets a Boolean value that indicates whether the database can be renamed when it is restored.
Public property CanSelectForBackup Gets or sets a Boolean value that specifies whether the database object and its children can be selected for a backup operation in the Central Administration user interface.
Public property CanSelectForRestore Gets or sets a Boolean value that specifies whether this object and its children can be selected for a restore operation in the Central Administration user interface.
Public property CanUpgrade Gets a value that indicates whether the object can be upgraded. (Inherited from SPPersistedUpgradableObject.)
Public property DatabaseConnectionString Gets the connection string that is used to connect to the database.
Public property DiskSizeRequired Gets the amount of disk space that is required for a backup.
Public property DisplayName Gets the display name that describes the persisted object instance within the administrative user interface. (Inherited from SPPersistedObject.)
Public property Exists Gets a Boolean value that indicates whether the database exists.
Public property Farm Gets the server farm where the object lives. (Inherited from SPPersistedObject.)
Public property Id Gets or sets the GUID that is associated with the object. (Inherited from SPPersistedObject.)
Public property IsReadOnly
Public property Name Gets or sets the name that identifies a particular instance of the object. (Inherited from SPPersistedObject.)
Public property NeedsUpgrade Gets or sets a Boolean value that specifies whether the object needs to be upgraded. (Inherited from SPPersistedUpgradableObject.)
Public property NeedsUpgradeIncludeChildren Gets a Boolean value that indicates whether the object should be upgraded, considering the children of the object. (Inherited from SPPersistedUpgradableObject.)
Public property Parent Gets the ID of the parent class that declares the object. (Inherited from SPPersistedObject.)
Public property Password Gets or sets the password that is used for SQL authentication.
Public property Properties Gets a property bag that is used to store properties for the persisted object. (Inherited from SPPersistedObject.)
Public property Server Gets the server that contains the database.
Public property ServiceInstance Gets an instance of the SQL service that owns the database.
Public property Status Gets or sets the status of the object that the class represents. (Inherited from SPPersistedObject.)
Public property TypeName Gets the display name that describes the object type in the administrative user interface. (Inherited from SPPersistedObject.)
Public property UpgradeContext Gets additional upgrade context. (Inherited from SPPersistedUpgradableObject.)
Public property UpgradedPersistedProperties Gets the collection of field names and values for fields that were deleted or changed. (Inherited from SPAutoSerializingObject.)
Public property Username Gets or sets the user name that is used for SQL authentication login.
Public property Version Gets the time that the object was last updated. (Inherited from SPPersistedObject.)
Top

  NameDescription
Public method AddBackupObjects Adds the database and its children to the backup/restore job. This method implements the AddBackupObjects method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method ChangeDatabaseInstance Modifies the specified database service instance for each connection string that is used to access the database.
Public method Clone Returns a clone of the object that does not come from the in-memory cache, which enables calling code to help ensure thread safety. (Inherited from SPPersistedObject.)
Public method Delete Removes the object from the collection and the server farm. (Inherited from SPPersistedObject.)
Public method Equals Determines whether the current persisted object equals the specified object. (Inherited from SPPersistedObject.)
Protected method Finalize (Inherited from Object.)
Public method Static member GenerateConnectionStringForProvisioning Creates a connection string that is used in provisioning based on a specified connection string.
Public method Static member GenerateRandomName Generates a random database name using the specified connection string as a starting point.
Public method GetChild<T>() Returns the child of the persisted object based on the specified type. (Inherited from SPPersistedObject.)
Public method GetChild<T>(String) Returns the child object of the persisted object based on the specified name. (Inherited from SPPersistedObject.)
Public method GetHashCode Serves as a hash function for the persisted object. (Inherited from SPPersistedObject.)
Public method GetObjectData Retrieves the data required to serialize the object. (Inherited from SPAutoSerializingObject.)
Public method GetType (Inherited from Object.)
Public method Invalidate Invalidates computed property values of the IUpgradable interface. (Inherited from SPPersistedUpgradableObject.)
Protected method MemberwiseClone (Inherited from Object.)
Public method OnAbort Called when the backup terminates unexpectedly. This method implements the OnAbort method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method OnBackup Called when the database is being backed up. This method implements the OnBackup method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method OnBackupComplete Called after the backup has completed. This method implements the OnBackupComplete method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Protected method OnDeserialization Called immediately after the base class deserializes itself to do additional work. (Inherited from SPPersistedObject.)
Public method OnPostRestore Called after the restore has completed. This method implements the OnPostRestore method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method OnPrepareBackup Called before the backup begins. This method implements the OnPrepareBackup method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method OnPreRestore Called before the restore begins. This method implements the OnPreRestore method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method OnRestore Called when the database is being restored. This method implements the OnRestore method that is defined in the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface. The SPDatabase class can be backed up and restored and must therefore implement the Microsoft.SharePoint.Administration.Backup.IBackupRestore interface, but this method is only intended to be callable from catastrophic backup and restore infrastructure code in Windows SharePoint Services.
Public method Provision() Makes the necessary changes to the local server to use the object. (Inherited from SPPersistedObject.)
Protected method Static member Provision(SqlConnectionStringBuilder, String, Dictionary<String, Boolean>) Creates a SQL Server database with a user schema.
Protected method Static member Provision(String, String, Dictionary<String, Boolean>) Creates a Microsoft SQL Server database with a user schema, creating the schema if necessary.
Public method ToString Returns the type and name of an object and of all its ancestors (parent, grandparent, and so on). (Inherited from SPPersistedObject.)
Public method Uncache Frees the memory cache that is used by the object. (Inherited from SPPersistedObject.)
Public method Unprovision Makes the necessary changes to the local server to clean up after deleting the database. (Overrides SPPersistedObject.Unprovision().)
Public method Update() Causes the database to save its state and propagate changes to all the computers in the server farm. (Overrides SPPersistedObject.Update().)
Public method Update(Boolean) Causes the object to save its state and propagate changes to all the computers in the server farm based on a Boolean value that specifies whether to raise an exception if the object already exists. (Inherited from SPPersistedObject.)
Protected method UpdateParent Causes the containing SPPersistedObject, if one exists, to update its state. (Inherited from SPAutoSerializingObject.)
Public method Upgrade() Upgrades the object. (Inherited from SPPersistedUpgradableObject.)
Public method Upgrade(Boolean) Upgrades the object, and if a Boolean parameter equals true, recursively upgrades all descendants of the current object. (Inherited from SPPersistedUpgradableObject.)
Protected method Validate Validates the state of all fields before persisting the object. (Inherited from SPPersistedObject.)
Top

  NameDescription
Protected field Static member SqlDatabaseOption Specifies SQL database options that are used in Transact-SQL statements.
Top

Community Additions

ADD
Show:
© 2014 Microsoft