Can't stop instance
See original GitHub issueI would like to delete and recreate my database before running tests.
var localDb = new SqlLocalDbApi();
const string InstanceName = "myDb";
var instance = localDb.GetInstanceInfo(InstanceName);
if (instance.Exists)
{
if (instance.IsRunning)
{
instance.Manage().Stop(); << Exception here
}
localDb.DeleteInstance(InstanceName);
}
Message: MartinCostello.SqlLocalDb.SqlLocalDbException : Failed to stop SQL LocalDB instance ‘myDb’. ---- MartinCostello.SqlLocalDb.SqlLocalDbException : Unexpected error occurred inside a LocalDB instance API method call. See the Windows Application event log for error details.
Windows API call LogSqlDiagRec returned error code: 0. Windows system error message is: The operation completed successfully. Reported at line: 3900. [Microsoft][ODBC SQL Server Driver]Cannot initialize SSPI package
“stop” works from the command line.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Stop and start your instance - Amazon Elastic Compute Cloud
Prerequisites for stopping an instance. You can stop an Amazon EBS-backed instance. Instances backed by an instance store volume do not support the...
Read more >Why is my EC2 instance stuck in the stopping state?
Force stop the instance · Open the Amazon EC2 console. · Select Instances, and then select the stuck instance. · Select Instance state,...
Read more >EC2 Instance will not stop or terminate after trying to create ...
Force detach the system volume. Then you will be able to stop instance. Re-attach volume and start instance. Viola! Share.
Read more >Can't stop my AWS EC2 instance properly
You cannot stop EC2 instances that are part of an Auto Scaling group. The best you can do is to edit your Auto...
Read more >EC2 instance stuck in the stopping state - How to fix
1. Firstly, we have to open the Amazon EC2 console (https://console.aws.amazon.com/ec2/). · 2. Then go to instances and select the stuck instance ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the response. It doesn’t matter because I’m only using LocalDb on a build server that is reset for every build.
This appears to be an issue with the specific machine installation of SQL LocalDB itself, rather than this library.
I’m afraid I don’t know what’s wrong that’s making the native SQL LocalDB Instance API return an non-success status code, this library is just seeing that and throwing the exception up to the call site.