Making a copy of a SQL Server database

  • Hello,

    Could someone please give me any hints on how I can make a duplicate copy of an entire SQL Server database on the same server?

    Thanks,

    Karim

  • Hi

    Backup DB and Restore DB as a different name

    Use script :

    Backup Database ABC to disk ='c:\abc.bak'

    go

    Restore Database ABCNEWNAME from Disk ='C:\abc.bak'

    with move 'ABC_DATA' to 'C:\ABC_DATA.mdf'

    ,move 'ABC_LOG' to 'C:\ABC_LOG.LDF'

    go

    Be sure to rename the 'C:\ABC_DATA.mdf' and 'C:\ABC_LOG.LDF'

    to a different file from your existing database

    regards

  • Hi,

    I think you need the backup of the database to be mirrored to another path in the same server Right???

    If yes, then you have the option in Backup database command itself in SQL server 2005.

    Use MIRROR TO option in BACKUP DATABASE command to mirror the backup to the the path specified. You can refer in BOL for further, use the below link in BOL

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/89a4658a-62f1-4289-8982-f072229720a1.htm

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

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