none
Backup/Restore Database in SQL Server 2008 Express

    Question

  • Hi,
    I'm brand new to using SQL Server at all let alone the 2008 Express edition.
    Anyway,
    I was successful in installing and creating a database on my laptop.  Now I want to take all that & put it on an actual server or at least dedicated computer that can be shared with other users on the network.

    Is there a way to backup the database on the laptop (let's say to a flash drive) and then restore it on another computer (ie server, dedicated computer).?

    Tuesday, October 28, 2008 3:15 PM

Answers

  • you may take  Backup  of the db and copy the backup file and restore it whereever you want.

     

    (a) Backup your database

    Backup Database YourDatabaseName TO Disk='D:\yourbackupfilename.bak'

     

    (b) Copy the backup file to target machine

    (c) Restore the database in the target machine

     

    RESTORE FILELISTONLY FROM DISK='D:\yourbackupfilename.bak'

    GO

    RESTORE DATABASE Merckcontacttesting

    FROM DISK='D:\yourbackupfilename.bak'

    WITH MOVE'YourLogicalDatafileName' TO 'D:\ yourdatabase.mdf',

    MOVE 'YourLogicalLogFilename' TO'D:\yourdatabase_log.ldf'

     

    you will get the logical Data and log file name by running

    RESTORE FILELISTONLY FROM DISK='D:\yourbackupfilename.bak'

     

    Madhu

    Tuesday, October 28, 2008 4:04 PM
    Moderator

All replies

  • you may take  Backup  of the db and copy the backup file and restore it whereever you want.

     

    (a) Backup your database

    Backup Database YourDatabaseName TO Disk='D:\yourbackupfilename.bak'

     

    (b) Copy the backup file to target machine

    (c) Restore the database in the target machine

     

    RESTORE FILELISTONLY FROM DISK='D:\yourbackupfilename.bak'

    GO

    RESTORE DATABASE Merckcontacttesting

    FROM DISK='D:\yourbackupfilename.bak'

    WITH MOVE'YourLogicalDatafileName' TO 'D:\ yourdatabase.mdf',

    MOVE 'YourLogicalLogFilename' TO'D:\yourdatabase_log.ldf'

     

    you will get the logical Data and log file name by running

    RESTORE FILELISTONLY FROM DISK='D:\yourbackupfilename.bak'

     

    Madhu

    Tuesday, October 28, 2008 4:04 PM
    Moderator
  • If you're new to SQL Server you may want to consider using a GUI tool. You can download and install Microsoft® SQL Server 2008 Management Studio Express. However, this tools lets you perform a wide range of tasks in your server and databases, and it might be somewhat complex for newbies.

    On the other hand, if what you need is just run backups in an easy way I recommend SQL Backup and  FTP. The tool is very simple and intuitive to use, and has some interesting features such as compress and send your backups via FTP.

     

    Tuesday, July 05, 2011 1:13 PM
  • Hi David,

    Read How to Backup Database in SQL Server to know the steps to take a Full Database Back up in SQL Server and checkout the article titled How to Restore Database in SQL Server to know the steps you need to follow to restore a full database backup in SQL Server.

    Cheers,
    Ashish Kumar Mehta

    Please click the Mark as Answer button if a post solves your problem and Vote as Helpful if a Post is Helpful!

    Tuesday, March 20, 2012 4:43 AM
  • Love that tool! Saved m a tone of time.  Thank You!!!!!
    Saturday, July 28, 2012 4:15 AM