Showing posts with label inadvertently. Show all posts
Showing posts with label inadvertently. Show all posts

Friday, March 30, 2012

HELP!... SQL Log Gone. How do I recover Database

As the subject says...
I will admit to some stupidity. I inadvertently deleted
the log file.
On top of that, it appears my backups have failed, so no
back up.
Data file still exists.
Please tell me there is a way to recover.
Thanks in advance.
SvenI would give MS PSS a call if it's important to get it back.
http://support.microsoft.com/default.aspx?scid=fh;EN-US;sql SQL Support
http://www.mssqlserver.com/faq/general-pss.asp MS PSS
But if all else fails here is something you can try:
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
Andrew J. Kelly
SQL Server MVP
"Sven Hansen" <svenhansen@.shaw.ca> wrote in message
news:079001c3af02$a07d2fa0$a101280a@.phx.gbl...
> As the subject says...
> I will admit to some stupidity. I inadvertently deleted
> the log file.
> On top of that, it appears my backups have failed, so no
> back up.
> Data file still exists.
> Please tell me there is a way to recover.
> Thanks in advance.
> Sven|||If you have the data file, then you can bring back your
database by using "sp_attach_db" coomand.
Look in BOL, for syntax and more info. Its very easy.
Good Luck!
-SQLVarad (MCDBA-1999,MCSE-1999)
>--Original Message--
>As the subject says...
>I will admit to some stupidity. I inadvertently deleted
>the log file.
>On top of that, it appears my backups have failed, so no
>back up.
>Data file still exists.
>Please tell me there is a way to recover.
>Thanks in advance.
>Sven
>.
>|||Since you have only data file, use this syntax
Example:
EXEC sp_attach_db @.dbname = 'pubs',
'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf'
SQL Server will automatically attach a new log file.
Good Luck!
SQLVarad (MCDBA-1999,MCSE-1999)
>--Original Message--
>As the subject says...
>I will admit to some stupidity. I inadvertently deleted
>the log file.
>On top of that, it appears my backups have failed, so no
>back up.
>Data file still exists.
>Please tell me there is a way to recover.
>Thanks in advance.
>Sven
>.
>|||You saved my life... and likely my job... :)
Thank you.
The script worked perfectly.
Take care and thanks again.
Sven
>--Original Message--
>I would give MS PSS a call if it's important to get it
back.
>http://support.microsoft.com/default.aspx?scid=fh;EN-
US;sql SQL Support
>http://www.mssqlserver.com/faq/general-pss.asp MS PSS
>But if all else fails here is something you can try:
>http://www.sqlservercentral.com/scripts/scriptdetails.asp
?scriptid=599
>Restoring a .mdf
>
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"Sven Hansen" <svenhansen@.shaw.ca> wrote in message
>news:079001c3af02$a07d2fa0$a101280a@.phx.gbl...
>> As the subject says...
>> I will admit to some stupidity. I inadvertently
deleted
>> the log file.
>> On top of that, it appears my backups have failed, so
no
>> back up.
>> Data file still exists.
>> Please tell me there is a way to recover.
>> Thanks in advance.
>> Sven
>
>.
>

Friday, March 9, 2012

HELP! (Not sure if first one went.)

I have inadvertently deleted my log file.
This in turn has rendered the Data file unusuable, and
unattachable.
Any clues how I can fix this.
I would appreciate any and all input.
THank you
SvenRestore your latest backup?
--
David Portas
--
Please reply only to the newsgroup
--
"Sven" <svenhansen@.shaw.ca> wrote in message
news:07a301c3af03$b385d100$a101280a@.phx.gbl...
> I have inadvertently deleted my log file.
> This in turn has rendered the Data file unusuable, and
> unattachable.
> Any clues how I can fix this.
> I would appreciate any and all input.
> THank you
> Sven
>|||Ignore. Others have already answered in a previous thread.
--
David Portas
--
Please reply only to the newsgroup
--