Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to attach  the database files to the database with No Recovery Option?

Posted on 2014-12-30
2
Medium Priority
?
752 Views
Last Modified: 2015-04-11
Hi,

Need some expert advice here ....

Are there anyway to attach database files to the database with No Recovery Option?
0
Comment
Question by:Keng0499
2 Comments
 
LVL 15

Expert Comment

by:Vikas Garg
ID: 40523422
Hi,

You can attach you database and then can change the recovery mode to Simple
0
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 2000 total points
ID: 40523872
No, sadly not.  Best would be a backup of the original db rather than individual files.  But that's probably not available and can't be obtained.

If the version you're attaching to is the same as the original db's version, you could try this:

Attach the db, allowing SQL to recover it (since you can't prevent it).  Be sure to use the same name as the original db.

Backup the db.  Drop the db.  Restore the db from the new backup with "NORECOVERY".  Then, still using NORECOVERY, try applying the differential and/or log file(s).

When you've applied all the files, do a final:
RESTORE DATABASE <db_name> WITH RECOVERY

to make the db operational.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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 ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

916 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