We had an interesting support ticket recently where a customer was having trouble logging into their SQL Server based DriveWorks Group - DriveWorks kept showing them a message along the lines of "The group could not be opened, this could be indicative of a problem with your system".
Ultimately we ended up in having to do a GoToMeeting with the customer to try and see what was actually going on, and as soon as we were shown the database in SQL Server the problem became very obvious:
Don't worry if it's not obvious to you, I'll do you a favour and tell you - you see that each of those tables begins with "db_owner", well that's not right at all, DriveWorks expects that its databases begin with "dbo".
It isn't normal to end up in this situation, but that said, it can happen if you configure SQL Server away from the defaults, and if it does happen you'll need to rename the tables back - this unfortunately requires a little more black magic than a lot of us IT folks are probably comfortable with, but luckily we've got a SQL 2005/2008 script that does it for you:
1: -- Get all the tables in the database and their schemas
2: DECLARE tableCursor CURSOR FOR
3: SELECT t.name,s.name
4: FROM sys.tables t
5: JOIN sys.schemas s
6: ON t.schema_id=s.schema_id
7: 8: DECLARE @name nvarchar(MAX)
9: DECLARE @schema nvarchar(MAX)
10: DECLARE @fullName nvarchar(MAX)
11: 12: -- Loop for each table
13: OPEN tableCursor
14: FETCH NEXT FROM tableCursor INTO @name,@schema
15: 16: WHILE @@FETCH_STATUS = 0
17: BEGIN
18: 19: -- Work out the current full table name
20: SELECT @fullName= @schema + '.' + @name
21: 22: -- Change the schema to dbo
23: EXEC sp_changeobjectowner @fullName, 'dbo'
24: 25: -- Rinse and repeat
26: FETCH NEXT FROM tableCursor INTO @name,@schema
27: END
28: 29: -- Cleanup
30: CLOSE tableCursor
31: DEALLOCATE tableCursor
Whatever you do, make sure you are in the right database before you execute this script! and obviously this has been written as a quick and dirty script to perform a task, so we make no warranty of fitness for purpose and all that jazz - but hopefully if you do come across this problem, whether it be with DriveWorks or any other product, then this might help.
One thing I can't stress enough though, is that if you do decide to start messing around with a database, be it ours or any other application's, ALWAYS take a backup first, if you don't know how, then make sure you learn, because there's nothing worse than not having a backup, and call me an idiot, but unfortunately I know this from experience :-). Luckily only ever in demo environments, but still, take it from me, it isn't fun.
Philip