Wednesday, April 17, 2013

[SQL Server] Not all Databases getting backed up

[SQL Server] Not all Databases getting backed up


Not all Databases getting backed up

Posted: 17 Apr 2013 06:03 AM PDT

I have a maintenance plan that makes a full backup of 45 databases every night, at least it supposed to. The job runs without error, but when it's done and I look at the backup destination they are not always there. I ran it manually just now for example, only 30 databases got backed up, the other 15 databases have yesterday's date or farther back.Another portion worth mentioning is the fact that these databases are backed up to a Linux system and does not recognize Windows domain credentials. Simply putting in the path will not work in the Back Up Database Task because it will fail authentication. To resolve this, I put in an Execute SQL Statement task before the backup starts. Here is the task.xp_cmdshell 'net use z: /delete'GOxp_cmdshell 'net use z: \\winvtblacka02\dbateam /USER:dbateam dbateam'GOThis allows me to pick drive z:\ for the location as seen in the picture. I have looked through Windows and SQL logs and for the databases that did not get backed up and they are not even mentioned so I have no errors to look up. Sometimes the job completes in 15 minutes when it should take several hours.I am wondering is there a maximum amount of database that can be backed up per maintenance plan?Is there a hidden setting that tells a job to stop running once it's ran for a certain amount of time?Does the logon to the mapped Z:\ drive go stale after? (I would think only idle connections would time out) I have it set to "All Databases" and ignore databases where the state is not online check as well. Many of these databases are mirrored and I have the identical setup on the mirror, so if there is a fail over the new principal will begin backing them up.

How to find values in a comma delimeted string with len>3

Posted: 17 Apr 2013 12:58 AM PDT

Hi everyone,can you please help me with the following? I have a nvarchar column with data like this: ', 55,85,1,4,9888,6587,' How can I found the rows that include in their comma delimeted string, values with len()>3?I.e. if I had the following rows:', 55,85,1,4,9888,6587,' ', 55,85,1,4,98,65,' I would like a statement that returns only the first row (beacuse it has values: 9888 and 6587) or only the values: 9888, 6587.Thank you in advance

No comments:

Post a Comment

Search This Blog