Solved

detach & reattach error logs?

Posted on 2006-11-16
4
340 Views
Last Modified: 2010-05-18
the reason i'm asking this question is that i found (by dropping error logs) my DB size decreases substantially.  

they're not needed immediately, but i'd like to save them (for now) and if possible reload into the database.   is this even possible?
0
Comment
Question by:nespa
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17962167
I have answered this part for ur previous question...
You can set the option how soon you can recycle it, by default it is unlimited. In order to recycle it , right click on the SQLServerLog from EM, and set the option there
0
 
LVL 1

Author Comment

by:nespa
ID: 17962225
yes, my question evolved a bit (and i noticed your response came in just after i accepted the last question - thanks for the last bit).  

but i started a new question... here's my problem:

1) DB size is out of control.  i'm performing many things including archival of unnecessary data.
2) When i delete the error logs it clears a lot of space
3) These error logs may be needed for viewing later... I'd like to analyze them when I have more time
4) However right now I want them *out* of the DB, to free space.

Is this possible?   Is it possible to detach an error log, archive it (as files only), then re-attach it later & use sp_readerrorlog to read it?   that would help me out.
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17962238
you can change the path of the default path, i got this from another newsgroup

In Enterprise Manager, right click the server and choose
Properties. Click on the startup parameters button and
add a new one. For example to move it to c:\errorlog
you would add a new parameter

-ec:\errorlog\ERRORLOG


Then remove the old -e parameter (be careful it's the right one!)
Stop and restart the SQL Service and it's done.


You can backup up your previous settings before doing this by
exporting the following registry key (default instance)


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\Parameters

0
 
LVL 1

Author Comment

by:nespa
ID: 17962280
excellent - great find.   thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now