Extending events in AS 2.0?

I'm trying to extend the Tween class so that it will notify a
parent when it is finished with a tween, but I'm not sure how to
properly register the onMotionFinished event. The code I'm using
is:
import mx.transitions.Tween;
class TweenItem extends Tween {
var parent:ColorSelector;
function setParent(parent){
this.parent = parent;
function onMotionFinished () {
this.yoyo();
this.stop();
this.parent.flagFinished();
}

If that code is all planted "on" an object, that might the source of the problem.  Try following the AS3 protocol of keeping the code on the timeline. Instead of using "on" on the object, try using...
btnName.onRelease = function(){
   etc...
on the timeline like you would in AS3.

Similar Messages

  • 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

  • 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

  • Best Practice for Monitoring, on VPS 2012 Server Standard. Extended Events or Profiler?

    Hi,
    What tools do you use to determine if you should tweak SQL Server configuration and optimize code route, or simply bump up your virtual resources? Can someone share a bag of Extended Events to monitor at the VPS level?  
    I'm a reasonably decent SQL Developer but never advanced far with DBA efforts. Especially when the mainstream went virtual. Seemed to me that all SQL Servers flexibility with managing disk and memory went out the window now that everything is 'shared', NATed,
    and Plesked. So I basically dropped out of the conversation and built stuff with SSIS and TSQL.
    Now, I'm charged with assessing a bottleneck on a VPS Windows 2012 Standard running SQL 2012 Express. I've read that running profiler and traces are deprecated and I've looked a bit at the servers extended events on the hosted environment. I have not run anything.
    My question: Does it make sense to think in terms of 'levels' in deciding what to monitor? I consider the SQL Server as a level, then the Windows Server, and finally the Virtual Level. What I'm getting at, is sure, I can monitor SQL Server with a profile tool,
    but it won't know SQL is on a VPS. So do I miss something?
    There used to be day when we had a dedicated physical box for SQL Server. We ran traces using profiler and got good clues on how to improve performance. In todays VPS world we can use sliders to increase virtual memory and disk space. What tools do you use
    to determine if you should tweak SQL Server configuration and optimize code route, or simply bump up your virtual resources? Can someone share a bag of Extended Events to monitor at the VPS level?  
    What Extened Events at the VPS level tell me if SQL Server is struggling with the limited 1Gb virtual memory? I realize this is not a direct question but hopefully someone will point this developer in the right direction.
    John

    Hi John,
    From SQL point of view it doesnt really matter whether the box is physical or virtual. So if you feel there is performance issues with sql and you are well versed with sql profiler troubleshooting go ahead with that. If you feel performance is good, then
    you know where to look into.
    I would first prefer to find whether it is really a problem with SQL before trying to troubleshoot sql side and I use perfmon counters to do that.
    Also I would look at the SQL Error log to see if there are any obvious errors.
    I havent used extended events much so leaving that for others to comment on. :)
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • 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

  • Best way to query extended events file in sql server 2012

    Hello all,
    is there any best way to xquery extended events async file i am having hard time sorting  out data in GUI and using xquery.
    Any help highly appreciated.
    thanks,
    ashwin.

    Yes, there might be better way to write it the way you did it. But since I don't know what you wrote or what you are looking for I can't give any advice. You need to be more specific.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Microsoft sql server extended event log file

    Dears
    Sorry for my below questions if it is very beginner level.
    In my implementation I have cluster SQL 2012 on Windows 2012; I am using MountPoints since I have many Clustered Disks.
    My MountPoint Size is only 3 GB; My Extended event log are growing fast and it is storing in the MountPoint Drive directly (Path: F:\MSSQL11.MSSQLSERVER\MSSQL\Log).
    What is the best practice to work with it? (is it to keep all Extended events? or recirculate? or to shrink? or to store in DB?)
    Is there any relation between SQL truncate and limiting the size of Extended event logs?
    How can I recirculate this Extended Events?
    How can I change the default path?
    How can I stop it?
    and in case I stop it, does this means to stop storing SQL event in Windows event Viewer?
    Thank you

    After a lot of checking, I have found below:
    My Case:
    I am having SQL Failover Cluster Instances "FCI" and I am using Mount-Points to store my Instances.
    I am having 2 Passive Copies for each FCI.
    In my configuration I choose to store the Root Instance which include the logs on Mount-Point.
    My Mount Point is 2 GB Only, which became full after few days of deployment.
    Light Technical Information:
    The Extended Event Logs files are generated Coz I have FCI, in single SQL Installation you will not find this files.
    The File Maximum size will be 100 MB.
    The Files start circulating after it become 10 Full Files.
    If you have the FCI installed as 1 Active 2 Passive, and you are doing failover between the nodes, then you will expect to see around 14 - 30 copy of this file.
    Based on above information you will need to have around 100 MB * 10 Files Per Instance copy * 3 Since in my case I have 1 Active and 2 passive instances which will = 3000 MB
    So in my case My Mount-Point was 2 GB, which become full coz of this SQLDIAG Logs.
    Solution:
    I extended my mount point by 3 GB coz I am storing this logs on it.
    In case you will need to change SQLDIAG Extended Logs Size to 50 MB for example and place to F:\Logs, then you will need below commands:
    ALTER SERVER CONFIGURATION SET DIAGNOSTICS LOG OFF;
    ALTER SERVER CONFIGURATION
    SET DIAGNOSTICS LOG MAX_SIZE = 50 MB;
    ALTER SERVER CONFIGURATION
    SET DIAGNOSTICS LOG PATH = 'F:\logs';
    ALTER SERVER CONFIGURATION SET DIAGNOSTICS LOG ON;
    After that you will need to restart the FCI from SQL Server Configuration Manager or Failover Cluster Manager.
    I wish you will find this information helpful if it is your case.
    Regards

  • 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

  • Cannot stop an Extended Event session on server

    I have two extended events sessions running on a server. I do have sql jobs that automatically stop the XE sessions and import the results to working tables. I see two "ALTER EVENT SESSION XXXX ON SERVER STATE = STOP" statements that are being
    executed for more than 2 days, the wait types are XE_SERVICES_MUTEX and PREEMPTIVE_XE_SESSIONCOMMIT. This is not the first time I see this behavior.
    Are you aware of any bug related to this? I do not want to kill the sessions (I guess the sessions won't die anyway) neither restart the sql service
    Any suggestions?
    Thanks
    Javier
    Javier Villegas

    I've emailed the PM for Extended Events to ask about this.  It appears from the connect item that it is still a problem.
    http://connect.microsoft.com/SQLServer/feedback/details/383878/extended-event-session-hangs
    In the past the session would eventually go away in most cases, but there have been times where it gets stuck and you have to bounce the instance to clear the issue.  I'll let you know when I hear more back from the PM.
    Jonathan Kehayias | Principal Consultant,
    SQLSkills.com
    SQL Server MVP | Microsoft Certified Master: SQL Server 2008
    Author of Troubleshooting SQL Server: A Guide for Accidental DBAs
    Feel free to contact me through
    My Blog or
    Twitter. Become a
    SQLskills Insider!
    Please click the Mark as Answer button if a post solves your problem!

  • 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.

  • SQL Extended Events for finding errors

    SQL Extended Events for finding errors, how to find out more than SQL text, like the stored procedure?
    SQL 2012, 2008 and 2005 (not much 2005)
    We had an agent job that was not completing and was not giving any errors. Turned out that too large a number was being SET into an integer field. We set up a SQL Extended Events based on the following URL. It gave us the SQL text and that did help. BUt
    how could we have done even more to find the error? Is there a way to find the stored procedure? Because the SQL text was pretty generic. What else can be used to find errors that are not being reported back to the agent job?
    http://www.brentozar.com/archive/2013/08/what-queries-are-failing-in-my-sql-server/

    Hi,
    Are you able to manually execute the stored procedure? How many steps are there in this job?
    You may create a test job with only one step running this stored procedure and test the result.
    As Kalman suggested, please check the relative message in job history and event viewer.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Extended events /actions definitions

    One of the shortcomings I seem to keep stumbling across is that event action definitions are no where to be found.  I've been searching for weeks and can't find a resource from Microsoft which helps me understand the official definition for an action.
    Has someone here found that resource or know where it is?

    If you are talking about the descriptions of what they collect, then indeed the DMVs are the best place at hand currently still.
    Example query:
    -- XE Actions
    SELECT dm_xe_packages.name AS package_name,
    dm_xe_objects.name AS source_name,
    dm_xe_objects.description
    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 = 'action'
    If you want to undestand the Extended Events Architecture more deeply I can recommend this article by Jonathan Kehayias:
    Using SQL Server 2008 Extended Events
    Andreas Wolter (Blog |
    Twitter)
    MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
    www.SarpedonQualityLab.com |
    www.SQL-Server-Master-Class.com

  • Extended Events: How to capture DML on a specific table

    I want to capture Select/Insert/Update/Delete commands on a specific table, lets say - dbo.MyTbl.
    I can use extended events to analyze the completed TSQL commands in order to find dbo.MyTbl or [dbo].[MyTbl] (I assume the schema is always mentioned explicitly). The problem is that the table could be accessed through a view, and it won't be mentioned explicitly
    in the TSQL command.
    Is there a way to solve this problem through Extended Events, or a better solution for such a problem?
    El castellano no es mi lengua materna. Discúlpenme por los errores gramaticales, y, si pueden, corríjanme en los comentarios, o por correo electrónico. ¡Muchas gracias! Blog: http://about.me/GeriReshef

    Seems like you are looking for the Server Audit funtionality. It requires certain versions/editions. Server Audit is implemented using Extended Events but the underlying X/E mechanisms that Server Audit is using isn't directly available throuh X/E.
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • 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

  • High number of "Network error code 0x2746" in extended events log

    In the extended event log of our database server I see 880 consecutive identical errors, all occurring between
    17:00:49 and 17:15:25. The message is:
    Network error code 0x2746 occurred while establishing a connection; the connection has been closed. This may have been caused by client or server login timeout expiration. Time spent during login: total 27 ms, enqueued 0 ms, network writes 0 ms, network
    reads 25 ms, establishing SSL 8 ms, negotiating SSPI 0 ms, validating login 0 ms, including user-defined login processing 0 ms. [CLIENT: 10.127.214.32]
    The timings in each message are a little bit different. It might be interesting to know the averages for these timings, so here is the message again, now with the timings replaced by averages (rounded to 1 digit):
    Network error code 0x2746 occurred while establishing a connection; the connection has been closed. This may have been caused by client or server login timeout expiration. Time spent during login: total 32.5 ms, enqueued 0.5 ms, network writes 0.9 ms,
    network reads 29.4 ms, establishing SSL 8.3 ms, negotiating SSPI 0.0 ms, validating login 0.0 ms, including user-defined login processing 0.0 ms. [CLIENT: 10.127.214.32]
    The client is a Citrix server that runs a COTS program. It serves approx. 20 users.
    What can be the cause of this? Can it only be the program that automatically tries to reconnect?

    Hello,
    Please read about possible causes and resolutions on the following resource:
    http://technet.microsoft.com/en-us/library/ms187005(v=SQL.105).aspx
    Please examine any certificate used for communications. Maybe a certificate has expired.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • 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

Maybe you are looking for

  • Can I see PDF files in the Imac through AppleTV?

    Many times I deliver a presentation. If I buy Apple TV, can i see PDF files in the Imac on the screen?

  • My iPod touch wont Connect or Slide

    My iPod screen says Connect to iTunes, but it wont connect, and I've tried to "Hard Reset" it, but it just goes right back to the same screen. also when i try to turn it off it wont let me slide to turn it off? Please help!! i've had my iPod for quit

  • Hp photosmart 5515 blue won't work...

    Hi, For the past 4 HOURS, I have been trying to print my **bleep** pages in colour. Everything works EXCEPT blue. I have replaced it with 4 new cartridges, thinking it was my ink. It's not. I have now wasted 4 hours of my time, around 100 sheets of p

  • Upload Exel file into VC

    Hi friends, I want to upload the file(Exel) into VC. How we can do this. I tried it by taking a Form iview and add a field which have Control of Pushbutton on this form . But when i am deployed it and click on field nothing will be displayed. I want

  • SPM questions(Fire Fighter)

    Hello All, I had some questions on SPM(Fire fighter),please help me with this.. For Critical transactions tab in /n/virsa/vfat--why we used it for,does it show header and footer log details.. if we do not enter critical transactions will it still pul