Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have C# application that uses SQLDependency to get updates from a message table. I have tested it quite extensively and worked great in the development environment but when I ran it on the production server the server crashed. I can not be absolutely sure that it is this because we picked it up ~10 minutes after I ran the application.

From what I understand from how the SQLDependency works it uses stored procedures to interact with the service broker.

The errors I received

SQL Server must shut down in order to recover a database (database ID 1). The database is either a user database that could not be shut down or a system database. Restart SQL Server. If the database fails to recover after another startup, repair or restore the database.

Could not find an entry for table or index with partition ID 428869310480384 in database 2. This error can occur if a stored procedure references a dropped table, or metadata is corrupted. Drop and re-create the stored procedure, or execute DBCC CHECKDB.

We are running SQL Server 2005 SP1.

Edit:(removed code the link explains it better) I followed this example and mainly changed the query and what I do with the data.

http://www.dreamincode.net/forums/topic/156991-using-sqldependency-to-monitor-sql-database-changes/

share|improve this question
2  
I never had that kind of error with SqlDependencies. Does sounds like a different problem. You probably need to investigate further on that error message of yours. –  UrbanEsc Oct 18 '11 at 14:30
    
Can you provide some code or a summary of how you are wiring up the broker to your application? –  davids Oct 18 '11 at 14:32
    
Do you run DBCC CHECKDB on a regular maintenance schedule? (you should...) –  Mitch Wheat Oct 18 '11 at 14:35
    
@MitchWheat Not that I am aware of, we do full db backups and transaction log backups though. I will have to go look. –  fluf Oct 18 '11 at 14:54
    
I did a DBCC CHECKDB on all of the databases and none returned with any errors. I did find that db 1 is the master database and db 2 is tempdb. –  fluf Oct 18 '11 at 15:49
add comment

migrated from stackoverflow.com Jan 21 '12 at 20:16

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.