SQL query

When we copy the Database Datafiles (after SQL server is shutdown gracefully) from the source to the target DB instance, is there a way we can bring up the DB in the “restoring” state to allow us to apply additional transaction log files?
LVL 10
jmanishbabuAsked:
Who is Participating?
 
Lee SavidgeConnect With a Mentor Commented:
Not that I am aware of. When moving db files form one server to another, you either detach a reattach or do a back up and restore. If you back it up, it will commit the transaction logs to the database backup and when you restore it will all be there and it will start creating its own transaction logs as you use it.
0
 
Lee SavidgeCommented:
If you're just copying the database files, I wouldn't do that. Just do a backup and restore.
0
 
jmanishbabuAuthor Commented:
Is there any way if the  DB in the “restoring” state to allow us to apply additional transaction log files?
0
 
Ephraim WangoyaCommented:
Backup and Restore with no recovery. Then you can continue restoring transaction log backups from the source server.
0
 
Scott PletcherSenior DBACommented:
>> copy database files from source to target instance, can we [then] bring up the DB in the “restoring” state? <<

No; there is absolutely no way to do that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.