Home > Archive > MS SQL Server New Users > October 2005 > Newbie









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Newbie
Dr Who

2005-10-27, 7:55 am

Hi,

I have a problem that I am hoping to get some help with. We had a propritary
database made for us (VB and SQL Server 2000).

There have been several times where the software has crashed and we have had
to uninstall it and reinstall it. We have also had to restore the backup.
About half of the time the customer does not ahve a recent backup (they are
suppose to backup nightly). I have tried to copy what appears to be the data
into the program directory once the program is reinstalled. The two files I
copy are PROGRAM NAME_Data.mdf and PROGRAM NAME_Log.ldf. This does not work.

Any guesses if there is a transaction log the the Microsoft SQL 2000
directory that I am missing or is this something that just cannot be done?


Mike Hodgson

2005-10-27, 7:55 am

They're almost certainly the correct files, but you just can't do that
with SQL Server. To make redundant copies of SQL data & log files you
have to either use the T-SQL BACKUP statement (to produce a backup file
- the normal, kosher, most widely accepted way of copying/backing up
databases) or detach the files (using sp_detach_db) and then copy the
detached files with explorer or some other O/S level tool.

--
*mike hodgson*
blog: http://sqlnerd.blogspot.com



Dr Who wrote:

>Hi,
>
>I have a problem that I am hoping to get some help with. We had a propritary
>database made for us (VB and SQL Server 2000).
>
>There have been several times where the software has crashed and we have had
>to uninstall it and reinstall it. We have also had to restore the backup.
>About half of the time the customer does not ahve a recent backup (they are
>suppose to backup nightly). I have tried to copy what appears to be the data
>into the program directory once the program is reinstalled. The two files I
>copy are PROGRAM NAME_Data.mdf and PROGRAM NAME_Log.ldf. This does not work.
>
>Any guesses if there is a transaction log the the Microsoft SQL 2000
>directory that I am missing or is this something that just cannot be done?
>
>
>
>


Dr Who

2005-10-27, 7:55 am

Thanks for the reply Mike.

Is there a way to restore the mdf and ldf files into a brand new
installation of SQL server 2000?



"Mike Hodgson" wrote:

> They're almost certainly the correct files, but you just can't do that
> with SQL Server. To make redundant copies of SQL data & log files you
> have to either use the T-SQL BACKUP statement (to produce a backup file
> - the normal, kosher, most widely accepted way of copying/backing up
> databases) or detach the files (using sp_detach_db) and then copy the
> detached files with explorer or some other O/S level tool.
>
> --
> *mike hodgson*
> blog: http://sqlnerd.blogspot.com
>
>
>
> Dr Who wrote:
>
>

bakedmike via SQLMonster.com

2005-10-27, 7:55 am

Yes, create the databases on the new install and restore or attach.
Dr Who wrote:[color=darkred
]
>Thanks for the reply Mike.
>
>Is there a way to restore the mdf and ldf files into a brand new
>installation of SQL server 2000?
>
>[quoted text clipped - 23 lines]


--
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Fo...eneral/200510/1
Mike Hodgson

2005-10-27, 7:55 am

Yeah, assuming they've been detached properly (with sp_detach_db), you
can use sp_attach_db. If they haven't been detached properly then you
can try sp_attach_db but all bets are off (and in all likelihood it
won't work, but you might get lucky).

--
*mike hodgson*
blog: http://sqlnerd.blogspot.com



Dr Who wrote:
[color=darkred]
>Thanks for the reply Mike.
>
>Is there a way to restore the mdf and ldf files into a brand new
>installation of SQL server 2000?
>
>
>
>"Mike Hodgson" wrote:
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com