February 2, 2007 at 1:56 pm
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?
February 2, 2007 at 5:37 pm
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
February 20, 2007 at 1:32 pm
Assuming that the database is offline, you could try sp_attach_single_file_db
Carlos
February 21, 2007 at 4:22 am
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
February 28, 2007 at 3:42 am
February 28, 2007 at 3:33 pm
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.
March 1, 2007 at 6:43 am
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"
March 1, 2007 at 9:53 am
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
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply