Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Database maintenance failure: Query timeout expired

Created: 19 Sep 2013 | 4 comments

Hi, for the past 2 weeks, we have had some major issues with our backup, as the database got to the max size for an SQL Express. After some troubles we managed to move the database to an full SQL Server on another server. Finally resulting in backup jobs to work Again. But now I see that the database maintenance job isn't working, and I'm thinking that perhaps can explain why databse grown to max size. I need the maintenance job to Work, but can't find any solution, so here I am, hoping you guys can help. This is what the latest job said: * Saved contents of BEDB database * Optimized BEDB database size from 4338.63 MB to 4266.19 MB * Deleted expired data for BEDB database: 0 empty legacy backup-to-disk folders were deleted 0 expired reports were deleted 42 expired job histories were deleted 122 expired alert histories were deleted 45 expired job logs were deleted Maintenance has failed: -536837662, -536837662: :: -2147217871:Query timeout expired Total elapsed time: 00:09:31 How do I fix that?

Operating Systems:

Comments 4 CommentsJump to latest comment

Jaydeep S's picture

See if this technote fits the exact error that you get. If so, open a support case as the issue is still being investigated.

http://www.symantec.com/docs/TECH201551

You could also stop all Backup Exec Services (Including SQL) and then perfrom a manual repair and maintainance of the BEDB

http://www.symantec.com/docs/TECH67239

If the manual cleanup and maintainance fails better oopen a support case

Rahul Kumar1's picture

Hi,

Note: Make sure you stop the SQLSERVER( BKUPEXEC) service and take a copy of the DATA folder before performing this.

Also you need to manually serach for the table having millions of entries by going to properties of each table.

The following SQL script can be used to delete multiple rows of data from tables with excessive database to provide additional space for the BEDB. 

  1. Open SQL Management Studio
     
  2. Check the properties of the tables in BEDB to see which table has millions of rows. Most common are "JobHistoryDetailInfo" and "Alerts"
     
  3. Right-click BEDB and select "New Query"
     
  4. Copy and paste the script below to delete 1 million rows
  • "TABLENAME" in the scrip below should be replaced with the name of the table you want to delete rows from. Most common are "JobHistoryDetailInfo" and "Alerts"
     
  • Do not delete more than 1 million rows at a time, SQL will hang (once the query completes, you can simply run it again to delete more rows)
     
  • Starts deleting the oldest data first 

Delete Top (200000) From TABLENAME
DBCC Shrinkdatabase (BEDB)
Delete Top (200000) From TABLENAME
DBCC Shrinkdatabase (BEDB)
Delete Top (200000) From TABLENAME
DBCC Shrinkdatabase (BEDB)
Delete Top (200000) From TABLENAME
DBCC Shrinkdatabase (BEDB)
Delete Top (200000) From TABLENAME
DBCC Shrinkdatabase (BEDB)

Chetan Savade's picture

Hi,

Thank you for posting in Symantec community.

I would be glad to answer your query.

SQL express is not the supported version.

Refer this thread: http://www.symantec.com/connect/forums/sepm-database-sql-express

Chetan Savade
Sr.Technical Support Engineer, Endpoint Security
Enterprise Technical Support
CCNA | CCNP | MCSE | SCTS |

Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.<

Mhystique's picture

Hi, just some extended info.

I don't know that the ackup Exec embedded DB is in, but throught is was an SQL Express.

With BEUtility I move this to another server with a full MS SQL 2005 on it. By default BEUtility placed the DB files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.
I don't what that as we haven't got much space on drive c, so through SQL Server Management Studio I detached the DB, moved the files to drive D and attached it again.

For some reason when I restart the SQL and backup services, the DB files is again placed on drive C. That is my headeag right now. How do I moved the DB, so it stays there?