Problem trying to backup Sharepoint_AdminContent

  • I have a backup script to backup all our databases but it is failing on this one:

    SharePoint_AdminContent_fb6e79d4-eddd-4509-98ed-8586420be66b

    So I checked the log and saw this:

    Could not locate entry in sysdatabases for database 'SharePoint_AdminContent_fb6e79d4-eddd-4509-98ed-85'. No entry found with that name. Make sure that the name is entered correctly. [SQLSTATE 08004] (Error 911) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

    As you can see in the above error, the name of the Sharepoint_AdminContent database was truncated for some reason. My script loops through the sysdatabase table get the names of all the databases to backup.

    I checked in the sysdatabases table of course and the name of the Sharepoint database is stored just fine. I don't understand why the script is failing and truncating the Sharepoint database name. I made sure to put in the correct name. Here's part of the script that checks the sysdatabases table:

    SELECT name

    FROM master.dbo.sysdatabases

    WHERE name NOT IN ('tempdb')

    Any and all help is greatly appreciated! Thanks in advance to all who reply.

  • I assume you checked the obvious that your variable for the database name is long enough ?

    The truncated name is 50 characters long.

  • hoembrew01 - this is pretty embarassing 🙂 Thanks very much for pointing out the obvious. The variable was declared as '@name' (varchar(50) of course) where as in the sql statement, it was just called 'name' - I think I may be going cross-eyed here at work. Thanks very much for your help!

  • dont forget to enclose database names such as that above with these []

    use the QUOTENAME() function

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks Perry!

  • dso808 - Thursday, April 7, 2011 2:37 PM

    I have a backup script to backup all our databases but it is failing on this one:SharePoint_AdminContent_fb6e79d4-eddd-4509-98ed-8586420be66bSo I checked the log and saw this:Could not locate entry in sysdatabases for database 'SharePoint_AdminContent_fb6e79d4-eddd-4509-98ed-85'. No entry found with that name. Make sure that the name is entered correctly. [SQLSTATE 08004] (Error 911) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.As you can see in the above error, the name of the Sharepoint_AdminContent database was truncated for some reason. My script loops through the sysdatabase table get the names of all the databases to backup.I checked in the sysdatabases table of course and the name of the Sharepoint database is stored just fine. I don't understand why the script is failing and truncating the Sharepoint database name. I made sure to put in the correct name. Here's part of the script that checks the sysdatabases table:SELECT name FROM master.dbo.sysdatabasesWHERE name NOT IN ('tempdb')Any and all help is greatly appreciated! Thanks in advance to all who reply.

    Hi All

    I faced the same issue.

    We need to use Square brackets for database name

    ie

    use [database]

    instead of

    use database

    Hope it helps.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply