Restore database help

  • hi,

    i've a database with full text enabled, by backing up this database,need to restore this backup to new database.

    RESTORE DATABASE NEWDB

    FROM DISK ='\\DBSERVER\OLDB.BKP'

    WITH REPLACE

    But it is giving error:

    The file 'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\FTData\ARTICLE_desc'

    cannot be overwritten. It is being used by database 'OLDB'.

    How can i restore this database to new database.

    thanks

    🙂

  • I don’t have much experience with full text search so I might be off base here, but did you try changing the file’s path or name by using the move switch of the restore statement?

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • dba-vb (9/7/2009)


    hi,

    i've a database with full text enabled, by backing up this database,need to restore this backup to new database.

    RESTORE DATABASE NEWDB

    FROM DISK ='\\DBSERVER\OLDB.BKP'

    WITH REPLACE

    But it is giving error:

    The file 'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\FTData\ARTICLE_desc'

    cannot be overwritten. It is being used by database 'OLDB'.

    How can i restore this database to new database.

    thanks

    well...If u are restoring it as new database then u should not use REPLACE, as it is used when restoring on to a database....

    check the files using restore filelistonly and if the path returned doesn't exist, then either create the directory or move the files....

    Regards,
    [font="Verdana"]Sqlfrenzy[/font]

  • dba-vb (9/7/2009)


    hi,

    i've a database with full text enabled, by backing up this database,need to restore this backup to new database.

    RESTORE DATABASE NEWDB

    FROM DISK ='\\DBSERVER\OLDB.BKP'

    WITH REPLACE

    But it is giving error:

    The file 'C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\FTData\ARTICLE_desc'

    cannot be overwritten. It is being used by database 'OLDB'.

    How can i restore this database to new database.

    thanks

    If your database uses fulltext, then you will need an addition move statement to specify where the fulltext catalog is going to.

    similar to this. i havent checked this for syntax, purely for illustration

    RESTORE DATABASE [Test] FROM DISK =

    N'E:\sqlbackups\UserBackups\test.bak'

    WITH FILE = 1,

    MOVE Test' TO N'E:\sqldata\Test.mdf',

    MOVE N'Test_log' TO N'D:\sqllog\Test_log.ldf',

    MOVE N'TEST_FT' TO N'C:\Program Files\Microsoft SQL

    Server\MSSQL.1\MSSQL\FTData\TestFT',

    NOUNLOAD, REPLACE, STATS = 10

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • If you are creating a new database, from the backup that you mentioned in your first post. on the same server as the original database. you will need to do as I suggested and use the MOVE option in your restore and specify different locations for the mdf, ldf and the FT catalog.

    you can use restore filelistonly from disk = 'MyBackup'

    to help you with this.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

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

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