Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Restore database without trans log Expand / Collapse
Author
Message
Posted Friday, February 2, 2007 1:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, March 4, 2007 4:30 PM
Points: 1, 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?

Post #342193
Posted Friday, February 2, 2007 5:37 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 6:05 PM
Points: 1,190, Visits: 595

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
Post #342252
Posted Tuesday, February 20, 2007 1:32 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, March 12, 2010 3:04 PM
Points: 75, Visits: 35

Assuming that the database is offline, you could try sp_attach_single_file_db




Regards,

Carlos
Post #346155
Posted Wednesday, February 21, 2007 4:22 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, February 5, 2013 4:08 AM
Points: 58, 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

 

Post #346303
Posted Wednesday, February 28, 2007 3:42 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, May 22, 2008 6:58 AM
Points: 560, 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.

Post #348059
Posted Wednesday, February 28, 2007 3:33 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, November 20, 2013 4:10 PM
Points: 241, 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

Post #348324
Posted Thursday, March 1, 2007 6:43 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 3:34 AM
Points: 549, Visits: 1,554

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"
Post #348465
Posted Thursday, March 1, 2007 9:53 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 1:10 PM
Points: 3,135, Visits: 11,480

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

 

 

Post #348577
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse