Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
2  
Would this be the application from celcat.com ? Never heard of it myself but this might be useful for others to know, if they've worked with this before. (Btw, this error seems caused by a design error in their application. A new database for every year? What a waste of resources. Not mentioning the mess such a technique can cause when administrators start modifying things straight inside the database server.) –  Wim ten Brink Jun 24 '09 at 12:02
    
Oops, a new db for each year (on SQL Server 2000!). Makes me smile. –  splattne Jun 24 '09 at 12:25
    
I know the new db every year is not great. Makes my SQL for cross year attendance data more complex and probably lots of security issues. I think their reasoning is some of the field lengths are set dynamically based on the number of weeks in your year (academic year) and the number of periods in a day. These are subject to change each year, a better DB design probably would sort these issues but not to worry the program is very widely used and does have a good GUI. –  PeteT Jun 24 '09 at 13:10

3 Answers 3

up vote 0 down vote accepted

Have a look at master.dbo.sysdatabases, there are all databases of the server listet...with their ID.

share|improve this answer
    
It was on there but then when i removed it I still couldn't clear the error. I worked around by modifying all db's to celcat200708, celcat200809 .... –  PeteT Feb 17 '10 at 1:02

For this very specific issue I would register and ask on the official forum:

http://www.celcat.net/Support/Forums/tabid/54/Default.aspx

share|improve this answer
    
This definitely sounds like its worth a call to the vendor. –  mrdenny Jun 24 '09 at 15:30

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

share|improve this answer
    
Nope no main db I can't see anywehere this ID could be coming from other than a table in Master db which does give an indexed number to each database on a sql server but this has been updated and is no longer 18 –  PeteT Jun 24 '09 at 13:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.