Solved

Restore user database fromold mdf file

Posted on 2000-05-05
3
206 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 100 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

696 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