Solved

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

Posted on 2011-03-24
3
311 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
Comment Utility
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
Comment Utility
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
Comment Utility
Both solutions work.

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

Thanks,
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now