Best Way to Capture Stored Procedure Calls through Extended Events?

I am trying implement Real Simple Solution for Database Monitoring:
If any of the RPC Calls takes more than 200 milliseconds or more than 10K Reads , I want to compile the list on daily basis and sent out an email to our team. We usually did that through RPC Completed event through Profiler.
We want to Implement the same through Extended Events but SQL Text is not being captured because we are using SQL Server 2008 R2.
Whats the best way with Extended Events to Capture:
RPC Calls with Parameters and Values and Reads, Writes, CPU and Query HASH.
What we currently have is :
Has anyone done this using SQL Server 2008 R2 and  please let me know.
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='LongRunningQueries')
DROP EVENT SESSION [LongRunningQueries] ON SERVER;
CREATE EVENT SESSION [LongRunningQueries]
ON SERVER
ADD EVENT sqlserver.module_end(
ACTION (sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.database_id, sqlserver.plan_handle, sqlserver.session_id, sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.username)),
ADD EVENT sqlserver.rpc_completed(
ACTION (sqlserver.client_app_name, sqlserver.client_hostname, sqlserver.database_id, sqlserver.session_id, sqlserver.sql_text, sqlserver.username)),
ADD EVENT sqlserver.sp_statement_completed(
ACTION (sqlserver.client_app_name, sqlserver.session_id))
ADD TARGET package0.asynchronous_file_target(
SET filename='G:\LongRunningQueries.xet', metadatafile='G:\LongRunningQueries.xem')
WITH (MAX_MEMORY = 4096KB, EVENT_RETENTION_MODE = ALLOW_MULTIPLE_EVENT_LOSS, MAX_DISPATCH_LATENCY = 300 SECONDS, MAX_EVENT_SIZE = 0KB, MEMORY_PARTITION_MODE = NONE, TRACK_CAUSALITY = ON, STARTUP_STATE = ON)
ALTER EVENT SESSION [LongRunningQueries] ON SERVER STATE = START
I90Runner

Hello,
Please read the following resource.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d6d51f6e-c01b-4880-abb2-4f0cfd1f4531/extended-event-trace-on-event-rpccompleted-not-capturing-sqltext-action-unable-to-retrieve-sql?forum=sqldatabaseengine
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com

Similar Messages

  • Capture error messages from stored procedure calls

    Hi there,
    How do I capture a stored procedure calls error messages provided the stored procedures does not have output parameters? This questions applies to Oracle 7.3.4 stored procedures calls.
    TQ
    Neo

    There are two parts.
    The stored proc must 'throw' an exception.
    And java must catch it.
    You probably already have the java part. That is the catch(SQLException).
    As for the stored proc you can use the following search string in the jdbc forum
    raise oracle
    You need to use 'raise' in the stored proc but I am not sure of the exact form, but one of the threads using the above search string is likely to have it.

  • Remote Stored Procedure Call Dispatcher WEB WERVICE

    Hello all,
    Environment: Windows OS, Oracle 10g, mod_plsql
    I am looking for solutions to the following problem:
    A way to dispatch calls to stored procedures from client to server with a minimal impact on performance.
    We are looking at two possible solutions:
    1) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through mod_plsql.
    2) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through a web service.
    Solution 1) is not the preferred one as you may already know that mod_plsql will not be supported starting 12g.
    Solution 2) is the one we prefer as we believe that web services will be ever more supported in the future. When we move to 11g we may turn this web service into a native one (avoiding overhead in the OC4J for hosting the web service etc.).
    We are looking for code examples and information pointers of how we could implement this dispatcher as a stored procedure in a DB package. We know that the implementation should be similar to the one done for mod_plsql in the OWA schema but the code there is obfuscated, so we could not borrow ideas from there.
    We are not sure how to deal with the generalization of the above stated problem. We need to be able to pass to this dispatcher the stored procedure package and name we are invoking, ordered list of parameters (or parameters map), and the transport strategy (XML, JSON, etc.).
    Basically, we are notsure how to deal with the USING clause of the EXECUTE IMMEDIATE statement. We can dynamically generate the SQL statement corresponding to the stored procedure we want to call, but we are not sure how to bind the parameters we are passing?
    Also, we know that EXECUTE IMMEDIATE may be slow sometimes. So if could avoid it, this could further improve performance.
    Perhaps the run-time generalized stored procedure execution may not be what we are looking for?! Perhaps we should include several design-time steps?! What about a script that given a package name (or just a single stored procedure) would generate a wrapper package which stored procudures' names would correspond to their respective counterparts in the given package which would take two parameters - the list of parameters in some sort of format, and the transport (content delivery strategy) and would return the result in the given content delivery strategy?! This script may also define the XSD of the XML message a stored procedure is called with (the parameter map) as well as the XSD of the XML result the stored procedure returns. Also the script could generate client code with the given language strategy (Java, .NET, etc.) for calling the RSPCDispatcher web service.
    We request the following from the Oracle community folks:
    a) Please, give us any relevant information that could be helpful to resolve this problem.
    b) Any resource of how to inspect stored procedures in a package, its parameters, parameter types and direction (IN, OUT, or INOUT), etc.
    Thank you very much in advance.
    Regards,
    Georgi

    Hello all,
    Environment: Windows OS, Oracle 10g, mod_plsql
    I am looking for solutions to the following problem:
    A way to dispatch calls to stored procedures from client to server with a minimal impact on performance.
    We are looking at two possible solutions:
    1) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through mod_plsql.
    2) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through a web service.
    Solution 1) is not the preferred one as you may already know that mod_plsql will not be supported starting 12g.
    Solution 2) is the one we prefer as we believe that web services will be ever more supported in the future. When we move to 11g we may turn this web service into a native one (avoiding overhead in the OC4J for hosting the web service etc.).
    We are looking for code examples and information pointers of how we could implement this dispatcher as a stored procedure in a DB package. We know that the implementation should be similar to the one done for mod_plsql in the OWA schema but the code there is obfuscated, so we could not borrow ideas from there.
    We are not sure how to deal with the generalization of the above stated problem. We need to be able to pass to this dispatcher the stored procedure package and name we are invoking, ordered list of parameters (or parameters map), and the transport strategy (XML, JSON, etc.).
    Basically, we are notsure how to deal with the USING clause of the EXECUTE IMMEDIATE statement. We can dynamically generate the SQL statement corresponding to the stored procedure we want to call, but we are not sure how to bind the parameters we are passing?
    Also, we know that EXECUTE IMMEDIATE may be slow sometimes. So if could avoid it, this could further improve performance.
    Perhaps the run-time generalized stored procedure execution may not be what we are looking for?! Perhaps we should include several design-time steps?! What about a script that given a package name (or just a single stored procedure) would generate a wrapper package which stored procudures' names would correspond to their respective counterparts in the given package which would take two parameters - the list of parameters in some sort of format, and the transport (content delivery strategy) and would return the result in the given content delivery strategy?! This script may also define the XSD of the XML message a stored procedure is called with (the parameter map) as well as the XSD of the XML result the stored procedure returns. Also the script could generate client code with the given language strategy (Java, .NET, etc.) for calling the RSPCDispatcher web service.
    We request the following from the Oracle community folks:
    a) Please, give us any relevant information that could be helpful to resolve this problem.
    b) Any resource of how to inspect stored procedures in a package, its parameters, parameter types and direction (IN, OUT, or INOUT), etc.
    Thank you very much in advance.
    Regards,
    Georgi

  • WCF OData Service stored procedure call generates "Operation could destabilize the runtime" error with $select option

    I've been trying to call a stored procedure through Entity Framework and WCF Data Services (OData). It returns an entity not a complex type. Following walkthroughs found all over the web, I came up with this code inside my service:
    [WebGet]
    public IQueryable<Entity> GetEntitiesByParameterId(int parameterId)
    return CurrentDataSource.GetEntitiesByParameterId(parameterId).AsQueryable();
    Calling the proc this way: ~WcfService.svc/GetEntitiesByParameterId?parameterId=1 executes
    the stored procedure and returns entities that should be returned. No problem there.
    Everything works well until I try to use $select OData option ie. ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name.
    Upon debugging, the method above runs without any error but it returns an Operation could destabilize the runtime error upon reaching the
    client. After so much research, apparently it is a very general error pointing to a lot of different causes. I haven't found one that really matches my particular problem. Closest are 
    http://stackoverflow.com/questions/378895/operation-could-destabilize-the-runtime
    https://social.msdn.microsoft.com/Forums/en-US/d2fb4767-dc09-4879-a62a-5b2ce96c4465/for-some-columns-entity-properties-executestorequery-failed-with-error-operation-could?forum=adodotnetdataservices 
    but none of the solutions worked on my end.
    Also, from the second article above:
    This is a known limitation of WCF DS. ...
    Second is that some of the queries won't work correctly because LINQ to EF needs little different LINQ expressions than LINQ to Objects in some cases. Which is the problem you're seeing.
    It has been posted on 2012. If it its true, are there still no updates on this? And is there any other workaround to get the $select working on the stored proc call?
    What works:
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$top=1
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$skip-5
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$filter={filter query}
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$expand=SomeNavigationProperty
    What doesn't work:
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name
    Tech details:
    EntityFramework 5, WCF Data Service 5.0, OData V3
    *I've also tried upgrading to EF6 and WCF 5.6.2 and it still didn't work.
    Any help would be appreciated. Thanks!

    Someone from SO replied to my question there and said that $select is still not supported though I couldn't find any definitive documentation about it.
    From what I gather and observed, $select breaks the stored procedure call because it tries to alter the data shape already gotten from the database and attempts to return a dynamic entity instead. Something about the stored proc returning an ObjectResult might
    be messing it up. As I have said, these are merely my observations.
    Workaround: I found a simple and elegant workaround for it though. Since my stored procedures are only getting data from the database and does
    not alter data in any way (INSERT, UPDATE, DELETE), I tried using table-valued functions that returns a table equivalent to the entity on my EF. I've found that calling this function on the Service Operation method returns an IQueryable<Entity> which
    is basically what is needed. $select also works now and so does other OData query options.
    Steps:
    Create a function on the database
    Update EDMX -> Add function
    Add new Function Import with Entity return type
    Create service operation in WCF Data Service that calls CurrentDataSource.<FunctionName>()
    Test in fiddler.
    CODES
    Database Function:
    CREATE FUNCTION GetEntities(@parameter)
    RETURN @entites TABLE(
    [Id] [int],
    [Name] [nvarchar](100),
    AS
    BEGIN
    INSERT INTO @entities
    SELECT [Id], [Name], ... FROM [EntityTable]
    RETURN
    END
    WCF:
    [WebGet]
    public IQueryable<Entity> GetEntity(int parameter)
    return CurrentDataSource.GetEntity(parameter);
    It doesn't really solve the stored procedure problem but I'm marking this as answer until someone can provide a better one as it does solve what I'm trying to do.
    Hope this helps others too. :)

  • Error 'ORA-01403 no data found', if a procedure called through $Universe

    Hello,
    we use at our customer the scheduling software $Universe. The problem follows is happend at calling PL/SQL-procedures within SQL*Plus:
    Within the calling procedur another subprogram will be called. This program crashed on select of currval with the error 'ORA-01403 no data found'. This error happens only, if the procedure called through $Universe. If the procedure called directly from SQL*Plus or about a unix shell-script, no error happens.
    About the command "select saddr,sid,serial# from sys.V_$SESSION where
    username ='xxx';" we select the Session_ID's. These are identically before and after call of the procedure!
    Do you have an idea, how the problem can be?
    Next information about OS, releases, settings of Oracle-Session-Parameters, and the crashing procedure:
    SQL*Plus: Release 8.1.6.0.0 - Production on Fri Mar 15 13:25:05 2002
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.6.0.0 - Production
    OS: HP-UX11
    ORACLE-Server NLS-parameters on HP-UX:
    NLS_LANGUAGE               AMERICAN
    NLS_TERRITORY               AMERICA
    NLS_CURRENCY               $
    NLS_ISO_CURRENCY          AMERICA
    NLS_NUMERIC_CHARACTERS          .,
    NLS_CALENDAR               GREGORIAN
    NLS_DATE_FORMAT               DD-MON-RR
    NLS_DATE_LANGUAGE          AMERICAN
    NLS_CHARACTERSET          WE8DEC
    NLS_SORT               BINARY
    NLS_TIME_FORMAT               HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT          DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT          HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT          DD-MON-RR HH.MI.SSXFF AM TZH:T
    NLS_DUAL_CURRENCY          $
    NLS_NCHAR_CHARACTERSET          WE8DEC
    NLS_COMP               BINARY
    Windows-desktop NLS-parameters:
    ALTER SESSION set NLS_LANGUAGE = 'GERMAN';
    ALTER SESSION set NLS_TERRITORY = 'GERMANY';
    ALTER SESSION set NLS_ISO_CURRENCY = 'GERMANY';
    ALTER SESSION set NLS_NUMERIC_CHARACTERS = ',.';
    ALTER SESSION set NLS_CALENDAR = 'GREGORIAN';
    ALTER SESSION set NLS_DATE_FORMAT = 'DD/MM/YY';
    ALTER SESSION set NLS_DATE_LANGUAGE = 'GERMAN';
    ALTER SESSION set NLS_SORT = 'GERMAN';
    ALTER SESSION set NLS_TIME_FORMAT = 'HH24:MI:SSXFF';
    ALTER SESSION set NLS_TIMESTAMP_FORMAT = 'DD.MM.RR HH24:MI:SSXFF';
    ALTER SESSION set NLS_TIME_TZ_FORMAT = 'HH24:MI:SSXFF TZH:TZM';
    ALTER SESSION set NLS_TIMESTAMP_TZ_FORMAT = 'DD.MM.RR HH24:MI:SSXFF
    TZH:TZM';
    ALTER SESSION set NLS_DUAL_CURRENCY = '?';
    ALTER SESSION set NLS_COMP = 'BINARY';
    PROCEDURE PROC_NEW_ID (p_value IN NUMBER,
    p_field IN VARCHAR2,
    p_table IN VARCHAR2,
    p_currval OUT NUMBER)
    IS
    v_stmt VARCHAR2(200);
    v_currval NUMBER;
    BEGIN
    -- Bildung des SQL-Statements.
    v_stmt := 'INSERT INTO '||p_table|| '('|| p_field || ') VALUES
    ('||p_value||')';
    -- Ausfuehren des SQL-Statements.
    EXECUTE IMMEDIATE v_stmt;
    COMMIT;
    -- Bildung des SQL-Statements.
    v_stmt := 'SELECT SEQ_'|| p_table || '.CURRVAL FROM DUAL';
    -- Ausfuehren des SQL-Statements.
    EXECUTE IMMEDIATE v_stmt INTO v_currval;
    -- Wertrueckgabe
    p_currval := NVL(v_currval,0);
    EXCEPTION
    WHEN OTHERS THEN
    pkg_mira_protokoll.proc_write_error_fwd
    (pkg_mira_consts.act_error,
    SQLCODE,
    SQLERRM(SQLCODE),
    'PROC_NEW_ID');
    p_currval := 0;
    RAISE;
    END;
    Thanks for your request!
    Best regards
    Esser Office Consulting KG
    J|rgen Esser

    This forum is for posting feedback about the OTN site.
    The best place for your question is probably a Portal forum.
    There is a list of Portal forums here:
    http://forums.oracle.com/forums/index.jsp?cat=13

  • Procedure call through InstantClient 10.1.0.4 (ODBC) hangs the session

    Hello,
    The application has been made by Visual Basic 6.0 sp5, it uses MDAC 2.5. RDBMS version is 9.2, server OS Aix 5.2, client OS XP Professional SP2.
    In other ways the application is working properly, but when a user tries to start a report which calls a procedure through ODBC the following happens:
    (1) The workstation processor starts working under a permanent load of 100%.
    (2) The ODBC trace stops here:
    {? = call XXXX_YYYY.ZZZ_AAAAAAAA
    ['BB_BBBB','200511','200511','CCC',null,null,'null','null'}
    (3) The database listener trace (admin, on the server) stops here (287 rows follow which are the result of trying to start a report):
    nsevwait: 1 newly-posted event(s)
    nsevfnt: cxd: 0x1057c390 stage 0: NT events set:
         CONNECTION REQUEST
    nsevfnt: cxd: 0x1057c390 stage 0: NS events set:
         INCOMING CALL
    nsevwait: event is 0x1, on 3
    nsevwait: 1 posted event(s)
    nsglhe: entry
    nsmal: 752 bytes at 0x11060b090
    nsmal: 2800 bytes at 0x110616030
    nsopen: opening transport...
    nttcon: entry
    nttcon: toc = 3
    nttcnp: entry
    ntvlin: entry
    ntvlin: exit
    nttcnp: Validnode Table IN use; err 0x0
    nttcnp: getting sockname
    nttcnp: exit
    nttcnr: entry
    nttcnr: waiting to accept a connection.
    nttcnr: getting sockname
    nttvlser: entry
    nttvlser: valid node check on incoming node xxx.yyy.z.50
    nttvlser: Accepted Entry: xxx.yyy.z.50
    nttcnr: exit
    nttcon: set TCP_NODELAY on 18
    nttcon: exit
    nsopen: transport is open
    nsnainit: answer
    nsnasvnainfo: NA disabled for this connection
    nainit: entry
    nagblini: entry
    nau_gin: entry
    nau_gparams: entry
    nam_gbp: Reading parameter "sqlnet.authentication_required" from parameter file
    nam_gbp: Parameter not found
    nau_gparams: Using default value "FALSE"
    nau_gslf: entry
    nam_gic: entry
    nam_gic: Counting # of items in "sqlnet.authentication_services" parameter
    nam_gic: Parameter not found
    nam_gic: Found 0 items
    nam_gic: exit
    nau_gslf: Using default value "all available adapters"
    nauss_set_state: entry
    nauss_set_state: exit
    nau_gslf: exit
    nau_gparams: exit
    nau_gin: exit
    nagblini: exit
    na_saveprot: entry
    na_saveprot: exit
    nacomin: entry
    nas_init: entry
    nas_init: exit
    nau_ini: entry
    naugcp_get_connect_parameters: entry
    nauss_set_state: entry
    nauss_set_state: exit
    naugcp_get_connect_parameters: exit
    nau_gettab: entry
    nau_tadv: entry
    nau_fad: entry
    nau_fad: exit
    nau_fad: entry
    nau_fad: exit
    nau_fad: entry
    nau_fad: exit
    nau_fad: entry
    nau_fad: exit
    nau_tadv: exit
    nau_gettab: exit
    nau_sini: entry
    nau_sini: exit
    nau_ini: exit
    naeeinit: entry
    nam_gbp: Reading parameter "SQLNET.FIPS_140" from parameter file
    nam_gbp: Parameter not found
    nam_gnsp: Reading parameter "SQLNET.ENCRYPTION_SERVER" from parameter file
    nam_gnsp: Parameter not found
    naequad: Using default value "ACCEPTED"
    nam_gic: entry
    nam_gic: Counting # of items in "SQLNET.ENCRYPTION_TYPES_SERVER" parameter
    nam_gic: Parameter not found
    nam_gic: exit
    naesno: Using default value "all available algorithms"
    naeshow: entry
    naeshow: exit
    naeeinit: exit
    naecinit: entry
    nam_gnsp: Reading parameter "SQLNET.CRYPTO_CHECKSUM_SERVER" from parameter file
    nam_gnsp: Parameter not found
    naequad: Using default value "ACCEPTED"
    nam_gic: entry
    nam_gic: Counting # of items in "SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER" parameter
    nam_gic: Parameter not found
    nam_gic: exit
    naesno: Using default value "all available algorithms"
    naeshow: entry
    naeshow: exit
    naecinit: exit
    nadisc: entry
    nacomtm: entry
    nacompd: entry
    nacompd: exit
    nacompd: entry
    nacompd: exit
    nacomtm: exit
    nas_dis: entry
    nas_dis: exit
    nau_dis: entry
    nau_dis: exit
    naeetrm: entry
    naeetrm: exit
    naectrm: entry
    naectrm: exit
    nagbltrm: entry
    nau_gtm: entry
    nau_gtm: exit
    nagbltrm: exit
    nadisc: exit
    nainit: exit
    nsnainit: NS Connection version: 311
    nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
    nsnainit: "or" info flags: 0xd     Translations follow:
         native service(s) is (are) wanted
         NA disabled remotely for this connection
         NA services unavailable on both processes - negotiation not needed
    nsnainit: "or" info flags: 0xd     Translations follow:
         native service(s) is (are) wanted
         NA disabled remotely for this connection
         NA services unavailable on both processes - negotiation not needed
    "and" info flags: 0xd     Translations follow:
         native service(s) is (are) wanted
         NA disabled remotely for this connection
         NA services unavailable on both processes - negotiation not needed
    nsopen: global context check-in (to slot 11) complete
    nsopen: lcl[0]=0x7fe9ff, lcl[1]=0x12003, gbl[0]=0x7e3f, gbl[1]=0x2001, tdu=32767, sdu=8192
    nsdo: cid=11, opcode=65, bl=0, what=0, uflgs=0x0, cflgs=0x2
    nsdo: rank=64, nsctxrnk=0
    nsdo: nsctx: state=7, flg=0x4200, mvd=0
    nsdo: nsctxrnk=0
    nsanswer: deferring connect attempt; at stage 5
    nsevreg: begin registration process for 11
    nsevreg: sgt=0, evn=1, evt[2]=0x0
    nsevreg: begin notification process for 11
    nsevreg: rdm=0, sgt=0, evt[0]=0x20, [1]=0x20, [2]=0x0, nrg=0
    nsevreg: registering for 0x20
    nsglhe: exit
    nsevwait: 10 registered connection(s)
    nsevwait: 0 pre-posted event(s)
    nsevwait: waiting for transport event (1 thru 11)...
    nsevwait: 1 newly-posted event(s)
    nsevfnt: cxd: 0x10606bb0 stage 5: NT events set:
         READ
    nsevfnt: cxd: 0x10606bb0 stage 5: NS events set:
         OUTGOING CALL COMPLETE
    nsevdansw: at STAGE 5
    nsdo: cid=11, opcode=68, bl=2040, what=8, uflgs=0x0, cflgs=0x3
    nsdo: rank=64, nsctxrnk=0
    nsdo: nsctx: state=14, flg=0x4204, mvd=0
    nsdo: gtn=0, gtc=0, ptn=10, ptc=8163
    nscon: doing connect handshake...
    nscon: recving a packet
    nsprecv: reading from transport...
    nttrd: entry
    nttrd: socket 18 had bytes read=262
    nttrd: exit
    nsprecv: 262 bytes from transport
    nsprecv: tlen=262, plen=262, type=1
    nscon: got NSPTCN packet
    nsconneg: vsn=313, lov=300, opt=0x0, sdu=2048, tdu=32767, ntc=0x860e
    nsconneg: vsn=311, gbl=0x1, sdu=2048, tdu=32767
    nscon: got 204 bytes connect data
    nsdo: nsctxrnk=0
    nsevdansw: exit
    nttctl: entry
    nttctl: Clearing non-blocking mode
    nsevwait: event is 0x20, on 11
    nsevwait: 1 posted event(s)
    nsglhe: entry
    nsglfc: Assume establishing a connection: look for SID
    nsglfc: command = establish
    nttaddr2bnd: entry
    nttaddr2bnd: exit
    nlpcaini: entry
    nlpcaini: prg = /oracle9/app/product/9.2.0/bin/oracle
    nlpcaini: arg[0] = oracleaaaaa
    nlpcaini: arg[1] = (LOCAL=NO)
    nlpcaini: env[0] = _=/ddddddd/app/product/9.0.2/bin/lsnrctl
    nlpcaini: env[1] = TMPDIR=/lisatmp
    nlpcaini: env[2] = LANG=en_US
    nlpcaini: env[3] = LOGIN=ddddddd
    nlpcaini: env[4] = PATH=/ddddddd/app/product/9.0.2/dcm/bin:/ddddddd/app/product/9.0.2/opm/bin:/ddddddd/app/product/9.0.2/bin:/usr/local/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/ddddddd/bin:/usr/bin/X11:/sbin:.
    nlpcaini: env[5] = NLS_LANG=American_America.we8iso8859P1
    nlpcaini: env[6] = ORACLE_BASE=/ddddddd/app/product
    nlpcaini: env[7] = LC__FASTMSG=true
    nlpcaini: env[8] = CGI_DIRECTORY=/var/docsearch/cgi-bin
    nlpcaini: env[9] = LOGNAME=ddddddd
    nlpcaini: env[10] = TMP=/lisatmp
    nlpcaini: env[11] = USER_NLS_LANG=Finnish_Finland.we8iso8859P1
    nlpcaini: env[12] = MAIL=/usr/spool/mail/ddddddd
    nlpcaini: env[13] = LOCPATH=/usr/lib/nls/loc
    nlpcaini: env[14] = PS1=$PWD[SID=$ORACLE_SID]>$
    nlpcaini: env[15] = LDR_CNTRL=MAXDATA=0x20000000
    nlpcaini: env[16] = DOCUMENT_SERVER_MACHINE_NAME=localhost
    nlpcaini: env[17] = USER=ddddd
    nlpcaini: env[18] = AUTHSTATE=files
    nlpcaini: env[19] = TNS_ADMIN=/ddddddd/app/product/9.0.2/network/admin
    nlpcaini: env[20] = DEFAULT_BROWSER=netscape
    nlpcaini: env[21] = DISPLAY=cccc:0.0
    nlpcaini: env[22] = SHELL=/usr/bin/ksh
    nlpcaini: env[23] = ODMDIR=/etc/objrepos
    nlpcaini: env[24] = DOCUMENT_SERVER_PORT=49213
    nlpcaini: env[25] = ORA_NLS33=/ddddddd/app/product/9.0.2/ocommon/nls/admin/data
    nlpcaini: env[26] = HOME=/home/ddddddd
    nlpcaini: env[27] = TERM=dumb
    nlpcaini: env[28] = MAILMSG=[YOU HAVE NEW MAIL]
    nlpcaini: env[29] = ORACLE_HOME=/oracle9/app/product/9.2.0
    nlpcaini: env[30] = ITECONFIGSRV=/etc/IMNSearch
    nlpcaini: env[31] = PWD=/home/ddddddd
    nlpcaini: env[32] = DOCUMENT_DIRECTORY=/usr/docsearch/html
    nlpcaini: env[33] = TZ=WET-2WET-3,M3.5.0/03:00:00,M10.5.0/04:00:00
    nlpcaini: env[34] = ITECONFIGCL=/etc/IMNSearch/clients
    nlpcaini: env[35] = ITE_DOC_SEARCH_INSTANCE=search
    nlpcaini: env[36] = A__z=! LOGNAME
    nlpcaini: env[37] = ORA_NET2_DESC=4,7
    nlpcaini: env[38] = LIBPATH=/ddddddd/app/product/9.0.2/lib32:/ddddddd/app/product/9.0.2/lib
    nlpcaini: env[39] = NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
    nlpcaini: env[40] = ORACLE_SID=aaaaa
    nlpcaini: exit
    nsbeqaddr: connecting...
    ntpcon: entry
    ntpcon: toc = 1
    sntpcall: entry
    sntpcall: About to exec /oracle9/app/product/9.2.0/bin/oracle
    sntpcall: environ[41] = ""
    sntpcall: detaching from parent with additional fork
    sntpcall: result string is NTP0 33240
    sntpcall: hdl[IR]=23, hdl[IW]=22
    sntpcall: exit
    ntpcon: NT layer IPC connection has been established
    ntpcon: exit
    nttaddr2bnd: entry
    nttaddr2bnd: exit
    nsbeqaddr: doing connect handshake...
    nsbequeath: doing connect handshake...
    ntpwr: entry
    ntpwr: exit
    ntpwr: entry
    ntpwr: exit
    ntpwr: entry
    ntpwr: exit
    ntprd: entry
    ntprd: exit
    ntprd: entry
    ntprd: exit
    nsbequeath: NSE=0
    ntpdisc: entry
    ntpdisc: exit
    nsbeqaddr: connect handshake is complete
    nstimarmed: no timer allocated
    nsdo: cid=11, opcode=98, bl=0, what=0, uflgs=0x40, cflgs=0x2
    nsdo: rank=64, nsctxrnk=0
    nsdo: nsctx: state=2, flg=0x4200, mvd=0
    nsevunreg: cid=11, sgt=0, rdm=0
    nsevunreg: 9 registered connection(s)
    nsdo: nsctxrnk=0
    nsclose: closing transport
    nttdisc: entry
    nttdisc: Closed socket 18
    nttdisc: exit
    nsclose: global context check-out (from slot 11) complete
    nsmfr: 2800 bytes at 0x110616030
    nsmfr: 752 bytes at 0x11060b090
    nsglhe: exit
    nsevwait: 9 registered connection(s)
    nsevwait: 0 pre-posted event(s)
    nsevwait: waiting for transport event (1 thru 10)...
    The procedure call through ODBC is working when we use Oracle9i Client.
    So. All comments are much appreciated!
    Terho

    in addition:
    my main problem is that Oracle ODBC driver does not understand something like
    {call types.test_procedure (?, ?,,?)}
    to pass not all parameters (I whant to use default value for some of parameters)

  • DML visibility in stored procedures called via JDBC

    Hello,
    I have two stored procedures, A and B. Proc A inserts Q into table X. Proc B selects Q from table X to insert it into table Y. Neither procedure does a COMMIT.
    My Java class executes Proc A and then Proc B within a transaction (autocommit is false). But Proc B fails to select Q from table X with the No Data Found error, apparently unable to see the recently inserted Q.
    If these two procedures are called from a SQL*Plus block, everything succeeds.
    Does anyone have a clue about what I am missing? All my DML should be visible to my session.
    Thank you in advance for any suggestions.
    - CJ

    Thank you, Joe, for your reply!
    To the best of my knowledge, all of my stored procedure calls are being made from the same connection so I can rollback everything if necessary. I have not explicitly closed the connection between calls. The debugger indicates my connection session id never changes across calls.
    Do you know of any JDBC trace tools that might help me verify my connections? I've enabled logging with oracle.jdbc.driver.OracleLog.setTrace(true) but it doesn't really give me specific connection information - at least not that I can tell. :)
    Thanks!
    Cori

  • How to use Stored Procedure Call in Sender JDBC adapter

    Hi All,
             Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
    Xier

    Hi Xler
    refer these links
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Also, you can check Sriram's blog for executing Stored Procedures,
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    /people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
    This blog might be helpfull on stored procedures for JDBC
    JDBC Stored Procedures
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Please go through these threads and see if it helps...
    Re: How to execute Stored Procedure?
    Re: Problem with JDBC stored procedure
    Thnaks !!

  • Best practices to use stored procedure

    Just wondering about best practices of using Stored procedures in TOPLink with respect to Objects. Any thoughts on this?
    I find the approach suggested at re:Coding for Stored Procedures is a lot of work! seems to be fine.
    Is there any thoughts on converting results directly into Java objects?
    Murali

    I encountered the same problems.
    See the topic I posted: Re: Mapping a Java attribute to the result of a function call
    The solution I used is good, but has its restrictions.
    I created a database view on the query that uses stored functions. Then, I mapped my object to the database view. Problem solved.
    However, like I said, this solution has its restrictions:
    1) Your database must support views
    2) This only works for read-only queries
    I hope this helps you any further.
    Kind regards,
    Erwin

  • What's the best way to capture speech as text in live or recorded Adobe Connection sessions?

    Hi
    What's the best way to capture speech as text in live or recorded Adobe Connection sessions?
    We would like to have a transcript of the presentation. Is Adobe Connect compatible with Dragon speech recognition software - or is there a preferred Adobe product or method?
    We use PCs running Windows 7 Enterprise.
    thanks

    The class java.util.Date is not itself deprecated, however several of its methods are.
    For converting string -> date, you should use the class java.text.SimpleDateFormat. That allows you to specify format strings such as MM-dd-yyyy hh:mm:ss for converting date -> string -> date.
    If you are wanting to set day/month/year on the date object directly, instead of the Date methods setDay, setMonth, setYear, you should instead use the java.util.Calender class:
    calendar.set(Calendar.MONTH, 4);
    The calendar can then be converted to a Date object by calling calendar.getTime().
    If you are going to use the date as part of a sql query, I would recommend using a Prepared statement, and the java.sql.Date/java.sql.Timestamp class as well.
    To convert from java.util.Date to java.sql.Date)
    jva.util.Date utilDate = Calendar.getInstance().getTime();
    java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());cheers,
    evnafets

  • Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER

    Hi Experts,
    What is significance of Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER.
    Thanks,
    ABDUR

    I guess this would be applicable for the folowing formats - DATE, TIME, TIMESTAMP.
    This is the correct link
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards,
    Prateek

  • Stored Procedure call from JDBC sender for Oracle Database

    Hi,
    I have a requirement to call stored procedure using JDBC sender adapter for retriving data from an Oracle database.
    I need to execute first stored procedure call from Querry SQL statement and then trigger second stored procedure call for confirming the succesful retrival of those records from the update SQL statement.
    Querries:
    1. Can we trigger stored procedure from Update statement of JDBC sender.
    2. Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    3. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    Please note PI does not have direct access to main table and hence the need to have separate stored procedure calls.
    The PI version is PI 7.11 sp4.
    Appreciate your inputs.
    Thanks.
    Siddhesh S.Tawate

    >1. Can we trigger stored procedure from Update statement of JDBC sender.
    I think not possible using update statement.
    > Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    Yes using select query you can call stored procedure.
    >. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    No select and update handles in the same session using the same thread so if one transaction fails update should not proceed.

  • Execution Times of Stored Procedures Called from Other Stored Procedures

    If I execute sys.dm_exec_procedure_stats, it will produce execution times of my stored procedures executed recently.
    However, stored procedures called from other stored procedures do not show up.
    Is there code that can return the execution times of stored procedures even though they are called from other stored procedures.

    Look at the example. It is counting nested execution.
    CREATE PROC z1SP AS SELECT * FROM Production.Product;
    GO
    CREATE PROC z2SP AS SELECT * FROM Production.Product WHERE Color is not null; EXEC z1SP;
    GO
    SELECT object_name(2002822197), object_name(2034822311);
    --z1SP z2SP
    EXEC z1SP; EXEC z2SP;
    GO 10
    SELECT * from sys.dm_exec_procedure_stats
    database_id object_id type type_desc cached_time last_execution_time execution_count
    16 2002822197 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.170 2014-12-16 13:02:46.717 20
    16 2034822311 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.460 2014-12-16 13:02:46.687 10
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Structure for Stored Procedure Call

    Hi All,
             Guys I am trying to call a stored procedure call using receiver jdbc adapter...
    This is the outgoing message:
    <b><?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:SP_DB xmlns:ns0="urn:sce-com:xi:dev:mohammf">
    - <Test>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">CC</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">XX</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
      </Test>
      </ns0:SP_DB></b>
    The error I am getting is: 
    <b><i>2007-08-20 09:44:05 Error Unable to execute statement for table or stored procedure. 'PP_TEST_P' (Structure 'Test') due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error Exception caught by adapter framework: null
    2007-08-20 09:44:05 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !).</i></b>
    Pls advice..
    XIer
    Message was edited by:
            XIer

    Hi,
    Check your DATA TYPE attributes with the attributes of the column names in the Database table.  There is a mismatch between the DT and Table in the database.
    <b>Cheers,
    *RAJ*</b>

  • Response from one stored proc. to another stored procedure call in JDBC

    Hi,
    I have to call 2 stored procedures, where the response from first stored procedure ( an id) is mapped as a parameter to the second stored procedure call.
    My question is that can this be achieved without using BPM?
    Can we somehow map the response from the stored procedure 1 to stored procedure 2 parameter w/o using BPM?
    I have to insert multiple rows using the stored procedure.
    Should I use STATEMENT unbounded times ( which means stored procedure is called multiple times) or should I use the parameter as unbounded ( like an array, maybe define the parameter as an array in the stored procedure)?
    From the performance standpoint, which approach is better?
    Please suggest.

    Hi Ardent !
    I think you could use 2 mapping programs (message mapping objects) in your interface mapping. The first one, executes and returns the ID to a message type defined by you for internal use only between both stored procedure executions. The second ones uses that message type as source message and the XML required by the JDBC for the second stored procedure execution as target message type. This can be done without BPM.
    Regards,
    Matias.

Maybe you are looking for