Loading a New Database

  • What is the easiest way to load a new database?

    sql2day

  • What do you mean by 'load'? 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • I have a new database that a developer sent from a backup he performed at their site called C.BAK.  I would like to load to my backup server.  What is the easiest way to successfully accomplish this?

     

    //respectfully//

    sql2day

  • Move the backup file to your backup server and use SQL Enterprise Manager to restore the database.  Are you familiar with EM?  If not, right click on the Databases folder and go to All Tasks>>Restore Database.  The rest should be fairly intuitive as it is all GUI.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • I am familar with EM.  I did try this and I kept getting errors.  For some reason this should be striaghtforward.  Hoever its giving me a fit.  THe file was ftpd and seems to be in good shape......

  • Well, what errors are you getting?  Lemme guess, filenames?  Look in the options tab for the Restore Database As section.  The logical file name and it's physical location will be filled in from the backup header.  You'll want to make sure that the location exists on your database server or change the physical location on the screen so SQL Server knows that you want to change where the physical files will reside. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Does the logical filename and the physical filename have to be the same?

  • No, it does not. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • So if I put the database backup file (C.BAK) in the MSSQL\BACKUP Directory and change the physical path to point to this, it should restore the new database?

     

  • Not quite.  They backup file that you have is a SQL Server backup.  The physical file names you see in the options tab are the physical Data and Log file that SQL Server will restore the contents of the backup file to.  Let's go through this in a bit more detail.   Once the Restore Database window appears, you'll need to tell SQL Server where to find the backup file.  In your case, you've moved it into MSSQL\Backup, so under the restore options, select 'From device' and then use the 'Select Devices...' button to find your backup file.  Once you've found and select the backup file, SQL Server will read the file header and populate the Original File Name and Restore As names in the options tab.  Edit the Restore As file/path name to point to a valid directory on your SQL Server.  Don't worry about the file name.  SQL Server will create the file for you. 

    This is pretty basic stuff here.  I recommend that you open Books Online and read up on Restoring a Database as it should be able to guide you through quite easily.  I'm off for the day, so good luck and keep me posted.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Thanks for the help--I'll attempt again....

Viewing 11 posts - 1 through 10 (of 10 total)

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