已答复 how to create a .Bak file of my database

  • Wednesday, August 26, 2009 8:14 AM
     
     
    Dear Friends,

    Kindly show me the steps to create .bak file of a database file.

    Thanks in advance.
    EMCUBE

All Replies

  • Wednesday, August 26, 2009 8:18 AM
    Moderator
     
     Answered

    You need to issue a BACKUP command.

    Look at the following articles:

    http://msdn.microsoft.com/en-us/library/ms191304.aspx
    http://msdn.microsoft.com/en-us/library/ms186865.aspx

    HTH!


    every day is a school day
  • Wednesday, August 26, 2009 8:26 AM
     
      Has Code
    Hi

    Hear is just a simple example of the backup command

    Use this for a full  backup
    BACKUP DATABASE [Databasename] TO DISK "[Where on the disk to place the backup file Both the Path and the .bkp file]"
    
    ex.
    BACKUP DATABASE TestDB TO DISK "C:\Program Files\Microsoft SQL Server\MSSQL\Backup\Testdb.bak"
    Use this for a log backup
    BACKUP LOG [Databasename] TO DISK "[Where on the disk to place the backup file Both the Path and the .bkp file]"
    
    ex.
    BACKUP LOG TestDB TO DISK "C:\Program Files\Microsoft SQL Server\MSSQL\Backup\Testdb.bak"
    Ragards
    Jens Nilsson MCTS - SQL Server 2008 Imp. and Main.
  • Wednesday, August 26, 2009 8:34 AM
     
     
    Thanks.
    EMCUBE