I'm setting up a program called celcat timetabler www.celcat.com which is a timetabling application that needs a new database for each year (I know don't ask). I have done this in the past, unfortunately this time I made a mistake, so I deleted the database from sql server and recreated. This seems to be fine on the server all tables created properly and appropriate data migrated but upon trying to log on (through celcat) I get could not find database ID 18.
I believe the problem is to do with me creating the database with exactly the same name as the original (I need to do this as I have sql reliant on the name).
I looked in the master database and saw a table assigning ID's to databases to which celcat was not assigned 18 at least not anymore. Any ideas where it could be getting 18 from. It's definitely not stored with the celcat program as I have tried different users and different computers.
update:
I ran
ALTER DATABASE celcat0910 SET SINGLE_USER WITH ROLLBACK IMMEDIATE EXEC sp_renamedb 'celcat0910', 'celcat09101' ALTER DATABASE celcat09101 SET MULTI_USER
This allowed the celcat application to connect to the database so it is being created correctly, however it is now not the database name I want. Having the database name in a conventional order of celcat0708, celcat0809, celcat0910 at least allows me to do multi year queries slightly easier.
For this very specific issue I would register and ask on the official forum:
http://www.celcat.net/Support/Forums/tabid/54/Default.aspx
Does the application have a "Main" database which lists all yearly databases and other configuration information? If so, I'd start browsing it's tables, looking for a key into the table you mentioned above.
Anders
Have a look at master.dbo.sysdatabases, there are all databases of the server listet...with their ID.