[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Restore user database fromold mdf file

Posted on 2000-05-05
3
Medium Priority
?
209 Views
Last Modified: 2008-02-26
If I have a copy of both the mbf and ldf files from a user database, but had to restore the master database, how do I restore the user database
0
Comment
Question by:madps
[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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
dambalaji earned 400 total points
ID: 2781694
Hi,
you planned to restore the Master databases. Then you can use the stored procedure sp_attach_db to attach your databases you created.

This example restores the master database backup from tape without using a permanent (named) backup device.

USE master

GO

RESTORE DATABASE master

    FROM TAPE = '\\.\Tape0'

GO

And then you can use

sp_attach_db [@dbname =] 'dbname',
    [@filename1 =] 'filename_n' [,...16]



For more information see "Restoring the master Database from a Current Backup  "
in BOL.

0
 

Author Comment

by:madps
ID: 2781765
Thanks if just worked ok
0
 

Author Comment

by:madps
ID: 2781766
Thanks it just worked ok
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

650 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