sql job failure : Failed to acquire connection “Local server connection”.

Error message:

Execute SQL Task     Description: Failed to acquire connection “Local server connection”. Connection may not be configured correctly or you may not have the right permissions on this connection.  End Error  Warning: 2016-09-05 17:00:01.26     Code: 0x80019002     Source: OnPreExecute      Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.  End Warning  Error: 2016-09-05 17:00:01.29     Code: 0xC0024104     Source: Maintenance Cleanup Task     …  The package execution fa…  The step failed.



The issue is with connecting the sql server . Check the connection defined in the maintenance plan.  Mostly the connection may get broken. If not able to edit the connection , create the new plan and define again and drop the old plan.


sql startup problems

Most of the DBA’s may face issue with system databases when starting sql service starts. It will not start if any of the system database has an issue.

1.master database issues:


a. Corruption & page errors : Rebuild the master and restore master db from backup file via SQLCMD after starting sql services with -m parameter (single user mode). Next , you may need to restore msdb, model database in most of the cases, because restoring master will still look for the msdb/model db files and if not found, it won’t start.

b. filename modified, access issue , file path issue: Correct the issue depend on the error from event viewer and start the sql service.

2.For msdb and model db corruption:

You need to make sure master db is restored from backup or rebuild the master and in working condition.

Now , Sequence is from model db, because model is required for tempdb clearing.

To first recover model, start the sql services now with startup parameter – T3608. This will help sql server start with only master database .Sometime , you need to use -T3609 also in order to stop sql server to clear the tempdb while starting up. ie., T3608 ;T3609 – pass both in startup parameter

Now restore the model and msdb database from backup via SQLCMD.

3.Tempdb corruption:

If the tempdb is corrupted, use  t3608 to start the sql and via SQLCMD , using alter database command need to use for modifying the tempdb . Then, stop and restart the sql without any parameter.