Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    214

    Unanswered: backup and restoring

    I used backup and restore to upgrade a database from sql 2000 to sql 2005. Is it necessary to create the mdf and ldf on the new server at the time of restore under options or should I copy them to the new server in the data folder? I am new and not quite sure what the log files hold.
    Thanks

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    if you have created a backup of a database, you don't need anything but the .bak file.

    when you restore from a bak file, the data and log files will be created automatically by the server.

  3. #3
    Join Date
    Mar 2007
    Location
    Holmestrand, Norway
    Posts
    332
    Edit: You don't need to create them, the restore does.

    How backup works:
    When SQL Server backs up a database, it backs up the data file first. During the backup of the data file, no changes are written to the data file, only to the log. When the bacup of the data file is complete, the changes written to the log file is backed up. In other words, backup of a SQL Server restores to the point of time when the backup finished, not started. Furthermore, your log file will be used to keep track of transactions afer the backup have restored, so you will need the file.
    Ole Kristian Velstadbråten Bangås - Virinco - MSSQL.no - Facebook - Twitter

  4. #4
    Join Date
    Jul 2004
    Posts
    214
    Ok. If I don't specify in options at the time of restore, I can't find where the the mdf and ldf files were created. And are these new mdf and ldf files or do they hold the same data as the database before they were created on the new server.
    thanks

  5. #5
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    this will tell you where they are:

    exec sp_helpfile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •