| title | LocalDBDeleteInstance Function | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 03/06/2017 | |
| ms.prod | sql | |
| ms.prod_service | database-engine | |
| ms.reviewer | ||
| ms.technology | ||
| ms.topic | reference | |
| apiname |
|
|
| apilocation |
|
|
| apitype | DLLExport | |
| ms.assetid | 37cb2a7e-672a-4223-b6f3-a94d7b8d58cd | |
| author | CarlRabeler | |
| ms.author | carlrab |
[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md] Removes the specified SQL Server Express LocalDB instance.
Header file: sqlncli.h
HRESULT LocalDBDeleteInstance(
PCWSTR pInstanceName,
DWORD dwFlags
);
pInstanceName
[Input] The name of the LocalDB instance to remove.
dwFlags
[Input] Reserved for future use. Currently should be set to 0.
S_OK
The function succeeded.
LOCALDB_ERROR_NOT_INSTALLED
SQL Server Express LocalDB is not installed on the computer.
LOCALDB_ERROR_INVALID_PARAMETER
One or more specified input parameters are invalid.
LOCALDB_ERROR_INVALID_INSTANCE_NAME
The specified instance name is invalid.
LOCALDB_ERROR_UNKNOWN_INSTANCE
The specified instance does not exist.
LOCALDB_ERROR_INSTANCE_BUSY
The specified instance is running.
LOCALDB_ERROR_WAIT_TIMEOUT
A time-out occurred while trying to acquire synchronization locks.
LOCALDB_ERROR_INSTANCE_FOLDER_PATH_TOO_LONG
The path where the instance should be stored is longer than MAX_PATH.
LOCALDB_ERROR_CANNOT_GET_USER_PROFILE_FOLDER
A user profile folder cannot be retrieved.
LOCALDB_ERROR_CANNOT_ACCESS_INSTANCE_FOLDER
An instance folder cannot be accessed.
LOCALDB_ERROR_CANNOT_ACCESS_INSTANCE_REGISTRY
An instance registry cannot be accessed.
LOCALDB_ERROR_CANNOT_MODIFY_INSTANCE_REGISTRY
An instance registry cannot be modified.
LOCALDB_ERROR_INSTANCE_CONFIGURATION_CORRUPT
An instance configuration is corrupted.
LOCALDB_ERROR_CALLER_IS_NOT_OWNER
API caller is not Local Database instance owner.
LOCALDB_ERROR_INTERNAL_ERROR
An unexpected error occurred. See the event log for details.
For a code sample that uses LocalDB API, see SQL Server Express LocalDB Reference.