Solved

Need to use a SQL Server backup file to populate a remote server database

Posted on 2011-03-24
3
321 Views
Last Modified: 2012-05-11
I have the following backup file on my local machine:

C:\Develop\Apps\StockPro\Data\aspnetstockpro_032411.bak
I have a new database on the remote server named StockProSel

I can connect to StockProSel from the SQL Server Management studio

What are the steps to populate StockProSel from the aspnetstockpro_032411.bak file?

Thanks,
0
Comment
Question by:Dovberman
3 Comments
 
LVL 2

Accepted Solution

by:
EL_Barbado earned 300 total points
ID: 35207928
First you should copy the .bak file from your computer to the server itself. put the file preferably in the MSSQL\Backup directory.

To restore a full database backup

   1.After you connect to the appropriate instance of the Microsoft SQL Server Database Engine, in Object Explorer, click the server name to expand the server tree.
   2.Expand Databases. select the database you want to restore or type in the name.
   3.Right-click the database, point to Tasks, and then click Restore.
   4.Click Database, which opens the Restore Database dialog box.
   5.On the General page, the name of the restoring database appears in the To database list box. To create a new database, enter its name in the list box.
   6.In the To a point in time text box, either retain the default (Most recent possible)
   7.To specify the source and location of the backup sets to restore, click one of the following options:
          * From device
            Click the browse button, which opens the Specify Backup dialog box. In the Backup media list box, select one of the listed device types (File). To select one or more devices for the Backup location list box, click Add.
            After you add the devices you want to the Backup location list box, click OK to return to the General page.
   8.In the Select the backup sets to restore grid, select the backups to restore. This grid displays the backups available for the specified location. By default, a recovery plan is suggested. To override the suggested recovery plan, you can change the selections in the grid. Any backups that depend on a deselected backup are deselected automatically.
   9.To view or select the advanced options, click Options in the Select a page pane.
  10.In the Restore options panel, choose athe following option:
          * Overwrite the existing database  
  11.Optionally, you can restore the database to a new location by specifying a new restore destination for each file in the Restore the database files as grid.
  12.The Recovery state panel determines the state of the database after the restore operation. The default behavior is:
          * Leave the database ready to use by rolling back the uncommitted transactions. Additional transaction logs cannot be restored. (RESTORE WITH RECOVERY)

0
 
LVL 39

Assisted Solution

by:lcohan
lcohan earned 200 total points
ID: 35208010
Assuming StockProSel is a new empty database:

Copy the backup file aspnetstockpro_032411.bak to the SQL box where StockProSel  is located
Connect to the database StockProSel and right click it the select Tasks -> Restore -> Database ->
Click "From File" -> click Add on the Specify Backup window that pops up and navigate to the file aspnetstockpro_032411.bak and click it -> Check box Restore on the Restore window -> on the left panel click Options -> click Overwrite Existing database to overwrite StockProSel and check to make sure the files listed are the StockProSel physical files under the Restore as column.


0
 

Author Closing Comment

by:Dovberman
ID: 35208463
Both solutions work.

El Barbado gets 60 % of the points based on somewhat more detail supplied.

Thanks,
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question