Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-24
3
Medium Priority
?
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
EL_Barbado earned 1200 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 40

Assisted Solution

by:lcohan
lcohan earned 800 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

705 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