Skip to main content

MSSqlLocalDBApi Members

Provides helper methods allowing you to manage the SQL Server Express LocalDB instances.

Constructors

Name Description
MSSqlLocalDBApi() Initializes a new instance of the MSSqlLocalDBApi class.
MSSqlLocalDBApi(String) Initializes a new instance of the MSSqlLocalDBApi class with the specified LocalDBInstance.dll file location.

Fields

Name Description
LOCALDB_MAX_SQLCONNECTION_BUFFER_SIZE Gets the buffer size to store a LocalDB connection string (260, by default).
MAX_LOCALDB_INSTANCE_NAME_LENGTH Gets the maximum LocalDB instance name length (43, by default).
MAX_LOCALDB_VERSION_LENGTH Gets the maximum length of the LocalDB version (43, by default).
MAX_STRING_SID_LENGTH Gets the maximum length of the security identifier (186, by default).

Methods

Name Description
CheckHandler() Throws an ObjectDisposedException if the LocalDBInstance.dll handle is IntPtr.Zero.
CreateInstance(String, String) Creates a new SQL Server Express LocalDB instance.
DeleteInstance(String) Deletes the specified LocalDB instance.
Dispose() Disposes the MSSqlLocalDBApi instance.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetInstanceInfo(String) Returns information for the specified SQL Server Express LocalDB instance.
GetInstances() Returns the names of all SQL Server Express LocalDB instances.
GetType() Gets the Type of the current instance. Inherited from Object.
GetVersionInfo(String) Returns information for the specified SQL Server Express LocalDB version.
GetVersions() Returns all SQL Server Express LocalDB versions installed.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
ShareInstance(SecurityIdentifier, String, String) Shares the specified SQL Server Express LocalDB instance with other users with the specified shared name.
StartInstance(String, out String) Starts the specified SQL Server Express LocalDB instance.
StartTracing() Starts tracing API calls for all the SQL Server Express LocalDB instances that belong to the current system user.
StopInstance(String, MSSqlLocalDBShutdownFlags, Int64) Stops the specified SQL Server Express LocalDB instance from running.
StopTracing() Stops tracing API calls for all the SQL Server Express LocalDB instances that belong to the current system user.
ToString() Returns a string that represents the current object. Inherited from Object.
UnshareInstance(String) Stops the sharing of the specified SQL Server Express LocalDB instance.
See Also