Solved

Restore user database fromold mdf file

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

738 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