Thursday, March 22, 2012

Database Backup question

Greetings...
I have a tape drive that my data base it backed up to. I'm running SQL
Server 7 and I backup the entire MSSQL7 folder.
I needed to restore some data in the database. The file was going to
restore was my_database_name.mdf.
Is that the actual database file, and if not, what is?
The reason I ask is because when looking at the file in Windows Explorer,
the date modified was from a week ago, and I know the database has been
modified since then...it changes daily of course.
So basically...if I wanted to back up the database not using the backup in
SQL server, but the one I use for my tape drive, which file or files would I
back up? Any why doesn't the date modified show the current date, since the
database has been modified today?
Thanks
Dan
It's normal that the database file has an old time stamp even it's being
changed actively. The timestamp seems to reflect the time that the file gets
created.
The .mdf file is the data file, not the backup file. you can't restore from
it. You can use sp_attach_db to attach it. If you want to restore, probably
look for a backup file (with or without extension).
HTH.
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>
|||In order to successfully backup your .MDF and .NDF files (data and log),
using the scenario that you posed, you must FIRST stop the MSSQLServer
service. While SQL Server is running, those files will be open and you will
not be able to back them up properly.
Another option is to perform an sp_detachdb and once detached, backup the
data file.
You should really use the Backup features in SQL Server however.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
"Dan B" <none@.none.com> wrote in message
news:eLzrIfI3EHA.3416@.TK2MSFTNGP09.phx.gbl...
> Greetings...
> I have a tape drive that my data base it backed up to. I'm running SQL
> Server 7 and I backup the entire MSSQL7 folder.
> I needed to restore some data in the database. The file was going to
> restore was my_database_name.mdf.
> Is that the actual database file, and if not, what is?
> The reason I ask is because when looking at the file in Windows Explorer,
> the date modified was from a week ago, and I know the database has been
> modified since then...it changes daily of course.
> So basically...if I wanted to back up the database not using the backup
> in SQL server, but the one I use for my tape drive, which file or files
> would I back up? Any why doesn't the date modified show the current date,
> since the database has been modified today?
> Thanks
> Dan
>
|||On Tue, 7 Dec 2004 11:08:39 -0700, "Dan B" <none@.none.com> wrote:
>So basically...if I wanted to back up the database not using the backup in
>SQL server, but the one I use for my tape drive, which file or files would I
>back up?
By default, everything in your PRIMARY filegroup is in the one .mdf
file.
You can set up additional filegroups which are separately restorable.
As usual, see BOL.
J.

No comments:

Post a Comment