4060: Cannot open database requested by the login. The login failed
SQL ServerNe demek?
Oturum açma başarılı olabilir ancak istenen veritabanı açılamadığı için bağlantı reddedildi. Genellikle 18456 ile birlikte görülür.
Neden olur?
Veritabanının var olmaması, OFFLINE/SINGLE_USER/RESTORING/SUSPECT durumunda olması, login'in o veritabanında kullanıcı eşlemesi olmaması veya bağlantı dizesindeki varsayılan veritabanının erişilemez olması.
Nasıl çözülür?
Veritabanının var olduğunu ve ONLINE olduğunu doğrulayın: SELECT name, state_desc FROM sys.databases. Login için veritabanında kullanıcı oluşturup izin verin. Bağlantı dizesindeki Initial Catalog/Database değerini kontrol edin. Veritabanı RESTORING/SUSPECT ise onarım/geri yükleme adımlarını uygulayın.
Aynı motorda diğer kayıtlar
- 1105Could not allocate space for object in database because the filegroup is full
- 208Invalid object name
- 229The SELECT/EXECUTE permission was denied on the object
- 233A connection was successfully established with the server, but then an error occurred (no process is on the other end of the pipe)
- 823The operating system returned error to SQL Server during a read/write at offset in file (I/O error)
- 824SQL Server detected a logical consistency-based I/O error (page corruption)
- 701There is insufficient system memory in resource pool to run this query