Transaction log maintainance

Hi All,
Is there anyway that i can clear the transaction logs within a specific timeperiod.
My primary objective is to keep this in daily automation so that it will backup the transaction logs for replay transaction and clear the previous logs.

Stop the application and have a script that deletes the files in the transaction log directory.
Or the official Oracle take is :-
*"Periodically, you might want to remove the transaction log store and the files in the Replay directory to increase available disk space on Essbase Server.*
*Transaction log store: Oracle recommends removing the transaction log store for one database at a time. The log store is in a subdirectory under the log location specified by the TRANSACTIONLOGLOCATION configuration setting. For example, if the log location for the Sample.Basic database is /Hyperion/trlog, delete the contents of the following directory:*
*/Hyperion/trlog/Sample/Basic*
*Replay directory: After you have replayed transactions, the data and rules files associated with the replayed transactions can be removed from the ARBORPATH/app/appname/dbname/Replay directory (see Configuring Transaction Replay). You can delete all of the files in the Replay directory, or follow these guidelines for selectively removing files:*
** Remove the data and rules files in chronological order, from earliest to latest.*
** Do not remove data and rules files with a timestamp that is later than the timestamp of the most recent archive file.*
*Note: Oracle recommends waiting until several subsequent database backups have been taken before deleting files associated with transaction logging and replay."*
Cheers
John
http://john-goodwin.blogspot.com/

Similar Messages

  • Transaction logs not being generated.

    Hi Team,
    We have configured the log shipping sucessfully on SQl 2000 & ECC 5.0. However it ran fine untill yesterdays night and today we found that logshipping is not happening as expected.
    Now ,we found that transactions logs are not being genereated. Couldn't find any errors and logshipping maintainance job seems to be in executing state from quite a long time. We tried stop / start the job manually but no sucess.
    Can some one please suggest.
    Thanks & Regards,
    Vinod

    Hi Markus,
    Recovery model is set to 'Full' only. Even when we take manual backup of transaction logs.it's not intitaing the process it was just hanging.
    Any idea wht could be causing this?
    Thanks & Regards,
    Vinod

  • Viewing a transaction log for a query

    Hi all,
    I have an application which has a query in some functionality of it.
    I want to check how many times in a month that query is referenced or used.
    I hope oracle maintains a transaction log or something of this sort.
    Is there a way to analyze this?
    Thanks in advance.
    BRK

    > I want to check how many times in a month that query is referenced or used.
    Simple answer, no.
    Yes, Oracle do have a transaction (redo and undo) logs. Yes, Oracle has advance features like flashback queries. But keeping track on how many times a query (SQL) has been used in a month? Not the best of ideas. I have SQLs that are run over a billion times per month. I do not have the storage space for Oracle to keep track on just when these were run, with that values, what the performance were, etc.
    Remember that on a busy system that runs 1000's of SQLs per second, there is no time to waste on maintaining something like a query log.
    > Is there a way to analyze this
    Simple answer, yes. The SQL Shared Pool will tell you how many times a query (cursor) in the pool has been executed - assuming that it has not been aged out of the pool as being "old and cold". AWR reporting can be used. Etc.
    The real question is what do you want to achieve with this analysis? The number of times a SQL is executed is meaningless on its own - additional measures are required for meaningful analysis.

  • SAP xMII Log/ SQL transaction Log

    We have an application where we are inserting data from a PLC to the SQL Server using the xMII.
    The SQL server no. of times gives the Transaction Log Full error.
    This causes the error any data insertion  or deletion in SQL
    In tern the xMII logs error, the log file for a day (in the Lighthammer\Logs\cms.log)is seen as large as 15 GB.
    We are not able to open such a huge file...
    Moreover we are unable to know if there are anyu other errors other than due to the SQL logged by xMII
    How can we see the Log created by xMII, this will help us in troubleshooting .
    Message was edited by:
            Amol Kurdukar

    Hi All,
    Thanks for the help.
    Ryan,
    I have resolved the issue of transaction log by archiving the Log at increased frequency.
    Jeremy,
    We are required to have the PLC data in SQL as the Customer wants to have that and they do not have any other database, SCADA  etc.
    The SQL server logs (consolidates) not only the PLC data but  data from some other devices as well
    Moreover this is data then used for confirming the production to SAP and maintaining the status of the confirmation. This also involves queuing of the data in SQL if the data is not confirmed to SAP for any reason.
    We are not logging the data every minute, The data is logged depending on a batch completion, shift completion etc.
    Hope this clarifies, let us know your comments.

  • Transaction Logs - Retention Period

    Hi,
    Which parameter/bg job is responsible for maintaining the transaction log for <n> number of days?
    Regards,
    Cs

    Hi Cs,
    The data is you get from STAD is stored at the OS level file (location given by the parameter stat/file). This parameter points by default to the instance-specific /Data-directory (for example: \usr\sap\<SID>\DVEBMGS00\data) however this can be changed depending on your choice.
    For each hour a new stat file is written.
    The parameter stat/maxfiles determines how many stat files will be written until the oldest is overwritten.
    So depending on your requirement and available disk space size, you can increase these parameters.
    Note - these parameters are instance specific. you have to maintain for each instance you may have.
    Regards,
    Debasis.

  • DPM doesn't clear transaction logs

    We use DPM 2012 to backup Exchange 2013. It works as shown the screenshot.
    However, the Exchange Admin Center shows no full backup.
    Also, we have a lot old transaction logs. How to DPM clear the transaction logs?
    Bob Lin, MCSE &amp; CNE Networking, Internet, Routing, VPN Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com

    Hi,
    Check the application event log for events from exchange after a DPM synchronization is complete.  Make sure DPM is configured to perform FULL backups for one copy of the DB's in the DAG and not just copy only. 
    DPM is not responsible for truncating exchange logs. Exchange Writer tells Information Store, that backup has completed. Now Information Store using its own logic can decide which logs can be truncated. Basically IS will retrieve from passive copies
    information about what is the oldest log not yet replayed to the database and will look for the Checkpoint at Log Generation in log header in this log. It will allow logs older than Checkpoint at Log
    Generation to be truncated. Approximately 200 logs should remain.
     See Tim’s excellent blog post on this subject:
    http://blogs.technet.com/b/timmcmic/archive/2012/03/12/exchange-2010-log-truncation-and-checkpoint-at-log-creation-in-a-database-availability-group.aspx
    http://blogs.technet.com/b/timmcmic/archive/2011/09/26/exchange-server-2010-and-system-center-data-protection-manager-2010.aspx#3455825
    FROM: http://technet.microsoft.com/en-us/library/dd876874.aspx   (exch 2013)
    http://technet.microsoft.com/en-us/library/dd876874(v=exchg.141).aspx  (exch 2012)
    Specifically, the Microsoft Exchange Replication Service manages CRCL so that log continuity is maintained and logs are not deleted if they are still needed for replication. The Microsoft Exchange
    Replication Service and the Microsoft Exchange Information Store service communicate by using remote procedure calls (RPCs) regarding which log files can be deleted.
    For truncation to occur on highly available (non-lagged) mailbox database copies, the answer must be "Yes" to the following questions:
    * Has the log file been backed up, or is CRCL enabled?
    * Is the log file below the checkpoint?
    * Do the other non-lagged copies of the database agree with deletion?
    * Has the log file been inspected by all lagged copies of the database?
    For truncation to occur on lagged database copies, the answer must be "Yes" to the following questions:
    * Is the log file below the checkpoint?
    * Is the log file older than ReplayLagTime + TruncationLagTime?
    * Is the log file deleted on the active copy of the database?
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This
    posting is provided "AS IS" with no warranties, and confers no rights.

  • The system failed to flush data to the transaction log. Corruption may occur.

    We have a windows server 2008 R2 Virtual machine and we are getting the following Warning Event.
    Event 51 Volmgr
    The system failed to flush data to the transaction log.  Corruption may occur.
    Any idea what is wrong with this server? Why this event is occurring?

    Hi Jitender KT,
    Before going further, would you please let me know the complete error message that you can find (such as a
    screenshot if you can provide)? Please check and confirm in Event Viewer if there other related event you can find, such as Event 57 and so on. Meanwhile, can you remember what operations you have done before the warning occurred?
    Based on current message that you provided, please run
    Chkdsk command to check if you can find error. The issue seems to be related to the storage device. Please refer to the following similar question.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/044b10af-c253-46de-b40d-ce9d128b83d7/event-id-57-source-volmgr?forum=winservergen
    In addition, please also refer to the following link. It should be helpful.
    http://www.eventid.net/display-eventid-57-source-volmgr-eventno-8865-phase-1.htm
    Hope this helps.
    Best regards,
    Justin Gu

  • Cannot write to transaction log "C:\Program Files (x86)\SAP BusinessObjects\sqlanywhere\database\BI4_Audit.log

    Hi friends,
    My server Intelligence Agent (SIA) can not start because the database service "SQLAnywhereForBI" can't start also. I got the following error :
    "I . 08/09 20:35:06. A read failed with error code: (1392), Le fichier ou le répertoire est endommagé et illisible.
    E. 08/09 20:35:06. Fatal error:  cannot write to transaction log "C:\Program Files (x86)\SAP BusinessObjects\sqlanywhere\database\BI4_Audit.log"
    E. 08/09 20:35:06. unable to start database "C:\Program Files (x86)\SAP BusinessObjects\sqlanywhere\database\BI4_CMS.db"
    E. 08/09 20:35:06. Error writing to transaction log file
    I. 08/09 20:35:06. Database server shutdown due to startup error "
    inside the database log file.
    Please, can you help me

    I found the solution by following the advice given on the following forum:
    http://evtechnologies.com/transaction-logs-on-sybase-sql-anywhere-and-sap-​​businessobjects-bi-4-1
    In fact, I crushed the BI4_Audit.db and BI4_Audit.log files and I replaced with others that I got from another machine where I installed BO again and where the files are not corrupted . After I logged in to the CMS database by executing the command in the command line:
    dbisql -c "UID = DBA; PWD = mypassword; BI4 Server =; DBF = C: \ Program Files (x86) \ SAP BusinessObjects \ sqlanywhere \ database \ BI4_CMS.db."
    Once connected, I start the command:
    alter database 'C: \ Program Files (x86) \ SAP BusinessObjects \ sqlanywhere \ database \ BI4_Audit.db' alter log off;
    The query runs successfully.
    And that's good, I can be connected to BO smoothly.
    Thank you again Eric

  • Error in db6conv failed due to transaction log full

    Hi,
    I have a huge problem with my production system.
    I was executing db6conv v4.08  to convert a table to a new tablespace and it stopped due to a transaction log full.
    Now I have this situation:
    table soffcont1
    db6conv: status: preliminary
    I check the job db6conv_job_soffcont1 with status scheduled.
    The problem is that when I want to execute this jobs it gives me an error:
    Definition of job db6conv_job_soffcont1 is incomplete. Operation is not possible.
    regards,
    filipe vasconcelos

    hi filipe,
    i will follow up on this problem in you OSS message.
    regards, frank

  • How does one read the Unity transaction logs on Exchange?

    I'm trying to find out who placed a call to whom on a particular day and time.  A subscriber receives a blank email periodically with no "from" statement, just a timestamp. They don't have unified messaging.  I want to see if the transaction logs (located on Exchange) contain that information but they are all cryptic symbols.  Is there an application or utility to read tham?  These are the files located in the \Exchsrvr\MDBDATA folder. This is Unity 5.x and Excahnge 2003. Thanks.

    Hi,
    I think you may be wanting to look at Message Tracking?
    http://www.msexchange.org/tutorials/Exchange-2003-Message-Tracking-Logging.html
    But here's also an explanation of the transaction logging and how to read them from the same site:
    http://www.msexchange.org/articles/Transaction-Logs-Lifeblood-Exchange.html
    Hope that helps,
    Brad

  • Transaction log and access log

    The transaction log (TransactionLogFilePrefix) and the access log are stored
    relative to the directory where the server is started rather than where it
    resides as with the rest of the log files. Why is this?
    Eg.
    I start the server with a batch file contained in
    projects\bat
    My server is in
    projects\server\config\myDomain
    When I start the server the access and transaction logs end up in
    projects\bat
    while all the rest of the log files (such as the domain and server log) end
    up in
    projects\server
    My batch file that starts the server looks like this
    "%JAVA_HOME%\bin\java" -hotspot -ms64m -mx64m -classpath %CLASSPATH%
    "-Dbea.home=e:\bea"
    "-Djava.security.policy==i:\projects\server\config\myDomain\weblogic.policy"
    "-Dweblogic.Domain=myDomain" "-Dweblogic.Name=adminServer"
    "-Dweblogic.RootDirectory=i:/projects/server"
    "-Dweblogic.management.password=weblogic" weblogic.Server
    Thanks for help on this,
    Myles

    The same case with me, I sent email to apple support, but got not reply.
    The apple status page indicated that every thing is fine now, what a joke.
    Many devs are in this situation too, I guess we could do nothing but waiting for their system to come up.

  • Transaction log shipping restore with standby failed: log file corrupted

    Restore transaction log failed and I get this error: for only 04 no of database in same SQL server, renaming are working fine.
    Date                     
    9/10/2014 6:09:27 AM
    Log                        
    Job History (LSRestore_DATA_TPSSYS)
    Step ID                
    1
    Server                  
    DATADR
    Job Name                           
    LSRestore_DATA_TPSSYS
    Step Name                        
    Log shipping restore log job step.
    Duration                             
    00:00:03
    Sql Severity        0
    Sql Message ID 0
    Operator Emailed           
    Operator Net sent          
    Operator Paged               
    Retries Attempted         
    0
    Message
    2014-09-10 06:09:30.37  *** Error: Could not apply log backup file '\\10.227.32.27\LsSecondery\TPSSYS\TPSSYS_20140910003724.trn' to secondary database 'TPSSYS'.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: An error occurred while processing the log for database 'TPSSYS'. 
    If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
    An error occurred during recovery, preventing the database 'TPSSYS' (13:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
    RESTORE LOG is terminating abnormally.
    Processed 0 pages for database 'TPSSYS', file 'TPSSYS' on file 1.
    Processed 1 pages for database 'TPSSYS', file 'TPSSYS_log' on file 1.(.Net SqlClient Data Provider) ***
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  Skipping log backup file '\\10.227.32.27\LsSecondery\TPSSYS\TPSSYS_20140910003724.trn' for secondary database 'TPSSYS' because the file could not be verified.
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  Deleting old log backup files. Primary Database: 'TPSSYS'
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  The restore operation completed with errors. Secondary ID: 'dd25135a-24dd-4642-83d2-424f29e9e04c'
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: Could not cleanup history.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.38  ----- END OF TRANSACTION LOG RESTORE    
    Exit Status: 1 (Error)

    I Have restore the database to new server and check with new log shipping but its give this same error again, If it is network issue i believe issue need to occur on every database in  that server with log shipping configuration
    error :
    Message
    2014-09-12 10:50:03.18    *** Error: Could not apply log backup file 'E:\LsSecondery\EAPDAT\EAPDAT_20140912051511.trn' to secondary database 'EAPDAT'.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-12 10:50:03.18    *** Error: An error occurred while processing the log for database 'EAPDAT'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
    An error occurred during recovery, preventing the database 'EAPDAT' (8:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
    RESTORE LOG is terminating abnormally.
    can this happened due to data base or log file corruption, if so how can i check on that to verify the issue
    Its not necessary if the issue is with network it would happen every day IMO it basically happens when load on network is high and you transfer log file which is big in size.
    As per message database engine was not able to restore log backup and said that you must rebuild log because it did not find out log to be consistent. From here it seems log corruption.
    Is it the same log file you restored ? if that is the case since log file was corrupt it would ofcourse give error on wehatever server you restore.
    Can you try creating logshipping on new server by taking fresh full and log backup and see if you get issue there as well. I would also say you to raise case with Microsoft and let them tell what is root cause to this problem
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • Transaction log full

    Transaction log is full in production system ,when i was tried login into sap system it show the error message 'SNAP_NO_NEW_ENTRIES'.
    our system is db2 and AIX ,can any body hlep us step by step procedure for reslove the issue .
    For best answer will reward.
    Thanks
    Imran khan

    you have to increase the sum of the logs in order to enlarge the database log...plz do not forget that the log must fit the underlying file system, eg. /db2/<SID>/dir_log..so you might have to increase this as well using SMITTY...
    <b>(DB6) [IBM][CLI Driver][DB2/AIX64] SQL0964C  The transaction log for the database is full.  SQLSTATE=57011</b>
    <i>[root] > su - db2<sid></i>
    <i>1> db2 get db cfg for <SID> | grep -i logfilsiz</i>
    Log file size (4KB)                         (LOGFILSIZ) = 16380
    <i>2> db2 get db cfg for <SID> | grep -i logprimary</i>
    Number of primary log files                (LOGPRIMARY) = 20
    <i>3> db2 get db cfg for <SID> | grep -i logsecond</i>
    Number of secondary log files               (LOGSECOND) = 40
    so we have log file of max. 16.380 * 4.096 * 60 = 4.025.548.800 bytes (about 4 gb)...this needs to be increased by increasing either LOGPRIMARY and/or LOGSECONDARY...(assuming that your logfile size is 16kb...query db2 for your size!)
    <i>4> db2 update db cfg for <SID> using logsecond 80 immediate</i>
    DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.
    SQL1363W One or more of the parameters submitted for immediate modification
    were not changed dynamically. For these configuration parameters, all
    applications must disconnect from this database before the changes become
    effective.
    <i>5> db2 get db cfg for <SID> | grep -i logprimary</i>
    Number of primary log files                (LOGPRIMARY) = 20
    <i>6> db2 get db cfg for <SID> | grep -i logsecond</i>
    Number of secondary log files               (LOGSECOND) = 80
    <i>7> db2stop</i>
    02/20/2007 09:17:12     0   0   SQL1064N  DB2STOP processing was successful.
    SQL1064N  DB2STOP processing was successful.
    <i>8> db2start</i>
    02/20/2007 09:17:19     0   0   SQL1063N  DB2START processing was successful.
    SQL1063N  DB2START processing was successful.
    -> plz keep in mind that the sap system needs to be down when re-starting db2...
    check via snapshot:
    <i>9> db2 get snapshot for database on <SID></i>
    <b>Log space available to the database (Bytes)= 2353114756 (= 2.353 MB)
    Log space used by the database (Bytes)     = 4329925244 (= 4.329 MB)</b>
    Maximum secondary log space used (Bytes)   = 2993640963
    Maximum total log space used (Bytes)       = 4330248963
    Secondary logs allocated currently         = 46
    Appl id holding the oldest transaction     = 9
    so now our log is about 6.5 gb ...<b>see sapnote 25.351 for details</b>...
    GreetZ, AH

  • What is the current schedule for 6.1.2 and will it fix the Exchange transaction log issue in 6.1?

    Just spent the entire night with virtually no sleep with our firm's group of IT engineers trying to keep our Exchange system online due to massive transaction log growth. Confirmed the issue related to 6.1 calendar bug with Activesync. The workarounds are not practical for large groups of users who depend on their mobile devices for work. Our users have no way of knowing that they are causing an issue so the Apple guidance isnt terribly useful to communicate to 1000 users. When can we expect a resolution? The problem is only going to get worse as more and more users hit the bug. Does anyone know if the issue will resolve as soon as someone installs the 6.1.2 update, assuming that has the fix. Im not trying to bash anyone but this is a very serious problem in enterprise deployments.

    The update was released some time today. 6.1.2 appears to specifically fix the Exchange issue causing excess comms and logging issues. However, although the update is available i do not see the notification badge on the Settings icon. Is this controlled by Apple or is there a user setting i am missing somewhere? I would prefer that all users see the badge to expedite user action.

  • Log Reader Agent: transaction log file scan and failure to construct a replicated command

    I encountered the following error message related to Log Reader job generated as part of transactional replication setup on publisher. As a result of this error, none of the transactions propagated from publisher to any of its subscribers.
    Error Message
    2008-02-12 13:06:57.765 Status: 4, code: 22043, text: 'The Log Reader Agent is scanning the transaction log for commands to be replicated. Approximately 24500000 log records have been scanned in pass # 1, 68847 of which were marked for replication, elapsed time 66018 (ms).'.
    2008-02-12 13:06:57.843 Status: 0, code: 20011, text: 'The process could not execute 'sp_replcmds' on ServerName.'.
    2008-02-12 13:06:57.843 Status: 0, code: 18805, text: 'The Log Reader Agent failed to construct a replicated command from log sequence number (LSN) {00065e22:0002e3d0:0006}. Back up the publication database and contact Customer Support Services.'.
    2008-02-12 13:06:57.843 Status: 0, code: 22037, text: 'The process could not execute 'sp_replcmds' on 'ServerName'.'.
    Replication agent job kept trying after specified intervals and kept failing with that message.
    Investigation
    I could clearly see there were transactions waiting to be delilvered to subscribers from the followings:
    SELECT * FROM dbo.MSrepl_transactions -- 1162
    SELECT * FROM dbo.MSrepl_commands -- 821922
    The following steps were taken to further investigate the problem. They further confirmed how transactions were in queue waiting to be delivered to distribution database
    -- Returns the commands for transactions marked for replication
    EXEC sp_replcmds
    -- Returns a result set of all the transactions in the publication database transaction log that are marked for replication but have not been marked as distributed.
    EXEC sp_repltrans
    -- Returns the commands for transactions marked for replication in readable format
    EXEC sp_replshowcmds
    Resolution
    Taking a backup as suggested in message wouldn't resolve the issue. None of the commands retrieved from sp_browserreplcmds with mentioned LSN in message had no syntactic problems either.
    exec sp_browsereplcmds @xact_seqno_start = '0x00065e220002e3d00006'
    In a desperate attempt to resolve the problem, I decided to drop all subscriptions. To my surprise Log Reader kept failing with same error again. I thought having no subscription for publications log reader agent would have no reason to scan publisher's transaction log. But obviously I was wrong. Even adding new log reader using sp_addLogreader_agent after deleting the old one would not be any help. Restart of server couldn't do much good either.
    EXEC sp_addlogreader_agent
    @job_login = 'LoginName',
    @job_password = 'Password',
    @publisher_security_mode = 1;
    When nothing else worked for me, I decided to give it a try to the following procedures reserved for troubleshooting replication
    --Updates the record that identifies the last distributed transaction of the server
    EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1
    -- Flushes the article cache
    EXEC sp_replflush
    Bingo !
    Log reader agent managed to start successfully this time. I wish if I could have used both commands before I decided to drop subscriptions. It would have saved me considerable effort and time spent re-doing subscriptions.
    Question
    Even though I managed to resolve the error and have replication funtioning again but I think there might have been some better solution and I would appreciate if you could provide me some feedback and propose your approach to resolve the problem.

    Hi Hilary,
    Will the below truncate the log file marked for replication, is there any data loss, when we execute this command, can you please help me understand, the internal working of this command.
    EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1

Maybe you are looking for

  • RAW vs JPEG colours

    Hi, I've been having a sort of a problem or a question for a long time already. Namely, are the colours of JPEG and RAW quite a lot different? To me RAW colours look very unnatural and weird (If you are interested and it is of any help, then I can la

  • Exporting from Lightroom to Photoshop.

    I have set the necessary preferences so as to export from Lightroom to PS CC. However when i try to export a file then PS CC fails to open. However PSE 11 opens but with no file! Any help would be appreciated. thanks GM

  • MDB not listening to JMS Queue

    We are using OC4J 10.1.2 We are using JMS for queueing, the Queueing application sucessfully displays the JMS message id, but MDB is NOT listening to the JMS for some reason. We have verified the deployment config files etc. Can amy one help

  • Can't select table cell with big css table border

    Hi When I create a table with a border in css, bigger than 6px, I can't select a cell or even put text in it, other than in the code window. Can you explain or help ?

  • T Code for Generating Service Tax Half Yearly Return i.e. ST3 in 4.6 Versio

    Hi, Can anybody tell what is the T Code for Generating Service Tax Half Yearly Return i.e. ST3 in 4.6 Version. Regards Srinivas