Cannot open database "Microsoft.eShopOnContainers.Services.OrderingDb" requested by the login. The login failed. Login failed for user 'sa'.
See original GitHub issuegetting this error
System.Data.SqlClient.SqlException (0x80131904): Cannot open database “Microsoft.eShopOnContainers.Services.OrderingDb” requested by the login. The login failed.
Login failed for user ‘sa’.
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Ordering.BackgroundTasks.Tasks.GracePeriodManagerService.GetConfirmedGracePeriodOrders() in /src/Services/Ordering/Ordering.BackgroundTasks/Tasks/GracePeriodManagerTask.cs:line 86
ClientConnectionId:2f8ed064-77b2-4ce4-b304-5752234ff88c
Error Number:4060,State:1,Class:11
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thanks @mvelosop for the details.
Hi @dereklew, @sughosneo,
I’ve seen this kind of issues happen when it takes a long time to spin up all containers for the first time, typically when using hard disks (i.e. not SSDs)
It usually helps to begin by start the sqldata containers only so the DB gets creates created. Then stop it and start the whole application again.
you can start the sqldata container with:
Hope this helps.