Obtaining target database via extended events

I try to gather the database access via extended events.
It is possible to query a database from a different context and most extended events I see return the context rather then the target database.
For instance, using the event sp_statement_starting would return master as action databaseid for the following:
use master
select * from targetdb.dbo.mytable
What would be a event candidate or action to obtain the target database, targetdb in this case, instead?
For trace, the event 114, Audit Schema Object Access Event would do the job but it does not seem to exists in extended events.
Note: this is sql server 2008 R2 standard so no audit and limitted extended events available.
Thanks

Hello Antoine
always when trying to find out database access I advise using the most basic event that always has to occur for any database access which also cannot be circumvented: lock_aquired, specifically Shared Lock on Database level should help you
Andreas Wolter (Blog |
Twitter)
MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
www.SarpedonQualityLab.com |
www.SQL-Server-Master-Class.com

Similar Messages

  • Extended Event Filter Record for PArticular or ONE database

    Hi Folks,
    If am working with Extended Event .In that am use Adventureworks database which are long running queries.Finally i get a result from all  Database those queries are long running queries. But i want to get the result
    from only one database, anyother database long running queries wont come in result., If possible tell me the ways.,
    Thanks

    In this case you can filter the events based on the database id.
    Reference
    http://blog.sqlauthority.com/2010/03/29/sql-server-introduction-to-extended-events-finding-long-running-queries/
    Mention the sqlserver.database_id parameter while creating the event session
    In the below example, I've created session to monitor the long running events for the database_id =15
    CREATE EVENT SESSION LongRunningQuery
    ON SERVER
    -- Add event to capture event
    ADD EVENT sqlserver.sql_statement_completed
    -- Add action - event property
    ACTION (sqlserver.sql_text, sqlserver.tsql_stack,sqlserver.database_id)
    -- Predicate - time 1000 milisecond
    WHERE sqlserver.sql_statement_completed.duration > 1000 and sqlserver.database_id=15
    -- Add target for capturing the data - XML File
    ADD TARGET package0.asynchronous_file_target(
    SET filename='c:\LongRunningQuery.xet', metadatafile='c:\LongRunningQuery.xem'),
    -- Add target for capturing the data - Ring Bugger
    ADD TARGET package0.ring_buffer
    (SET max_memory = 1096)
    WITH (max_dispatch_latency = 1 seconds)
    --Prashanth

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • 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

  • Filtering extended event in sql server 2008 r2

    This code has been generated in sql server 2012 (using the graphical interface).
    CREATE EVENT SESSION [backupsmssql] ON SERVER
    ADD EVENT sqlserver.sp_statement_starting(
    ACTION(
    sqlserver.client_app_name,
    sqlserver.client_hostname,sqlserver.nt_username,
    sqlserver.session_nt_username,sqlserver.sql_text,
    sqlserver.username)
    WHERE ([sqlserver].[like_i_sql_unicode_string]([sqlserver].[sql_text],N'%backup database%'))
    WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF)
    If I try to run it on sql server 2008 r2, the filtering part seems to be misinterpreted and the following error is thrown:
    Msg 25706, Level 16, State 8, Line 1
    The event attribute or predicate source, "sqlserver.sql_text", could not be found.
    If I remove the where clause, the statement runs fine even though the sqlserver.sql_text is returned as part of the actions.  So obviously the "sqlserver.sql_text" is existant.  Why would I receive a message it does not exists in the
    where clause?  Was the "like_i_sql_unicode_string" inexistent in 2008 r2 or has the syntax changed in 2012.  How can we filter sql_text in 2008 r2?  I can't seem to find any doc regarding this, help would be appreciated.
    p.s. There is a very similar question here but it has been closed by the moderators and does not answer the question:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/76c2719c-ea02-4449-b59e-465a24c37ba8/question-on-sql-server-extended-event?forum=sqlsecurity

    You are on the right track:
    The differences in the available events and predicates (source and compare) between SQL Server 2008/R2 and 2012 are quite substantial.
    So the LIKE-operator is not available at all under 2008/R2 as a comparison-predicate, and sql_text is also not available as a source-predicate - only as action itself. - One has to realize, that actions really are not automatically also predicates.
    For a complete list of predicates you can query like this:
    SELECT dm_xe_packages.name AS package_name,
    dm_xe_objects.name AS source_name,
    dm_xe_objects.description
    , dm_xe_objects.object_type
    FROM sys.dm_xe_objects AS dm_xe_objects
    INNER JOIN sys.dm_xe_packages AS dm_xe_packages
    ON dm_xe_objects.package_guid = dm_xe_packages.guid
    WHERE
    (dm_xe_packages.capabilities IS NULL OR dm_xe_packages.capabilities & 1 = 0)
    AND (dm_xe_objects.capabilities IS NULL OR dm_xe_objects.capabilities & 1 = 0)
    AND dm_xe_objects.object_type
    IN ( 'pred_source', 'pred_compare')
    ORDER BY dm_xe_objects.object_type
    Unfortunately for your specific filter there is not workaround for Extended Events.
    You would have to resort to another predicate for filtering altogether.
    BUT: if you are on Enterprise Edition, why not use Auditing. There is a Audit-Group for Backup/Restore.
    It would be really simple like the following:
    CREATE SERVER AUDIT SPECIFICATION [Audit_BackupRestores]
    FOR SERVER AUDIT [AuditTarget]
    ADD (BACKUP_RESTORE_GROUP)
    If you are on Standard, you found yet another reason to upgrade to a supported version of SQL Server, I am afraid to say..
    Andreas Wolter (Blog |
    Twitter)
    MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
    www.SarpedonQualityLab.com |
    www.SQL-Server-Master-Class.com

  • Initial load of small target tables via flashback query?

    A simple question.
    Scenario: I’m currently building a near real time warehouse, streaming some basic facts and dimension tables between two databases. I’m considering building a simple package to "reset" or reinitialize the dimensions an all-round fix for variety of problem scenarios (since they are really small, like 15 000 rows each). The first time I loaded the target tables I utilized data pump with good success, however since streams transforms data on the way a complete reload is somewhat more complex.
    Considered solution: Ill just write a nice flashback query via db-link fetching data from a specific (recent) SCN and then I reinitialize the table on that SCN in streams...
    Is this a good idea? Or is there something obvious like a green and yellow elephant in the gift shop that I overlooked? Why I’m at all worried is because in the manuals this solution is not mention among the supported ways to do the initial load of a target table and I’m thinking there is a reason for this?

    I have a series of streams with some tranformations feeding rather small dimensional tables, I want to make this solution easy to manage even when operations encounter difficult replication issues, so Im developing a PL/SQL package that will:
    1) Stop all streams
    2) Clear all errors
    3) Truncate target tables
    4) Reload them including transformation (using a SELECT AS OF "ANY RECENT SCN" from target to source over dblink)
    5) Using this random recent SCN I will re-instantiate the tables
    6) Start all streams
    As you see datapump even if it works is rather difficult to utilize when you tranform data from A to B, using AS OF I not only get a constant snapshot from the source, I also get the exact SCN for it.
    What do you think? Can I safely use SELECT AS OF SCN instead of datapump with SCN and still get a consisten sollution?
    For the bigger FACT tables im thinking about using the same SELECT AS OF SCN but there with particular recent paritions as targets only and thus not having to reload the whole table.
    Anyways this package would ensure operations that they can recover from any kind of disaster or incomplete recovery on both source and target databases, and just re-instantiate the warehouse within minutes.

  • Using databases and container events?

    I'm having trouble finding documents show how one should use databases and listen for container events? I'm using Berkley Java DB. I'll need all my remote object to have access to the database. How do I pass that in? Custom adapters? Also, when Tomcat shuts down I need to close the database, how would this be down? Custom adapters? So I may be answering my own question, but I'm asking cause I really don't see anything in the documentation that points this out. It really looks like I'd be using singletons and factories for this. I could register a Servlet or Servlet Context to listen for Tomcat events, but I figured it couldn't hurt to ask others using Blaze, as I'm very new to it. Thanks.

    So how would you tell Blaze to use this? Is there something you put into the config file? My thoughts on all this is to use PicoContainer to manage all services then create an adapter to inject all resources when creating remote objects. But this seems a little heavy if Blaze can do all this for me. The adapter seems like the injection point to me. Is that not what it's used for? Or is using it like that bad practice under Blaze? I've read all I can find on Blaze, so either it's missing docs, or I'm not finding them all. If I'm missing them, by all means let me know where to go. I don't want to ask questions that are already answered in documents else where.
    On Tue, May 20, 2008 at 10:51 AM, Mete Atamel <
    [email protected]> wrote:
    A new message was posted by Mete Atamel in
    General Discussion --
      Using databases and container events?
    I think it's mainly in JavaDocs but here's a sample I have where I check to make sure the HSQLDB is running as the BlazeDS starts up:
    import java.sql.Connection;
    import java.sql.SQLException;
    import flex.messaging.config.ConfigMap;
    import flex.messaging.services.AbstractBootstrapService;
    public class DatabaseCheckService extends AbstractBootstrapService
        // This is called right before server starts up.
        public void initialize(String id, ConfigMap properties)
            Connection c = null;
            try
                // Check that the database is running...
                c = ConnectionHelper.getConnection();
                // ... if yes return
                return;
            catch (SQLException e)
                System.out.println("DB is not running!");
            finally
                ConnectionHelper.close(c);
    // This is called as server is starting.
        public void start()
            // No-op
    // This is called as server is stopping.
        public void stop()
            // No-op
    View/reply at
    Using databases and container events?
    Replies by email are OK.
    Use the
    unsubscribe form to cancel your email subscription.
    "All that is necessary for the triumph of evil is that good men do nothing." - Edmund Burke

  • Database Polling Fails when target database re-started

    Hi
    I have a problem with a BPEL process that is polling records from the database. I noticed that no records had been picked up in a while and that no errors were being caught by the process. When i checked the domain log I could see that the error below had occurred and was retrying. I found out that the target SQLServer database had been restarted, but as far as I was aware the connection should refresh once the database restarts.
    This is quite a concern for my client who is querying the stability of the SOA suite. they frequently restart their SQL Server database and do not want to have to refresh connections to solve the problem from the application server each time. They are currenlty using 10.1.3.3.0 of the SOA suite software so the connection should be reintiated when the target database is started again.
    Does any one have any idea why this error is occuring??
    <2008-03-18 18:34:16,987> <INFO> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.exceptions.DBResourceException createEISException> A retriable exception occured. In BPEL you can configure a fault policy (starting with 10.1.3.3) to automatically perform retries. Please configure bpel/domains/<domainName>config/fault-bindings.xml
    <2008-03-18 18:34:17,007> <WARN> <default.collaxa.cube.activation> <Database Adapter::Inbound>
    ORABPEL-11624
    DBActivationSpec Polling Exception.
    Query name: [readProjectCodes], Descriptor name: [readProjectCodes.EFolder]. Polling the database for events failed on this iteration. [Caused by: Broken pipe]
    If the cause is something like a database being down successful polling will resume once conditions change. Caused by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: I/O Error: Broken pipeError Code: 0
    Call:SELECT eFolderID, eMapName, eCategory, eStageName FROM dbo.eFolder WHERE ((((eStageName = ?) AND (eMapName = ?)) AND ((eCategory <> ?) OR (eCategory IS NULL))) AND ((eCategory <> ?) OR (eCategory IS NULL))) ORDER BY eFolderID ASC
         bind => [Oracle SOA Finance interface, ProjectCode, SOAProcess, SOARead]
    Query:ReadAllQuery(bpel___localhost_default_ReadProjectCodesEworks_1_5__1205248248244.readProjectCodes.EFolder).
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:461)
         at oracle.tip.adapter.db.exceptions.DBResourceException.inboundReadException(DBResourceException.java:376)
         at oracle.tip.adapter.db.InboundWork.handleException(InboundWork.java:633)
         at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:576)
         at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:416)
         at oracle.tip.adapter.db.inbound.InboundWorkWrapper.run(InboundWorkWrapper.java:43)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:272)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: I/O Error: Broken pipeError Code: 0
    Call:SELECT eFolderID, eMapName, eCategory, eStageName FROM dbo.eFolder WHERE ((((eStageName = ?) AND (eMapName = ?)) AND ((eCategory <> ?) OR (eCategory IS NULL))) AND ((eCategory <> ?) OR (eCategory IS NULL))) ORDER BY eFolderID ASC
         bind => [Oracle SOA Finance interface, ProjectCode, SOAProcess, SOARead]
    Query:ReadAllQuery(bpel___localhost_default_ReadProjectCodesEworks_1_5__1205248248244.readProjectCodes.EFolder)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:581)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:441)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:457)
         at oracle.toplink.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:481)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:825)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:803)
         at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:473)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:811)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.tip.adapter.db.inbound.DestructivePollingStrategy.poll(DestructivePollingStrategy.java:347)
         at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:505)
         ... 5 more
    Caused by: java.sql.SQLException: I/O Error: Broken pipe
         at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1052)
         at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:465)
         at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:777)
         at net_sourceforge_jtds_jdbc_JtdsPreparedStatement_Proxy.executeQuery()
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:744)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:516)
         ... 23 more
    Caused by: java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at java.io.DataOutputStream.write(DataOutputStream.java:90)
         at net.sourceforge.jtds.jdbc.SharedSocket.sendNetPacket(SharedSocket.java:671)
         at net.sourceforge.jtds.jdbc.RequestStream.putPacket(RequestStream.java:560)
         at net.sourceforge.jtds.jdbc.RequestStream.flush(RequestStream.java:508)
         at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1039)
         ... 28 more
    <2008-03-18 18:34:47,265> <INFO> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.exceptions.DBResourceException createEISException> A retriable exception occured. In BPEL you can configure a fault policy (starting with 10.1.3.3) to automatically perform retries. Please configure bpel/domains/<domainName>config/fault-bindings.xml
    <2008-03-18 18:34:47,270> <WARN> <default.collaxa.cube.activation> <Database Adapter::Inbound>
    ORABPEL-11624
    DBActivationSpec Polling Exception.
    Query name: [readProjectCodes], Descriptor name: [readProjectCodes.EFolder]. Polling the database for events failed on this iteration. [Caused by: Invalid state, the Connection object is closed.]
    If the cause is something like a database being down successful polling will resume once conditions change. Caused by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Invalid state, the Connection object is closed.Error Code: 0
    Call:SELECT eFolderID, eMapName, eCategory, eStageName FROM dbo.eFolder WHERE ((((eStageName = ?) AND (eMapName = ?)) AND ((eCategory <> ?) OR (eCategory IS NULL))) AND ((eCategory <> ?) OR (eCategory IS NULL))) ORDER BY eFolderID ASC
         bind => [Oracle SOA Finance interface, ProjectCode, SOAProcess, SOARead]
    Query:ReadAllQuery(bpel___localhost_default_ReadProjectCodesEworks_1_5__1205248248244.readProjectCodes.EFolder).
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:461)
         at oracle.tip.adapter.db.exceptions.DBResourceException.inboundReadException(DBResourceException.java:376)
         at oracle.tip.adapter.db.InboundWork.handleException(InboundWork.java:633)
         at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:576)
         at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:416)
         at oracle.tip.adapter.db.inbound.InboundWorkWrapper.run(InboundWorkWrapper.java:43)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:272)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Invalid state, the Connection object is closed.Error Code: 0
    Call:SELECT eFolderID, eMapName, eCategory, eStageName FROM dbo.eFolder WHERE ((((eStageName = ?) AND (eMapName = ?)) AND ((eCategory <> ?) OR (eCategory IS NULL))) AND ((eCategory <> ?) OR (eCategory IS NULL))) ORDER BY eFolderID ASC
         bind => [Oracle SOA Finance interface, ProjectCode, SOAProcess, SOARead]
    Query:ReadAllQuery(bpel___localhost_default_ReadProjectCodesEworks_1_5__1205248248244.readProjectCodes.EFolder)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:581)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:441)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:457)
         at oracle.toplink.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:481)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:825)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:803)
         at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:473)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:811)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.tip.adapter.db.inbound.DestructivePollingStrategy.poll(DestructivePollingStrategy.java:347)
         at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:505)
         ... 5 more
    Caused by: java.sql.SQLException: Invalid state, the Connection object is closed.
         at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1634)
         at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2328)
         at net_sourceforge_jtds_jdbc_ConnectionJDBC3_Proxy.prepareStatement()
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1216)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1170)
         at oracle.toplink.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:591)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:491)
         ... 23 more
    <2008-03-18 18:35:17,633> <INFO> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.exceptions.DBResourceException createEISException> A retriable exception occured. In BPEL you can configure a fault policy (starting with 10.1.3.3) to automatically perform retries. Please configure bpel/domains/<domainName>config/fault-bindings.xml

    I work with ditchTwentyThree. We are still getting this problem.
    To clarify, the situation is that when we use the BPEL Database Adapter to Poll a SQL Server Database we get the behaviour that if the database is not available, the retry policy is referenced and the polling retries every 30 seconds. All good so far. However, when the Database becomes available again the polling still fails in the same way - until the SQL Server Database Connection is manually refreshed through EM. The behaviour we would expect is for the Polling to reinitiate as soon as the SQL Server becomes available without any manual intervention.
    We have configured the DB Adapter retry policies in the same way as we have done for polling an Oracle database (all this works well with Oracle).
    Can anyone help or confirm that this has been successfully achieved on other projects with the DB Adapter accessing MS SQL Server.
    Any tips appreciated.
    Thanks,
    Mark.

  • Replication partitioning corrupting target database

    Hi,
    Essbase v 11.1.3, solaris 10
    My colleagues are having a serious problem with replicated partitions. The behaviour is as follows
    "We are creating an Essbase partition by means of a MAXL script the creation of which is causing corruption in the Target database. From the point of running the script to generate the partition (not to replicate it), the partition is created successfully but the area of data targeted by the partition appears to be locked and no data can be submitted to the area via smartview. The first time the partition is replicated the data successfully replicates but any subsequent replication does not copy the data across and data in the affected area cannot be edited except by calculation scripts."
    The following action has been done to work around the problem
    •     Replicated the issue in development environment
    •     Cleared Target database prior to creation of partition
    •     Used different user account to run the partition
    •     Used MAXL to drop all locks on the Target application – no locks exist to drop.
    The essbase log had this entry 'Dangling Partition found' and a afew 'Client Commands are Currently Not Being Accepted'.
    The members exist in both databases. The error is effecting more than one db.
    Thanks,
    Nathan

    I'm sorry, I was being a little glib in my answer and it didn't really work. The real answer is in 9.3.1 ASO cubes can only be the source for a transparent partition. you have to wait until 11.1.1 for it to be used either way. For what you need you can have your historical data in ASO (or more than one ASO cube) and partition it to BSO for current data. Be careful if you have formulas in the BSO cube that reference ASO cube members. IT can really sow down retieivals. Try to have equivelent formulas in the ASO cube for the history

  • Monitor standby database via OEM using non-sysdba account

    Hi,
    Is it at all possible to monitor a standby database via grid control using non-sysdba account so that targets are seen as up (green arrows visible etc)
    We audit sys operations and as the SYS user is the account that currently monitors the standby we are seeing our audit file dest fill too quickly. We need to keep auditing on though.
    I would like to do this using dbsnmp, though are there any roles or specific privs that need to be granted to do this? so far i am unable to do this.
    Would welcome any advice on this one.
    Thanks,
    firefly.

    Thanks for reply robert.
    we are using active for one standby but not using active for 2 other standby db's.
    I just wondered what the SYSDBA priv used (what actual priv etc) to be able to monitor standby dbs effectively, whereas non-SYSDBA accounts are unable to.
    Thanks,
    firefly

  • DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK DORECOVER;

    Hi
    Im a setting up one node physiscal standby for 2node 11.2 rac primary, what does DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK DORECOVER; do exactly?
    does it do restore controlfile for standby , restore database; recover database?
    I executed the command at about 2pm and the backup of primary was taken 1pm ( primary is on asm, i used this backup device type disk format '/u02/%U' database plus archivelog;
    backup device type disk format '/u02/%U' current controlfile for standby; )
    does this mean I will have to to restore any archivelogs that are generated after 1pm and manually copy them to standby ? or that data guard is smart enough to go and find them ?

    Hi,
    the command will duplicate the target database and create a standby database (including standby controlfile) from the backup you have taken.
    Then it will do the recovery with all archivelogs the standby system has access to.
    When you setup data guard in the next step, it will detect which archivelogs are missing and the "GAP" resolution will kick in, transferring all archivelogs missing to bring the
    standby database to the same timestamp.
    With 11.2 I would recommend to specify "from active database" additionally, since this will not restore from backup, but restore from the primary database directly via. network.
    This does not only save space, but will also recover to a more actual point (hence requiring less "GAP" resolution when you setup dataguard later).
    Regards
    Sebastian

  • How to enable an existing Extended Events Session or add a new Session?

    Hi,
    I am using Management Studio version 12.0.2000.8 and I have noticed that Extended Events for Azure SQL DB have been added to it.
    However, I can't add a new session because the option is grayed out in the dropdown menu. Also, the existing sessions return an error when I attempt to start them. Here is one example of starting
    azure_xe_query session:
    Failed to start event session 'azure_xe_query' because required credential for writing session output to Azure blob is missing. (Microsoft SQL Server, Error: 25739)
    I have an automated export assigned to my Azure database, so the database must be using a (blob) storage account. Is this the same storage account which Extended Events are trying to reach? So far, my best guess is that the storage key should be provided
    while starting the session. This, obviously can't be done using the GUI.
    The only thing I managed to google about this topic is
    this blogpost from May. 
    Has anybody else tried to profile their Azure DB using Extended Events? Is this feature still in development?
    Thank you,
    Filip

    Hi Bob, thank you for replying.
    You mentioned 12 pre-configured event sessions. May I ask, which version of Management Studio were you using? For some reason, I only see 5 of them:
    azure_xe_errors_warnings
    azure_xe_object_ddl
    azure_xe_query
    azure_xe_query_detail
    azure_xe_waits
    And each fires an error just like the one in the first post. At the moment, viewing live data from 'xe_query' session would be enough for me. If I could only start it somehow ...
    I should probably mention I have tried to do this on a Basic and a Standard service tier. Not yet with a Premium.
    Since there is probably nothing we can do at the moment, I'm going to mark your reply as an answer. Thnx again.

  • Extended Events exceptions: Invalid object name '#x'

    We have recently begun using Extended Events in SQL Server 2012. I noticed something that I don't understand and haven't found an explanation for. There seem to be a lot of exceptions logged for "Invalid object name '#x'", where #x is any temp
    table name. This includes ones like "Invalid object name '#tmp_sp_help_category'", which is not even a table in our code.
    This does not seem to happen consistently, but I have repro'd it several times. Each time there is no error shown in Management Studio. It happens on alters of stored procedures that use temp tables as well as when they are run. It happens even for a script
    as simple as the one below, which logs an exception saying "Invalid object name '#x'" and indicating that it has a severity of 16.
    Has anyone run across this? I am guessing these are not exceptions that should actually be logged, but then again there might be times when a temp table really is missing, so we can't just ignore them all.
    Thanks,
    Ron Rice
    create table #x(x1 int)
    select * from #x
    Ron Rice

    The #tmp_sp_help_category table is associated with SSMS Activity Monitor:
    http://blogs.msdn.com/b/grahamk/archive/2009/10/20/troubleshooting-sql-server-management-studio-with-sql-profiler-and-debugging-tools-part-1.aspx
    You may consider to report at Connect:
    https://connect.microsoft.com/SQLServer
    I am moving it to Tools.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Recovery catalog, target database.

    Hello all,
    I have a question concerning recovery catalog.
    Can i use the same database as recovery catalog and target database?
    Let us say that i have a database orcl, can this database be the target and the recovery catalog at the same time ? is there any disadvantages?
    Regards,

    NB wrote:
    Hello all,
    I have a question concerning recovery catalog.
    Can i use the same database as recovery catalog and target database?
    Let us say that i have a database orcl, can this database be the target and the recovery catalog at the same time ? is there any disadvantages?Yes you can use the same database as the recovery catalog but that's going to be a wrong decision. Think about this, you have lost your target database and since you had your recovery catalog also stored in it, now that's also gone! So a good thing or bad thing it would be ?
    Edit:
    Please read the same from the docs,
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmcatdb.htm#CHDECBEH
    Do not use the target database to be backed up as the database for the recovery catalog. The recovery catalog must be protected in the event of the loss of the target database.Aman....
    Edited by: Aman.... on Aug 7, 2011 4:26 PM

  • How could I synchronize databases via web services

    I have two web sites. The first has been build in jsp. The second has been build in php. Each of these sites has database mysql.
    I have managed to communicate these two web sites via web services.
    I would like someone to tell me how could I syncronize these two databases via web services. There is something specific procedure?
    Thanks in advance, sorry for my bad English

    If you can explain us what you actually looking for, then I can extend my help.As we are also using websites in jsp which is having DB connections.
    Cheers
    Rajesh R

Maybe you are looking for

  • Jar Files in a Jar File - Classpath Error

    Hi, I created a jar file that will have all the class files of the application. In the manifest file class path, I have the jar files the application is dependent on. The dependent jar files were kept outside of the application jar file. I was able t

  • Arabic Text problem in Excel

    Hi All, I am downloading my data using GUI_DOWNLOAD FM into Excel , Here the issue is in excel the Arabic text is displayed as # , I have gone through the scn and worked on some suggestions given like to add code page tab delimiter etc... but could g

  • MacBookPro vs PowerBook Capturing Working w/HDV - CardBus vs no ExpressCard

    I have seen the benchmarks and the posts here, and it is clear, but for the issues below, I should be getting a MacBook Pro now that my older PowerBook has run into issues. Once footage is captured it seems to be a no-brainer (This thread http://disc

  • 2 balance sheet and 1 storage area

    Hi All, We have a running SAP system with one company code and 1 plant. We have a different financier that will finance the next phase of the project and hence need to see the accounting entries separately. Both the running plant and the new project

  • Getting Apple support for a corrupted .Mac password

    Can someone give me an address at Apple where I can get support that will help me get into my .mac and mac mail accounts? I have called support and visited a Genius Bar but they both say I have to write. I have written e-mails to Apple Support and th