Create Alerting System in Transcational replication

Hi,
Server A -->publisher and Distributor
Server B -->Subscriber
TX Replication,Pull Subscription.
Q:) we have configured replication and we are monitoring the replication using the following command
exec [distribution].sys.sp_replmonitorhelpsubscription @publisher = @@ServerName, @publication_type=0
GO
from this query we checking the status column for monitoring the replication.
at some time some subscription are missing where the data in publication and subscription are mismatch.
so,we execute the above query it looks fine that it cant displaying the subscription. In Replication monitor when we check particular publisher there is no subscription for that particular publisher. but in subscriber the subscription is present. so what
we do that is delete the subscription and recreate the subscription and make the re-initilize the subscription.
what we want is --> why the subscription is missing how can we find out it reasons ?
how to create a alert for this type of monitoring when subscription is missing(we check the column never expire subscriptionies)?

I maintain a table with the following schema and then have a job that executes a stored procedure that performs various checks (a management procedure that executes a dedicated procedure per each specific check). Regarding this specific request I use a procedure
called "sp_MonitorReplicationMissingSubscriptions", see code bellow. It is very simple and does the job. Based on this this method we also monitor missing articles, inactive articles, inactive subscriptions and more...
The idea is to compare the replication meta data (replication tables) against that reference table.
For easy mangemnet our add artcle and drop article scripts also populates that table or deletes from the table.
CREATE TABLE [dbo].[ReplicationConfiguration](
[InsertDate] [datetime] NOT NULL,
[Database] [sysname] NOT NULL,
[Publication] [sysname] NOT NULL,
[Article] [sysname] NOT NULL,
[NumSubscribers] [sysname] NULL,
[IsActive] [char](1) NOT NULL,
CONSTRAINT [PK_ReplicationConfiguration] PRIMARY KEY CLUSTERED
[Database] ASC,
[Publication] ASC,
[Article] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]
-- This is how the proc is called from the management procedure (outer procedure) populating a temp table which when all is OK has no rows and if there are rows a mail is sent
SELECT @cmd = NULL;
SELECT @cmd = N'INSERT #Data (Monitor, Article, Publication, NumSubscribers) EXEC [' + @Database + '].dbo.sp_MonitorReplicationMissingSubscriptions
@Publication = ''' + @Publication + ''', @Article = ''' + @Article + ''' , @NumSubscribers = ''' + @NumSubscribers + ''';';
--PRINT @cmd;
EXEC (@cmd);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_MonitorReplicationMissingSubscriptions]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].sp_MonitorReplicationMissingSubscriptions
GO
CREATE PROCEDURE [dbo].[sp_MonitorReplicationMissingSubscriptions]
@Publication sysname,
@Article sysname,
@NumSubscribers sysname
Yaniv Etrogi 31/01/2009
Get articles with missing subscriber
AS
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
--EXEC dbo.sp_MonitorReplicationMissingSubscriptions @Publication = 'BurstingDB', @NumSubscribers = '1';
-- Throw an exp and exit if the current db is not replicated
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = N'syssubscriptions')
BEGIN;
DECLARE @DBName sysname; SELECT @DBName = UPPER(DB_NAME());
RAISERROR (N'Database ''%s'' is not replicated. Stored procedure ''sp_MonitorReplicationMissingSubscriptions'' needs to be run on Published databases only.', 10, 1, @DBName );
RETURN;
END;
-- Verify that for each article there is an active subscription.
SELECT
'sp_MonitorReplicationMissingSubscriptions'
,A.name AS Article
,P.name AS Publication
,COUNT(s.artid) AS Cnt
FROM dbo.sysarticles A
LEFT JOIN dbo.syssubscriptions S ON A.artid = S.artid
LEFT JOIN dbo.syspublications P ON P.pubid = A.pubid
WHERE P.name = @Publication AND A.name = @Article
AND S.dest_db NOT LIKE 'virtual' AND S.srvid <> -1
GROUP BY P.name, A.name
HAVING COUNT(S.artid) <> @NumSubscribers ;
GO
EXEC sp_ms_marksystemobject 'sp_MonitorReplicationMissingSubscriptions';
Yaniv Etrogi
site |
blog | linked in |
mail
Please click the Mark as Answer button if a post solves your problem! or
Vote As Helpful

Similar Messages

  • PI 7.11 - How to create a System Error in SXMB_MONI using a Java Mapping

    Hi
    We ve go a  Java Mapping in a File-to-HTTP Scenario. It works perfect except of one error case: if an empty source file or a source file with the wrong structure is delivered. In this case our Java Mapping forwards an empty payload to the HTTP channel. So, for PI is the mapping successful.
    I'd like to recognize this case and invoke a system error in the SXMB_MONI, so that this mapping will be stopped and our alerting concept informs the users. I know, how to recognize the case in Java but need to know how to create the System Error Status in the PI System.
    Thanks in advance
    Michael

    Hi Michael,
    Please refer here for the mapping API description:
    http://help.sap.com/javadocs/NW04S/SPS09/pi/com/sap/aii/mapping/api/package-summary.html
    You can use the StreamTransformationException exception describet there to raise an error from your Java mapping. Direct link:
    http://help.sap.com/javadocs/NW04S/SPS09/pi/com/sap/aii/mapping/api/StreamTransformationException.html
    You might also consider using the "Empty-File Handling" option in sender file CC to avoid processing empty files by PI.
    Hope this helps,
    Greg

  • Creating Alerts in ALRTCATDEF

    Hi,
    Im trying to create Alerts for the interface of the scenario IDOC to JDBC.
    I have created it by using the tcode ALRTCATDEF.
    Can you please tell me what is the Container and what is the Element we have to give here and Object type, ABAP DIC reference,ABAP DIC datatype in that.
    On what basis i need to give these values here?
    Thanks in Advance.

    Hi Divya,
    You use the alert configuration to have the system inform you of errors during message processing. You can receive the alert by e-mail, fax, or SMS. In each case you will also find the alert in your alert inbox.
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    The link related to alert container
    http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm
    steps for processing the contianer
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b130453d11d189430000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b130453d11d189430000e829fbbd/frameset.htm
    if found worth pls do the req
    Thanx
    Sampath

  • Creating Alert Reports in BIP

    What is the best way to create alert (conditional) reports in BIP? I am relatively new to BIP. My apologies if this is a stupid question but I haven't found a solution that doesn't feel like a hack.
    We've used BIP bursting with a condition built into the bursting query to limit the recipients. But I believe it requires at least one recipient which makes me think it isn't supposed to work that way. I've searched for a better solution without result.
    OBIEE 'Delivers' supports conditional iBots. I wan't to do the same type of thing with BIP. Am I missing something?
    I've also considered using the Java API to kick off a report when the condition is met. But if it isn't needed I would rather skip that option.
    We are using BIP 10.1.3.4.0.
    Thanks!

    There is an interesting old post:
    http://oraclebizint.wordpress.com/2008/02/01/oracle-bi-ee-101332-calling-bi-publisher-java-apis-from-ibots-storing-reports-in-file-system-using-delivers-and-bi-publisher-scheduler/
    Where you can use iBots to trigger a BIP Report. As you can see this requires you develop a custom code and BIP APIs.
    Thanks
    Jorge A.

  • How to create alerts in xi

    hi friends,
    pls help on this topic creation of alterts.
    ravi

    Hi,
    Alert Configuration
    You use the alert configuration to have the system inform you of errors during message processing. You can receive the alert by e-mail, fax, or SMS. In each case you will also find the alert in your alert inbox.
    Prerequisites
    The following prerequisites have to be met in order to use the Alert Management (ALM):
    ·        For using the Alert Inbox (BSP based display program of ALM), the corresponding service has to be activated in the service maintenance transaction SICF. Choose Default_host  ®  sap  ®  bc ®  bsp ®  sap ® alert inbox, and Activate in the context menu.
    ·        For customizing or administration of the Alert Management the corresponding authorization role has to be assigned. The end users do not need any additional authorization. You find more information under Authorization Concept.
    ·        The central alert server must be maintained as an RFC destination in transaction SM59 in the local system. If there is no suitable user, you have to create a user for the RFC connection in the central alert system in transaction SU01 (see User Administration and Authorization Concept). To make this RFC destination known as the RFC destination of the Alert Management System in the local system, the central alert server must also be selected as the RFC destination in transaction SALRT1 of the local system or in Settings  ® RFC-Destination of Alert Server.
    If the central alert server is running on the local system in the same client, you do not have to maintain an RFC destination. In this case, you can simply enter NONE in transaction SALRT1.
    ·        If external communication types, such as e-mail, SMS, and fax are used, these communication types must be correctly configured in SAPconnect, because the alerts are then sent from the central alert system via SAPconnect.
    Process Flow
    The following describes the process flow from alert configuration (transaction ALRTCATDEF) to alert display and confirmation (for example in the alert inbox transaction ALRTINBOX):
           1.      Optional: You can define alert classifications. These are useful to group alert categories. For example, you can create an alert classification CRM that contains alert categories referring to CRM. Alert classifications can now have subclassifications. This enables you to build up your own classification hierarchy. Especially, if you use the Alert Mangement (ALM) extensively, classification and subclassification help you to organize your ALM alert landscape and to have a clear overview.
           2.      For different types of alerts you have to define different categories. The category contains various properties and other specifications that define the alerts within that category, for example expiry date, or the escalation recipient. You can define an alert category to suit your business requirements and assign the category to the corresponding classification. For example, for the alert classification CRM you can create the alert categories Contract Cancelled and Decrease in Sales. When the critical situation defined in the alert category arises, the system recognizes this and sends an alert instance of this category to the recipients determined. The alerts can always be found in the display programs configured for the recipient (UWL, application-specific program, or alert inbox). Additionally, the alerts are sent via eventual external communication channels, such as e-mail, sms, or fax.
           3.      You have to determine recipients so that the Alert Management knows who the recipients of alerts of a particular category are and that the correct parties are informed.
           4.      You can configure the way how alerts are processed. For the general use of the Alert Management you do not have to change the default settings. However, if for example you want to send alerts to third-party systems, or to be able to confirm alerts by SMS/Internet mail, or to have logs written, then you have to configure alert processing.
           5.      There is a number of Alert Management administration reports that you must schedule according to your requirements. For example, report RSALERTPROC must be executed in order to enable escalation.
           6.      Alerts of a particular category must be triggered by an application at runtime. Triggering alerts can be done in various ways. You can call a function module directly or use middleware components that trigger alerts, such as the Business Object Repository (BOR), Post Processing Framework (PPF), SAP Workflow, or CCMS.
           7.      Recipients can view the alerts assigned to them in the UWL of Enteprise Portal, in application-specific display programs, or in the alert inbox. In addition, alerts can be received as e-mail, SMS, or fax, if these external communication channels are configured in SAPconnect.
           8.      If the problem causing the alert is solved by a recipient, the recipient can confirm the alert, this means its status is changed and it will not be delivered, escalated, or displayed anymore. Alerts are generally confirmed by the recipient in the display program, such as the UWL or Alert Inbox. However, if an alert is sent by Internet mail or SMS message, it is also possible to confirm it by sending an Internet mail or SMS message back to the SAP system. Alert Management uses inbound processing for this.
    Please refer http://help.sap.com/saphelp_nw04/helpdata/en/49/cbfb40f17af66fe10000000a1550b0/frameset.htm for more details. This link contains everything about Alerts.
    Hope this will solve your query.
    Regards
    Aashish Sinha
    PS : reward points if helpful and don't forget to close this thread.

  • Error while creating a system object for R3 in portal

    Hi,
    I am getting error while trying to create a system object in portal.
    Following are the details I used :
    Under WAS...
    Web AS Host Name :<XXXX>:8001
    Web AS path: /sap/bc/bsp/sap/
    Web AS protocol : http
    Under User management:
    Authentication Ticket Type : SAP Logon Ticket
    Logon Method :SAPLOGONTICKET
    User Mapping Type : admin,user
    Under Connector:
    SAP Client : <Client NO>
    SAP System ID : <System ID>
    SAP System No : <System No>
    System Type : SAP_R3
    While trying with connection test... I am getting like this:
    SAP Web AS Connection
      Test Details:
    The test consists of the following steps:
    1. Checks the validity of system ID in the system object.
    2. Checks if the system can be retrieved from the PCD.
    3. Check whether a SAP system is defined in the system object
    4. Validate the following parameters: WAS protocol; WAS host name
    5. Checks if the host name of the server can be resolved.
    6. Pings the server to see if it is alive.
    7. Pings the WAS ping service; works only if the service is activated on the ABAP WAS.
    8. Checks HTTP/S connectivity to the defined back-end application
      Results
    1. The system ID is valid
    2. The system was retrieved.
    3. The system object represents an SAP system
    4. The following parameters are valid: Web AS Protocol (http) Web AS Host Name (<FQDN server name>:8001)
    5. The host name <FQDN Server Name> was resolved successfully.
    6. The server sapdwh01 could not be pinged successfully.
    Test Connection with Connector
      Test Details:
    The test consists of the following steps:
    1. Retrieve the default alias of the system
    2. Check the connection to the backend application using the connector defined in this system object
      Results
    Retrieval of default alias successful
    Connection failed. Make sure that Single Sign-On is configured correctly
    It seems that the portal is not able to ping to R3 system. I tried to ping to R3 server from portal server by command prompt. I am able to ping. Also under SICF, I can see ping service as in activated state.
    Kindly help.
    Regards,
    Niraj
    Edited by: Niraj Kumar on Dec 11, 2008 10:41 AM

    I created a SAP Transactional iView for transaction SE80.
    Also, I tried from under System Administration -> Support -> SAP Transaction. It is not working.
    Got portal Runtime error :
    Portal Runtime Error
    An exception occurred while processing your request
    Exception id: 12:57_11/12/08_0003_2795650
    See the details for the exception ID in the log file.
    Regards,
    Niraj

  • Why do we create logical systems in ALE?

    Hi All,
            i got this question in interview.
        Why do we create logical systems in ALE?
    Thanks & Regards
    suresh

    Hi
    In addition to above .
    A logical system is used to identify an individual client in a system, for ALE communication between SAP systems. That's why you see a field for 'logical system' in the client master data in SCC4 (table T000).
    /people/udo.martens/blog/2005/09/30/one-logical-system-name-for-serveral-bpm-acknowledgements
    http://help.sap.com/saphelp_nw04/helpdata/en/b5/1d733b73a8f706e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/69/c24ca94ba111d189750000e8322d00/content.htm
    http://72.14.203.104/search?q=cache:J-uDLyT0w54J:www.topxml.com/biztalkutilities/walkthroughs/SAP%2520Configuration.pdfwhatislogicalsystems+(SAP)&hl=en&gl=in&ct=clnk&cd=5
    http://help.sap.com/saphelp_nw04/helpdata/en/78/217dc151ce11d189570000e829fbbd/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/d7/9c73631d6c11d2a56e0060087832f8/content.htm
    This guide is really good shows step by step procedure.
    http://72.14.203.104/search?q=cache:Xyl0zxpyEXsJ:www.sappoint.com/abap/ale.pdfLogicalsystem(ALE)&hl=en&gl=in&ct=clnk&cd=9
    for one client config
    http://www.sappro.com/downloads/OneClientDistribution.pdf#search=%22Logical%20system(ALE)%22
    Please reward for the same.

  • How to find Installation Number in R3 to create Technical system in XI.

    Hi,
    how to find Installation Number in R3 to create Technical system in XI. can you please help me out.
    thanks
    siva.

    Hi Siva,
    Host name you can find at same location. Not sure about message server port (Basis team shall be able to provide this information)....
    However there is a very simple way fo creating technical system..
    Check out this Michals blog...its very easy
    /people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based
    Nilesh

  • Creating FRCommon system failed - in 11g Forms & Report Installation

    Dear all,
    When installing 11g Forms and Reports "*Creating FRCommon system failed - in 11g Forms & Report Installation*".
    I have successfully created the weblogic server 10.3.5 , and continued with 11g forms & reports. First Installed the forms & reports software, and i try to configure. after several steps of configuration i have failed when its place "*Creating FRCommon system failed - in 11g Forms & Report Installation*".
    What it is this Error.
    Kindly help me.
    My OS Windows
    Forms and reports 11gR2
    More info
    When i start the configuration i have chosen Forms & Reports server and Development tools in the configuration page along with OHS.
    Regards
    Hamid

    Hi experts,
    I have the same problem when I try to install oracle Fusion Middleware 11g, is it possible that I forget some steps before, or should I install required something before continue intallation?
    Best Regards.
    Karim.

  • Portal Runtime Error while creating  new system in portal content

    Hi
      Can anyone  solve my problem, i am geting error while creating new system in p ortal content
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : pcd:portal_content/com.sap.pct/admin.templates/iviews/editors/com.sap.portal.templateSelection
    Component Name : com.sap.portal.admin.templateselectionwizard.default
    com/sap/portal/iviewserver/cache/OClass.
    Exception id: 11:29_26/12/06_0014_5891950
    See the details for the exception ID in the log file

    Hi,
    Check this link for creating system object
    http://help.sap.com/bp_epv260/EP_EN/documentation/EP/N03_BB_InstallGuide_EN_US.doc
    Regards
    Arun

  • While creating Billing, system is very slow..performance issue

    Hi,
    While creating Billing, system is very slow. How can I debugg and provide the analysis where is the exact problem.
    This is showing performance issue.
    Waiting for kind response.
    Best Regards,
    Padhy
    Moderator Message : Duplicate post locked.
    Edited by: Vinod Kumar on May 12, 2011 10:59 AM

    hi,
    Chk the links
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/e71f39488fee0ce10000000a114084/content.htm
    Re: How to create Secondary Index?
    How may secondary indices I can create on the ODS?
    Deletion of ODS index
    Ramesh

  • Problem in Creating a System through WEB AS

    Hi ,
         I created a System (ECC 6.0) in Portal and testing it through WEB AS.I'am able to "Test the connection for Connectors" but when coming to test WEBAS am getting an error "<b>Test Details:
    The test consists of the following steps:
    1. Check the validity of the system ID in the system object
    2. Check whether the system can be retrieved
    3. Check whether a SAP system is defined in the system object
    4. Validate the following parameters: WAS protocol; WAS host name
    5. Check HTTP/S connectivity to the defined backend application
      Results
    1. The system ID is valid
    2. Retrieval of the system was successful
    3. The system object represents an SAP system
    4. The following parameters are valid: Web AS Protocol (http) Web AS Host Name (srtplecd:8000)
    5. HTTP/S connection failed</b> "
    please help me in this.
    with regards,
    pradeep.B

    Yes i had entered everything required for WAS and when i'am doing Connection Tests through WAS am getting this error "<b>SAP Web AS Connection
      Test Details:
    The test consists of the following steps:
    1. Check the validity of the system ID in the system object
    2. Check whether the system can be retrieved
    3. Check whether a SAP system is defined in the system object
    4. Validate the following parameters: WAS protocol; WAS host name
    5. Check HTTP/S connectivity to the defined backend application
      Results
    1. The system ID is valid
    2. Retrieval of the system was successful
    3. The system object represents an SAP system
    4. The following parameters are valid: Web AS Protocol (http) Web AS Host Name (srtplecd:8000)
    5. HTTP/S connection failed</b>"

  • Error While Creating Technical System for SNC

    Hi There,
    I am trying to create technical system for SNC in SLD, I am not able to seee SNC as a s/w component/product in the list.
    when I checked the list of components in SLD, I found SNC is there under product "SCMSNC" but this product is not in the list of products.
    Please help me how I can get "SCMSNC" product in the product list.
    Thanks,
    Nishant

    Can you please explain it little bit clearly?
    I think you first create product, then SWC and then try to create Technical system.
    While you will create the Technical system, in the last step it will ask you for installed products.
    There you can specify ur product.
    Thanks,
    Hetal

  • RUNTIME ERROR WHILE CREATING NEW SYSTEM IN EP6

    Hi
    Can anyone solve my problem, i am geting error while creating new system PORTAL FOR to connect biw 3.5 system
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : pcd:portal_content/com.sap.pct/admin.templates/iviews/editors/com.sap.portal.templateSelection
    Component Name : com.sap.portal.admin.templateselectionwizard.default
    com/sap/portal/iviewserver/cache/OClass.
    Exception id: 11:29_26/12/06_0014_5891950
    See the details for the exception ID in the log file
    thanks in advance
    Rock

    hi,
    check the log file and let me the the error.
    manish

  • Error while creating SOURCE SYSTEM

    Hi All,
    I have a problem while creating Source System to a Solman syatem configured with BW content. I have configured few some source systems already in the same Solman System.The system shows the following error, previous to this i get the message a "generating connection to the source system"
    <b>Error in source system RXX_100
    Message no. RSAR502
    Diagnosis
    With Remote Function Call to system RXX_100 error Screen output without connection to user.  ccurred.
    Procedure
    Remove the cause of the error.</b>
    Kindly provide me suggestions and DOCS related to the same.
    Suitable points will be awarded for replies.
    Expecting your kind reply,
    Vineeth

    Hi ,
    In SCC4 the source client should not set as production when creating the source system connection between two systems.Please check below SAP note
    973555 - System must be open for creating/connecting source systems
    Thanks,
    Shanaka

Maybe you are looking for

  • Custom Bios Request Samsung SSD AHCI on MS 1727

    Hi Svet, i have the same problem as the other guy, i have bought a Samsung 830 SSD for my MS 1727 Barebone notebook. The SSD is not visible in Bios with AHCI activated, only in IDE Mode. The MSIHQ Flashing Tool Informations: Mainboard:  MS-1727 PCB V

  • Need help in creating multiple signature forms?

    need help in creating multiple signature forms that can be digitally signed in adobe reader

  • Printing ABAP list in portrate format

    Hi,   In one of requirement I wanted to print a report   in portate format on A4 size paper. Report has been created with use of write statement only.   When I checked print properties it shows only standard some page format(all are landscape).I even

  • Copy attachment in mail

    Hi all, An interesting little problem.  I have a mail --> ECC proxy scenario.  My mail has 3 attachments; 1 is swapped (PayloadSwapBean) and mapped to the proxy where it creates an invoice.  The other two attachments are carried in the message header

  • IPad air,  links in email won't open

    I did  General/Restrictions ,   it said enabled, but as per suggestions I  disabled then enabled,  then shut down for 2 minutes. It did not solve the problem