How to limit the size of a log file.

Hi,
I am developing an application that creates a log file with all actions that take place. My problem is that this log file grows a lot because the application acts as a server that is up 24 hours a day. For that reason, I wanted to limit the size of the log file by deleting de older lines, how can implement is?
Thanks.

One way is to periodically (say every week) create a new file to store the actions and then, when the space taken up by all the files is too large, delete the oldest one.
You can also have your application periodically (say the first time you write to the file on any calendar day) check the size of the file and, when it gets too big, copy all of the actions in the file after a given time (presumably there is an associated timestamp with each action) to a new file. Then delete the old file.

Similar Messages

  • How to increase the size of Redo log files?

    Hi All,
    I have 10g R2 RAC on RHEL. As of now, i have 3 redo log files of 50MB size. i have used redo log size advisor by setting fast_start_mttr_target=1800 to check the optimal size of the redologs, it is showing 400MB. Now, i want to increase the size of redo log files. how to increase it?
    If we are supposed to do it on production, how to do?
    I found the following in one of the article....
    "The size of the redo log files can influence performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Generally, larger redo log files provide better performance, however it must balanced out with the expected recovery time.Undersized log files increase checkpoint activity and increase CPU usage."
    I did not understand the the point however it must balanced out with the expected recovery time in the above given paragraph.
    Can anybody help me?
    Thanks,
    Praveen.

    You dont have to shutdown the database before dropping redo log group but make sure you have atleast two other redo log groups. Also note that you cannot drop active redo log group.
    Here is nice link,
    http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_34.shtml
    And make sure you test this in test database first. Production should be touched only after you are really comfortable with this procedure.

  • How to limit the size of large core file

    These days in my project I am facing big trouble of large core files .
    I want to limit the size of the core file .
    Please help for same .
    Regards ,
    Abhi

    Hi Abhishek,
    You can explain more.
    OS?
    DB?
    SAP Version?
    /usr/sap/SID/DVEBMGS00/work/
    SAP folder is full and creating issue.
    Regards,
    V Srinivasan

  • How to reduce the size of redo log files

    Hi,
    I am using Oracle Database 9.2.0.1.0. My present redo log files are of 100 MB each
    (redo01.log,redo02.log,redo03.log) which tooks more time to swicth the logs.
    I want to change the size to 20MB each so that log switcjing will be faster.
    Please let me know the exact step to resize the redo log files so that Ican change it.
    Regards,
    Indraneel

    Technical questions cannot be answered here. Please, post in the right forum :
    General Database Discussions

  • Private strand flush not complete how to find optimal size of redo log file

    hi,
    i am using oracle 10.2.0 on unix system and getting Private strand flush not complete in the alert log file. i know this is due to check point is not completed.
    I need to increase the size of redo log files or add new group to the database. i have log file switch (checkpoint incomplete) in the top 5 wait event.
    i can't change any parameter of database. i have three redo log group and log files are of 250MB size. i want to know the suitable size to avoid problem.
    select * from v$instance_recovery;
    RECOVERY_ESTIMATED_IOS     ACTUAL_REDO_BLKS     TARGET_REDO_BLKS     LOG_FILE_SIZE_REDO_BLKS     LOG_CHKPT_TIMEOUT_REDO_BLKS     LOG_CHKPT_INTERVAL_REDO_BLKS     FAST_START_IO_TARGET_REDO_BLKS     TARGET_MTTR     ESTIMATED_MTTR     CKPT_BLOCK_WRITES     OPTIMAL_LOGFILE_SIZE     ESTD_CLUSTER_AVAILABLE_TIME     WRITES_MTTR     WRITES_LOGFILE_SIZE     WRITES_LOG_CHECKPOINT_SETTINGS     WRITES_OTHER_SETTINGS     WRITES_AUTOTUNE     WRITES_FULL_THREAD_CKPT
    625     9286     9999     921600          9999          0     9     112166207               0     0     219270206     0     3331591     5707793please suggest me or tell me the way how to find out suitable size to avoid problem.
    thanks
    umesh

    How often should a database archive its logs
    Re: Redo log size increase and performance
    Please read the above thread and great replies by HJR sir. I think if you wish to get concept knowledge, you should add in your notes.
    "If the FAST_START_MTTR_TARGET parameter is set to limit the instance recovery time, Oracle automatically tries to checkpoint as frequently as necessary. Under this condition, the size of the log files should be large enough to avoid additional checkpointing due to under sized log files. The optimal size can be obtained by querying the OPTIMAL_LOGFILE_SIZE column from the V$INSTANCE_RECOVERY view. You can also obtain sizing advice on the Redo Log Groups page of Oracle Enterprise Manager Database Control."
    Source:http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10752/build_db.htm#19559
    Pl also see ML Doc 274264.1 (REDO LOGS SIZING ADVISORY) on tips to calculate the optimal size for redo logs in 10g databases
    Source:Re: Redo Log Size in R12
    HTH
    Girish Sharma

  • Pdf file is too big (7MB). Need a pdf file with max size 4MB. How to minimize the size of a pdf file?

    pdf file is too big (7MB). Need a pdf file with max size 4MB. How to minimize the size of a pdf file?

    The other alternative is the Save As Other>Reduce File Size. The PDF Optimizer gives you more control. You might also use the audit feature in the PDF Optimizer to see where the size problem is coming from. You might find that in the WORD file you can select and image and then go to the FORMAT (pictures) menu and select compress for all of the bitmaps in the file. That will typically use 150 dpi by default that is adequate for most needs.

  • How to limit the size of bounced messages

    Hi,
    how can i limit the size of bounced messages?
    In most cases, we have users which accounts are over quota, the mail bounces and is returned.
    How can i limit the size of the returned message to a maximum size of 1MB?
    We're using
    iPlanet Messaging Server 5.2 HotFix 2.02 (built Oct 21 2004)
    libimta.so 5.2 HotFix 2.02 (built 13:42:55, Oct 21 2004)
    thx,
    ghfg

    Ah. found it. It is indeed in 5.2
    http://docs.sun.com/source/816-6009-10/mta.htm#24585
    look down the page, and find:
    CONTENT_RETURN_BLOCK_LIMIT
    this when put in the option.dat file will limit your response to the
    CONTENT_RETURN_BLOCK_LIMIT=
    number of 1k blocks.

  • How to limit the size of the connection method parameter

    I connected an FMS server like var nc = new NetConnection ();
                                                      nc.connect ("rtmfp :/ / localhost: 61018/zy/1", a);
    But how to restrict the size of the parameter a, assuming that this a set to a 10GB object, or a very large byte, I found that the server received. This allows the hacker attacks, Is there any way to limit the size of this a, I hope that does not exceed 100KB.

    RTMFP encodes low-level messages in a manner compatible with RTMP messages. RTMP messages are length-field limited to 16MB (24 bits), and there is an artificial software limit somewhat less than that (approximately 10MB if i recall correctly).
    it should not be possible to send a connect message to an RTMFP or RTMP server exceeding about 10MB.
    ByteArray is limited to 4GB, and can't be serialized to AMF beyond 512MB (29 bits).
    also keep in mind that for an RTMFP or RTMP server to receive such a large message, that many bytes must be sent to it from somewhere (you).

  • How to delete the data in archived log files

    hi
    how can i delete the enteries in archived log files. and what is the disadvantage of deleting archived log enteries.

    There is no documented way to delete data stored in archived log files: you can only remove the archived log files if needed.

  • How to Limit the Number of Users Logged into HTML DB

    I'm using LDAP based SSO and I'd like to limit the number of users who can log into the application at a given time. If my users are assigned to groups, can I also limit the number of users who belong to a certain group who can be logged in at one time? Can anyone think of any HTML DB APIs that might be useful in doing this?

    Well if you apply a "time-out" on the session and if the there is a HTML DB table in the FLOWS account that can be queried to see the number of sessions, then you could restrict HTML DB sessions to a certain number. But if you have multiple HTML DB applications, how are you going to know which HTML DB session goes which application?
    It is very ugly. I realistically cannot see a way. Maybe the Oracle folks have a way of limiting the sessions internally within HTML DB
    Just out of curiosity, why do you want to limit the number of users? Maybe if you explain that then that might help in coming up with a solution.
    Mike

  • How to identified the size of table logging (SCU3)

    hi SAP Expert,
    currently i'm activating the table logging via parameter REC\CLIENT = ALL, understand that this will accumulate the log times to times, is there anyway i can identified how big is the log file already? since i'm concern the log files would make my hardisk full. thanks for any respon.
    Regards
    Hariyono

    Table logging write to table DBTABPRT, just check the size of the table in DB02 (or number of entries in SE16) you can track the growth of the table and wipe the contents once the data is been consumed by whoever requested it.
    You can check in DB02 in what tablespace the table is located and make sure that theres enough space in the filesystem for the table to grow without causing inconvenients.
    Regards
    Juan

  • How to know the size of archived logs created under ASM

    I using Oracle 10g on Linux x86-64.
    I need to ship the archived logs(not the entire directory, only a few) from the Live database to the DR site, so I need an estimate of how much time it will take to ship them across the network ?
    Is there anyway I can know the size of a specific archived log file stored under ASM ?
    We can use du in ASM to know the size of directory but I dont find a command in ASM to get the size of a file ?

    No we are also switching logfiles manually , so the maximum size may not
    have reached.
    What I need is something like ls -l command in the Unix prompt which will
    help us to find the size of the file , a similar command to help us determine
    a size of file in ASM ?What is the objective?
    Anyways, you can get the size of an archived log file by quering V$ARCHIVED_LOG view.
    SQL> select sequence#, name, blocks*block_size from v$archived_log where sequence# > 180;
    SEQUENCE# NAME                                     BLOCKS*BLOCK_SIZE
           182 C:\MYDB\ARCH\ARC00182_0633314306.001             223053312
           181 C:\MYDB\ARCH\ARC00181_0633314306.001             264281600
           183 C:\MYDB\ARCH\ARC00183_0633314306.001              26209280
           184 C:\MYDB\ARCH\ARC00184_0633314306.001                  4096
           185 C:\MYDB\ARCH\ARC00185_0633314306.001                 16384
    SQL>

  • How to limit the size in a cell belonging to a JTable

    We are handeling a JTable control and we've just realized we aren't able to capture the focuslost event in this control. Hence, We want to know how we can advise the user when he has written more character than are allowed.

    here jr. Look at this...
    //Prior to J2SE 1.4, limiting the capacity of a text component involved overriding
    //the insertString() method of the component's model. Here's an example:
        JTextComponent textComp = new JTextField();
        textComp.setDocument(new FixedSizePlainDocument(10));
        class FixedSizePlainDocument extends PlainDocument {
            int maxSize;
            public FixedSizePlainDocument(int limit) {
                maxSize = limit;
            public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
                if ((getLength() + str.length()) <= maxSize) {
                    super.insertString(offs, str, a);
                } else {
                    throw new BadLocationException("Insertion exceeds max size of document", offs);
    //J2SE 1.4 allows the ability to filter all editing operations on a text component.
    //Here's an example that uses the new filtering capability to limit the capacity of the text component:
        JTextComponent textComponent = new JTextField();
        AbstractDocument doc = (AbstractDocument)textComponent.getDocument();
        doc.setDocumentFilter(new FixedSizeFilter(10));
        class FixedSizeFilter extends DocumentFilter {
            int maxSize;
            // limit is the maximum number of characters allowed.
            public FixedSizeFilter(int limit) {
                maxSize = limit;
            // This method is called when characters are inserted into the document
            public void insertString(DocumentFilter.FilterBypass fb, int offset, String str,
                    AttributeSet attr) throws BadLocationException {
                replace(fb, offset, 0, str, attr);
            // This method is called when characters in the document are replace with other characters
            public void replace(DocumentFilter.FilterBypass fb, int offset, int length,
                    String str, AttributeSet attrs) throws BadLocationException {
                int newLength = fb.getDocument().getLength()-length+str.length();
                if (newLength <= maxSize) {
                    fb.replace(offset, length, str, attrs);
                } else {
                    throw new BadLocationException("New characters exceeds max size of document", offset);
        }

  • Page by page iterator, how to limit the size of returned results

    Hi all,
    I am designing a search result page using a page by page iterator pattern. Let's say my SQL query returns 100 results. I want to show the first 20 on the result page and provide links to the rest. I am thinking to write a SQL query that tells the total number of the results and only return the first 20 results with all the attributes I need so that I can limit the network usage. I also need to know where to proceed to the next 20 and so on. The query is a simple join of two tables. What would be the query look like?
    thanks,
    JS

    One way is to periodically (say every week) create a new file to store the actions and then, when the space taken up by all the files is too large, delete the oldest one.
    You can also have your application periodically (say the first time you write to the file on any calendar day) check the size of the file and, when it gets too big, copy all of the actions in the file after a given time (presumably there is an associated timestamp with each action) to a new file. Then delete the old file.

  • How to limit the size of the displayed drop down ?

    Hello,
    basically the subj.
    I'm generating the drop down item from SQL based LOV.
    one of the records is looooong.
    Is there a way to limit the length of the drop down so it doesn't occupy 1/2 of the page?
    // i tried substr in LOV - it didn't produce expected result.
    Thank you.
    Andrew

    Chris,
    it's interesting - I have a text area to the right of the "select list" item. When i use your code that area moves furher to the right.
    I observe - the actual size of drop down doesn't change. only the size of the td can be increased...
    I'm using FF
    Here is the html code . I chopped off the rest of the values in options:
    <td align="left" rowspan="1" colspan="1" style="display: block; width: 100px;">
    <input type="hidden" value="3657620048154732" name="p_arg_names"/>
    <select id="P1_SELECT_BA" onchange="get_APP(this,'P1_SELECT_APP'); get_SRV(this,'P1_SELECT_SERVER')" size="1" name="p_t01">
    <option value="NULL">- No BA Selected -</option>
    <option value="Accounting">Accounting</option>
    <option value="Audit">Audit</option>
    <option value="BSD">BSD</option>
    //chopped off here

Maybe you are looking for

  • Homogeneous System Copy on VMWare

    We are executing a Homegeneous System Copy of (based on the+ Homogeneous and Heterogeneous system Copy for SAP Systems Based on SAP Web Application Server Java 6.40 Patch Collection+ Installation Guide) on windows 2003 server, following the Oracle 9.

  • ESS Links Description

    Hi all, how to change the description of the personal data link in Personal Information. "Enter,change or delete your data" this description i need to change . where do i need to change in R/3. Regards, rameshb

  • Pavilion desktop freezes on start up

    I have a Pavilion desktop: SN: {Personal Information Removed} PR: H2L81AA Model P71549. I had previously called HP support a few months ago as the computer would not shutdown when I would use the shutdown feature on the Start menu. The case # for thi

  • Issue with onmouseover when attempting to change bgcolor

    I am setting up a skeleton jsp page to be used by my team which will consist of a header, left nav, and a footer. The issue I am having is that on the left nav I want the menu items to change color based on an onmouseover or onmouseout event. I know

  • Cost center screen layout rules

    Hi All,           In the cost center master data field cost center catagory and person responsible is mandatory i would like to make it optional can anyone advice how to do.          thanks in advance. regards, Pranav