question

Murali avatar image
Murali asked

Getting the Error as Could not find Database ID

don't know what happened ...after connecting to server ..i am not able to see the databases in the server...if i click on databases folder i am getting the error as Could not find database ID 22. Database may not be activated yet or may be in transition. Reissue the query once the database is available. If you do not think this error is due to a database that is transitioning its state and this error continues to occur, contact your primary support provider. Please have available for review the Microsoft SQL Server error log and any additional information relevant to the circumstances when the error occurred. (Microsoft SQL Server, Error: 913)
dba
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

WilliamD avatar image
WilliamD answered
Start with the basics. Look in the error logs for any indication of problems. Any warnings or errors there can help start the search for a solution. Ask colleagues if they have been 'playing around'. Maybe someone did something they shouldn't have. What did you last do on the system. Are you the one who has done something that you shouldn't have? If you know which database has ID 22 - take a look if the data files are still on the disk. If so, try attaching the database. If that works, I would suggest running some checks on the database.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
used to see this every month or so with sql server 2000. After the daily test restore, the DB ID wouldn't match what the server thought it should be. Detach/attach got it fixed back up.
0 Likes 0 ·
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
Have you tried to do **select * from sys.databases** in a query window?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Blackhawk-17 avatar image
Blackhawk-17 answered
It's possible that was the database designated as your default dB. Change your default to another dB and refresh.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.