Frage

When using Server Management in SQL Server 2005 Express with Visual Studio 2010, I get the following error when attempting to add a database:

SQL Error

What could be causing this? I already verified that the service is running...etc..

War es hilfreich?

Lösung

Turns out I was chasing another error. I ended up using the information found below! Hope this helps another poor IT admin soul!

http://blog.sqlauthority.com/2008/11/04/sql-server-fix-error-4064-cannot-open-user-default-database-login-failed-login-failed-for-user/

Andere Tipps

I came across the same issue and find out that the dbowner is NULL(empty). After researching, I came across this script and after using it I was able to mview the db properties and fix the issue using the following query to find out the owner of each database through a T-SQL script: SELECT name, suser_sname(owner_sid) AS owner, state_desc FROM sys.databases

For a SQL Server 2000 instance, you can use this: SELECT name, suser_sname(sid) FROM sysdatabases

This revealed NULLs for a couple of databases in the instance, so I set the owner to SA using the following: USE Northwind EXEC sp_changedbowner 'sa'

…tried accessing the properties through SSMS again and it worked like a charm 😉

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top