i have a database that's about 1.8GB and would like to back it up. I just
found out about it, but am reluctant to backup it up with the software GUI
part since it's my only database.
Will it work if I copied the Data File (.mdf) and the Transaction Log (.ldf)
to another disk manually to be safe, and then do a backup of the database
using SQL Enterprise?
Also, if I were to create a backup of the .mdf and the .ldf files if
something should happen to the .bak file can I use the data file to create a
new database from it? If so, how?Do the backup using the BACKUP command in SQL Server. Only copying the files in not guaranteed. If
you at all want to go that way, look into sp_detach_db and sp_attach_db.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ae" <ae@.discussions.microsoft.com> wrote in message
news:CAF78B51-7924-4617-A4E4-BD8CCA77C95B@.microsoft.com...
>i have a database that's about 1.8GB and would like to back it up. I just
> found out about it, but am reluctant to backup it up with the software GUI
> part since it's my only database.
> Will it work if I copied the Data File (.mdf) and the Transaction Log (.ldf)
> to another disk manually to be safe, and then do a backup of the database
> using SQL Enterprise?
> Also, if I were to create a backup of the .mdf and the .ldf files if
> something should happen to the .bak file can I use the data file to create a
> new database from it? If so, how?|||ae wrote:
> i have a database that's about 1.8GB and would like to back it up. I just
> found out about it, but am reluctant to backup it up with the software GUI
> part since it's my only database.
> Will it work if I copied the Data File (.mdf) and the Transaction Log (.ldf)
> to another disk manually to be safe, and then do a backup of the database
> using SQL Enterprise?
> Also, if I were to create a backup of the .mdf and the .ldf files if
> something should happen to the .bak file can I use the data file to create a
> new database from it? If so, how?
Copying the .mdf and .ldf files to another disk is not to be safe - it's
actually the opposite...:-). When the SQL Server service is running, you
can't copy the files. If you stop the service to copy the files, your
database will be unavailable which means that you'll have some down
time. As Tibor mentions, if you just copy the files with out using
detach there are no guarantee that you will be able to attach the files
to the new database. Even if you use the detach/attach method it's
actually not as safe as using a backup. When you run sp_detach_db, you
have 2 database files that you need to attach before you have working
database again. This means that even your original database is not
available/working. Theoretically something could go wrong, so it fails
to run sp_attach_db when want to get you original database running
again. In that case you have lost everything - even your original database.
If you use the backup, you'll have your original database running all
the time. If the backup doesn't work, you can just do a new backup since
nothing has happened to your original database.
Regards
Steen|||hey thanks for the info., if i'm reading this correct when i do the backup if
something should go wrong (whatever that may be). the actual database will
never get damaged?
the worst thing that can happen i will have to reattempt to do a backup a
second time.
"Steen Persson (DK)" wrote:
> ae wrote:
> > i have a database that's about 1.8GB and would like to back it up. I just
> > found out about it, but am reluctant to backup it up with the software GUI
> > part since it's my only database.
> >
> > Will it work if I copied the Data File (.mdf) and the Transaction Log (.ldf)
> > to another disk manually to be safe, and then do a backup of the database
> > using SQL Enterprise?
> >
> > Also, if I were to create a backup of the .mdf and the .ldf files if
> > something should happen to the .bak file can I use the data file to create a
> > new database from it? If so, how?
>
> Copying the .mdf and .ldf files to another disk is not to be safe - it's
> actually the opposite...:-). When the SQL Server service is running, you
> can't copy the files. If you stop the service to copy the files, your
> database will be unavailable which means that you'll have some down
> time. As Tibor mentions, if you just copy the files with out using
> detach there are no guarantee that you will be able to attach the files
> to the new database. Even if you use the detach/attach method it's
> actually not as safe as using a backup. When you run sp_detach_db, you
> have 2 database files that you need to attach before you have working
> database again. This means that even your original database is not
> available/working. Theoretically something could go wrong, so it fails
> to run sp_attach_db when want to get you original database running
> again. In that case you have lost everything - even your original database.
> If you use the backup, you'll have your original database running all
> the time. If the backup doesn't work, you can just do a new backup since
> nothing has happened to your original database.
> Regards
> Steen
>|||> hey thanks for the info., if i'm reading this correct when i do the backup if
> something should go wrong (whatever that may be). the actual database will
> never get damaged?
If depends on what you mean by "something goes wrong". If the disk where the database sis crashes,
well, you cannot expect the database to be healthy... :-)
But I take it you mean if something goes wrong with the backup procedure. Then, don't worry. Just
redo the backup.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ae" <ae@.discussions.microsoft.com> wrote in message
news:2A4B9FD5-BC7A-4130-B7F4-B32BA31610A5@.microsoft.com...
> hey thanks for the info., if i'm reading this correct when i do the backup if
> something should go wrong (whatever that may be). the actual database will
> never get damaged?
> the worst thing that can happen i will have to reattempt to do a backup a
> second time.
> "Steen Persson (DK)" wrote:
>> ae wrote:
>> > i have a database that's about 1.8GB and would like to back it up. I just
>> > found out about it, but am reluctant to backup it up with the software GUI
>> > part since it's my only database.
>> >
>> > Will it work if I copied the Data File (.mdf) and the Transaction Log (.ldf)
>> > to another disk manually to be safe, and then do a backup of the database
>> > using SQL Enterprise?
>> >
>> > Also, if I were to create a backup of the .mdf and the .ldf files if
>> > something should happen to the .bak file can I use the data file to create a
>> > new database from it? If so, how?
>>
>> Copying the .mdf and .ldf files to another disk is not to be safe - it's
>> actually the opposite...:-). When the SQL Server service is running, you
>> can't copy the files. If you stop the service to copy the files, your
>> database will be unavailable which means that you'll have some down
>> time. As Tibor mentions, if you just copy the files with out using
>> detach there are no guarantee that you will be able to attach the files
>> to the new database. Even if you use the detach/attach method it's
>> actually not as safe as using a backup. When you run sp_detach_db, you
>> have 2 database files that you need to attach before you have working
>> database again. This means that even your original database is not
>> available/working. Theoretically something could go wrong, so it fails
>> to run sp_attach_db when want to get you original database running
>> again. In that case you have lost everything - even your original database.
>> If you use the backup, you'll have your original database running all
>> the time. If the backup doesn't work, you can just do a new backup since
>> nothing has happened to your original database.
>> Regards
>> Steen|||ae wrote:
> hey thanks for the info., if i'm reading this correct when i do the backup if
> something should go wrong (whatever that may be). the actual database will
> never get damaged?
> the worst thing that can happen i will have to reattempt to do a backup a
> second time.
>
That's correct.
Regards
Steen
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment