Solved

Copy MDF and LDF files while SQL running?

Posted on 2007-03-30
10
11,416 Views
Last Modified: 2011-10-03
As a backup precaution, can we just copy all our SQL MDF and LDF files to another computer on the network periodically?

Can you copy these files without shutting down SQL  (ie while they are still Attached Databases).
0
Comment
Question by:Volibrawl
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 20

Accepted Solution

by:
Sirees earned 150 total points
Comment Utility
<< (ie while they are still Attached Databases).>>

No.

You can perform backups and store them.

0
 
LVL 13

Expert Comment

by:Atlanta_Mike
Comment Utility
Sirees is correct. Your best solution is to schedule a daily backup. If this is a critical application you need to run frequent log file backups. The more frequent your log file backups the less data you will loose in a disaster.
0
 
LVL 9

Author Comment

by:Volibrawl
Comment Utility
Where / how do you schedule daily backups and "frequent" log backups.  I am a novice at this ...   Is there a backup scheduling Wizard or something?

We have 2005 Management Studio.

0
 
LVL 13

Assisted Solution

by:Atlanta_Mike
Atlanta_Mike earned 100 total points
Comment Utility
Easiest way is to right mouse click on the database, select the options you want (i.e. Overwrite all existincg backups etc...)

Click the Script button. Copy the script.

Go to Management > SQL Server Agent > Jobs -- Right click on Jobs, select New Job
Enter name, select category (just informational)
Select Steps, New... > Name the step
Type should be T-SQL
Paste Backup job script in command screen and select OK
Select Schedules > add New... > configure your schedule...

That should get you where you need to be.

Take advantage of Books On Line (Help) ... its very good.
0
 
LVL 4

Expert Comment

by:eozz_2000
Comment Utility
Nop, you can do a Maintenance Plan without more problems, with that wizard, you'll get all the jobs that you need.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 4

Expert Comment

by:eozz_2000
Comment Utility
Well, I think that you must do a full backup of your database daily and differential backups during the day, of course, for each full backup you'll need a backup of your log and for each differential backup you'll need a log backup.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
>>We have 2005 Management Studio.<<
Which Edition of SQL Server 2005 are you using?  Enterprise, Standard, Developer, Express, ...?
0
 
LVL 9

Author Comment

by:Volibrawl
Comment Utility
Standard.
0
 

Expert Comment

by:amit_ary
Comment Utility
try this...

CopySharp is a GUI tool for copying open/inprocess/lock files. It is inspired by robocopy and vshadow.

CopySharp V1.0 requires .Net Framework 3.5 and VC++ 2005 Runtime. CopySharp V1.0 requires Microsoft® Windows® Server 2003, Microsoft® Windows® XP.

For Example:
1. Try to backup/copy your .pst file(s), while your outlook is open.
2. Try to backup/copy your .mdf/.ldf (SQL Server) files, while your SQL Server is running.  

Locate it at: http://www.amitchaudhary.com/
0
 
LVL 9

Author Comment

by:Volibrawl
Comment Utility
Thanks  for responding  .. although I have already adopted a different backup strategy, which works fine, I appreciate the advice.

Your utilities look great ... thanks for developing them.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now