Schema unusable after deleting another database I just get a problem with a customer's SQLServer. I'm reading articles related to schema, owners and permissions, but I can't get it out.

I have two DB : DB1 and DB2. 
I have a schema, which has the same name of it's owner (user1, which has "user1" as default schema).
This schema exists on both databases, user1 is mapped as owner on both databases.

So, some of my tables are in this format : user1.table1, user1.table2, dbo.table3...

DB1 is not used anymore : I turned it offline. Just after that, the tables [user1].[tableXX] from DB2 were not usable... Turning back DB1 online solved the problem.

How can this happens? How can I turn DB1 offline without blocking DB2?

Thanks in advance!
It looks like you'll need to change the user's default database, as it appears this is currently set to DB1, which no longer exists.

exec sp_defaultdb @loginame='user1', @defdb='DB2'


OR

ALTER LOGIN &lt;login_name&gt; WITH DEFAULT_DATABASE = &lt;default_database&gt;