Help Updating a filename value in sysdatabases

  • Hi everyone. The situation is the following - A user recently created a database (TestDB per say) the filename in sysdatabases reads the following value

    D:\mssql\data\\TestDB.mdf

    I want to update the value to

    D:\mssql\data\TestDB.mdf ( Removing the additional "\", as this causes my backup script to error out)

    Having already done a backup of the master database, what is the recommend way to update the value? Do I need to detach then reattach the database(testdb) or take it offline before updating the value?

    I appreciate all the help

  • Detaching and reattaching should do it (without having to fiddle with anything else). Being SQL 2005, you can't update the system tables manually. If it's SQL 2000, you've posted in the wrong forum area. 🙂



    Scott Duncan

    MARCUS. Why dost thou laugh? It fits not with this hour.
    TITUS. Why, I have not another tear to shed;
    --Titus Andronicus, William Shakespeare


  • I'd agree with Scott, detach then attach.

  • its 2k5... Thanks for the help.... It worked perfectly.

Viewing 4 posts - 1 through 3 (of 3 total)

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