SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restore database without trans log


Restore database without trans log

Author
Message
Linda Davis-403851
Linda Davis-403851
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 1

The trans log was deleted for our database in SQL 2005 due to size (she thought it would re-create the .ldf like MS Access recreates the creates an .ldb file). The database was fine until that point. Is there any way to get that database up and running without restoring from backup? The last back up was two weeks ago and we don't want to have to re-enter all that data. Any ideas?


MohammedU
MohammedU
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1862 Visits: 812

It is gracefully file closed...

Try CREATE DATABASE with ATTACH_REBUILD_LOG option ...

See BOL for syntax..

http://msdn2.microsoft.com/en-us/library/ms176061.aspx



MohammedU
Microsoft SQL Server MVP
Carlos Pereyra
Carlos Pereyra
SSC Journeyman
SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)

Group: General Forum Members
Points: 97 Visits: 35

Assuming that the database is offline, you could try sp_attach_single_file_db




Regards,

Carlos
Nido786
Nido786
SSC-Enthusiastic
SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)

Group: General Forum Members
Points: 106 Visits: 324

we have another way to rebuit a new log file

you just detach the database and attached with new log file option through enterprise manager attached and deattached utility option .

it will automatically built ur new log file and u dont need to resotre ur dtabase again .

Syed Muhammad Naveed

Database Administrator

Karachi Pakistan


Charbel-371270
Charbel-371270
SSChasing Mays
SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)

Group: General Forum Members
Points: 614 Visits: 21

oh, this post help me a lot

i was going to make a post asking how to resotre a database with a new log file and deleteing the big old one

thanks a lot





If something's hard to do, then it's not worth doing.

BeerBeerBeer
BeerBeerBeer
Old Hand
Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)

Group: General Forum Members
Points: 383 Visits: 74

What concerns me most about this thread is that there appears to be a lack of understanding about maintaining a SQL Server and its files.

With the right backup strategy and database settings, transaction log file size can be kept to a minimum - one that is relevant for the volume of data being read/inserted/updated.

Add to this some capacity planning and you reduce the risk of getting into these situations.

Not to mention that having a two week gap between backups is a dangerous way to live. Even for development databases where the data is not considered critical, there should be some strategy in place to allow the mimicking of the production environment and the protection of the data.

Having fallen into this trap and seen the trouble and pain it can cause, I strongly recommend that those of you who have experienced this problem take some time to look in BOL at backup strategies to reduce the likelihood of this happening again.




Regards,

Steve

Life without beer is no life at all

All beer is good, some beers are just better than others

Minaz Amin
Minaz Amin
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1110 Visits: 1750

I strongly agree with Steve, As a DBA our primary goal is to save data. Depending on your business requirement you should have different recovery model.

Please make a point :

1) Backing upthe database with right back plan.

2) Checking the datafilw and log file growth and adminstrating it.

3) Develop a DRP in case of disaster.

Minaz Amin



"More Green More Oxygen !! Plant a tree today"
Michael Valentine Jones
Michael Valentine Jones
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5708 Visits: 11771

It's seems really common from the posts I read. Check out this ongoing thread with links to posts of people that need to restore but don't have backups. A lot of people seem to assume that SQL Server takes care of this for them.

It's dead, Jim
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67782


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search