Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
new911
Starting Member
1 Post |
Posted - 2009-05-25 : 18:01:05
|
Hi I am new to SQL server.I need to restore or attache the database. This database is 9gb.It also has two log files 30gb each.I need to restore the databases so that I do not have big log files.I tried to detach the database and to attache it without log files but it gives errors.The operating system returned error 38(Reached the end of the file.) to SQL Server during a read at offset 0000000000000000 in file 'd:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DBNAME_1.ldf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.Could not open new database 'DBNAME01'. CREATE DATABASE is aborted.File activation failure. The physical file name "d:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DBNAME01_1.ldf" may be incorrect.File activation failure. The physical file name "d:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DBNAME01_2.ldf" may be incorrect.The log was not rebuilt because there is more than one log file. (Microsoft SQL Server, Error: 823)I also tried to do the back up and restore but I could not do it how to do it withought backing up log files.I will apreciated any help.Thanks, 911 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2009-05-25 : 18:26:39
|
You can't restore without the logs and with more than one log you can't attach without the logs. Quite frankly, you shouldn't be trying. The log is not an optional component of the database. It's essential in ensuring transactional consistency and discarding the log can cause nasty problems.I've helped out with 3 nasty cases so far this month where people deleted the logs and lost data or caused massive downtime as a result.Attach the DB with all of its log files, then read through the following article, sort out what's making the log so big and resolve it and then do a once off shrink. Managing Transaction Logs: [url]http://www.sqlservercentral.com/articles/64582/[/url]--Gail ShawSQL Server MVP |
 |
|
|
|
|