• let us say my database in source server is cake_test and the database in the target server is also named as cake_test.

    Now the backup of the database from the source server has the following files:

    OriginalFile Name &nbsp Restore As

    cake_test &nbsp &nbsp cake_test.mdf

    cream_data &nbsp &nbsp cake_test.ndf

    creamlayer_data &nbsp &nbsp cake_test.ndf

    cream_dat &nbsp&nbsp cake_test.ndf

    cake_test_log &nbsp&nbsp cake_test.ldf

    cream_log &nbsp &nbsp cake_test.ldf

    As instructed by you I have done the following:

    RESTORE DATABASE cake_test

    FROM DISK='D:\cake_test.bak'

    WITH

    MOVE 'cake_test' TO 'D:\MSSQL\DATA\cake_test.mdf'

    ,MOVE 'cream_data' TO 'D:\MSSQL\DATA\cake_test.ndf'

    ,MOVE 'creamlayer_data' TO 'D:\MSSQL\DATA\cake_test.ndf'

    ,MOVE 'cream_dat' TO 'D:\MSSQL\DATA\cake_test.ndf'

    ,MOVE 'cake_test_log' TO 'D:\MSSQL\DATA\cake_test.ldf'

    ,MOVE 'cream_log' TO 'D:\MSSQL\DATA\cake_test.ldf'

    ,stats=1

    but no luck. I got the following error " RESTORE cannot process database 'cake_test' because it is in use by this session. It is recommended that the master database be used when performing this operation. "

    Am i doing anything wrong here??

    Please suggest.