SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Continuous Database Monitoring with the
     Trace API
     Firebird Conference 2011 – Luxembourg
     25.11.2011 – 26.11.2011
     Thomas Steinmaurer DI

     +43 7236 3343 896
     thomas.steinmaurer@scch.at t.steinmaurer@upscene.com
     www.scch.at                www.upscene.com
                                http://blog.upscene.com/thomas/



The SCCH is an initiative of                                      The SCCH is located at
Agenda


       Motivation
       Monitoring Approaches
       Firebird 2.5 Audit and Trace Services
       Usage of fbtracemgr
       FB TraceManager 2
       Q&A




© Software Competence Center Hagenberg GmbH    2
Motivation


       Several stakeholders for database monitoring
             Administrators
             Developers
             Auditors
             ...
       A snapshot (MON$) of current activities is interesting. But,
       most of the time you need the history of executed events
       Continuous monitoring gives you a stream of executed
       events over a period of time and lets you look back
       A new way to detect and diagnose problems
       The Audit and Trace Services API in Firebird 2.5
       provides that!!!
© Software Competence Center Hagenberg GmbH                           3
Motivation


       Typical use cases for the Audit and Trace Services API
             Number of executed statements for a particular time period
                  Usage statistics for load planning
             Block-box debugging
                  Execution trace for an in-house / third-party product
                  For third-party products, usually you don‘t have access to the
                  client source code
                  No need for adding trace logic into the client application
             Detection of
                  Failed / Unauthorized access
                  Certain event types
                  Improper client transaction management (e.g. Regular usage of
                  COMMIT RETAINING)
                  Full table scans

© Software Competence Center Hagenberg GmbH                                        4
Motivation


       Typical use cases for the Audit and Trace Services API
             Detection of (continued)
                  Most-Frequently executed statements
                  Worst-Performing executed statements
                  Executed statements which are slower than a given threshold
                  (e.g. 5 seconds)
             Statistics
                  Number of statements per IP / process name / user ...
                  Most loaded database on the server
                  When are usual peak loads
                  ...
             Generated trace as input for a security audit
             AND MORE ... !!!
© Software Competence Center Hagenberg GmbH                                     5
Motivation




                       Quick Start Demonstration




© Software Competence Center Hagenberg GmbH        6
Agenda


       Motivation
       Monitoring Approaches
       Firebird 2.5 Audit and Trace Services
       Usage of fbtracemgr
       FB TraceManager 2
       Q&A




© Software Competence Center Hagenberg GmbH    7
Monitoring Approaches


       Basic monitoring requirements
             Continuous
             Server-side
             Configurable
       Three out-of-the box monitoring approaches in Firebird 2.5
             Trigger-based (since Firebird 1.0)
             Monitoring tables (since Firebird 2.1)
             Audit and Trace Services (since Firebird 2.5)
       Based on your monitoring requirements, you possibly will
       have/use a mix of these approaches



© Software Competence Center Hagenberg GmbH                         8
Monitoring Approaches
 Comparison

                                                              Monitoring   Audit/Trace
                                              Trigger-based
                                                               tables       Services
    Available since Firebird
                                                   1.0           2.1          2.5
    version

    Continuous                                    Yes            No           Yes

    Serverside                                    Yes            Yes          Yes

    Configurable                                  Yes            No           Yes

    Monitoring of SELECT                           No            Yes          Yes

    Monitoring of DELETE,
                                                  Yes            Yes          Yes
    INSERT, UPDATE

© Software Competence Center Hagenberg GmbH                                              9
Monitoring Approaches
 Comparison

                                                              Monitoring   Audit/Trace
                                              Trigger-based
                                                               tables       Services
    Access to old/new
    column values for
                                                  Yes            No            No
    DELETE, INSERT,
    UPDATE
    Access to statement
                                                   No            No           Yes
    execution time
    Access to statement
                                                   No            No           Yes
    execution plan
    Monitoring of database-                       Partly
    wide operations like                       (database
                                                                Partly        Yes
    connect, disconnect,                       triggers in
    transaction start etc.                    Firebird 2.1)

© Software Competence Center Hagenberg GmbH                                              10
Agenda


       Motivation
       Monitoring Approaches
       Firebird 2.5 Audit and Trace Services
       Usage of fbtracemgr
       FB TraceManager 2
       Q&A




© Software Competence Center Hagenberg GmbH    11
Audit and Trace Services
 General

       New feature in Firebird 2.5 across all architectures and
       supported platforms
       Allows to produce a trace of events in chronological
       sequence
       Event types
             Database-specific
                  Connect, Disconnect
                  Start/Commit/Rollback of transactions
                  Prepare/Start/Finish/Free of SQL statements
                  Start/Finish of stored procedures and triggers
                  etc.
             Server-wide
                  Services API requests (e.g. backup, restore, get server log etc.)


© Software Competence Center Hagenberg GmbH                                           12
Audit and Trace Services
 System Audit vs. User Trace

       System Audit
             Will be started by the engine upon Firebird server start
             Stores trace output in a text file on the server
             Is activated by setting the new AuditTraceConfigFile
             parameter (= path to the trace configuration file) in
             firebird.conf
             There can be only one system audit per Firebird instance
       User Trace
             Needs to be started by a user manually
             Trace output is read by the initiating application fetching trace
             data via the Services API
             Needs to be re-started after a server crash/restart
             There can be several user traces per Firebird instance

© Software Competence Center Hagenberg GmbH                                      13
Audit and Trace Services
 Trace Output

       Implemented by the pre-installed fbtrace(.dll|.so) plugin
   Trace session ID 1 started
   2010-11-10T22:26:00.4160 (1368:0000000000F1DC88) TRACE_INIT
      SESSION_1 FBTM - tourism


   2010-11-10T22:26:00.4160 (1368:0000000000F1DC88) ATTACH_DATABASE
      tourism.fdb (ATT_1415, TOURISM:NONE, NONE, TCPv4:127.0.0.1)
      C:Program Files (x86)Upscene ProductionsDatabase Workbench 4
      ProDBW4.exe:3768

   2010-11-10T22:26:00.4220 (1368:0000000000F1DC88) START_TRANSACTION
      tourism.fdb (ATT_1415, TOURISM:NONE, NONE, TCPv4:127.0.0.1)
      C:Program Files (x86)Upscene ProductionsDatabase Workbench 4
      ProDBW4.exe:3768
            (TRA_24395, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

   2010-11-10T22:26:00.4860 (1368:0000000000F1DC88) PREPARE_STATEMENT
      tourism.fdb (ATT_1415, TOURISM:NONE, NONE, TCPv4:127.0.0.1)
      C:Program Files (x86)Upscene ProductionsDatabase Workbench 4
      ProDBW4.exe:3768
            (TRA_24395, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)


© Software Competence Center Hagenberg GmbH                                   14
Audit and Trace Services
 Trace Configuration

       A system audit / user trace is configurable by providing a
       mandatory trace configuration (file)
       Customization of
             Database-wide events
                  Connect, disconnect, prepare statement etc.
             Server-wide events
                  Services API requests
       Consists of
             Default <database> section
             <database db_name_pattern> section per database
             Max. one <services> section for server-wide events
       Pre-installed fbtrace.conf is a good start for writing your
       own trace configuration

© Software Competence Center Hagenberg GmbH                          15
Audit and Trace Services
 Trace Configuration

       A very simple example
   <database>
      enabled true
   </database>

   <database employee.fdb>
      enabled false
      log_connections true
      log_transactions true
   </database>

   <database tourism.fdb>
      log_connections true
   </database>




© Software Competence Center Hagenberg GmbH   16
Audit and Trace Services
 Trace Configuration

       <database> configuration parameters
             enabled, log_filename, max_log_size, include_filter,
             exclude_filter, log_connections, connection_id,
             log_transactions, log_statement_prepare,
             log_statement_free, log_statement_start,
             log_statement_finish, log_procedure_start,
             log_procedure_finish, log_trigger_start, log_trigger_finish,
             log_context, print_plan, print_perf, log_blr_requests,
             print_blr, log_dyn_requests, print_dyn, time_threshold,
             max_sql_length, max_blr_length, max_dyn_length,
             max_arg_length, max_arg_count
       <services> configuration parameters
             enabled, log_filename, max_log_size, include_filter,
             exclude_filter, log_services, log_service_query


© Software Competence Center Hagenberg GmbH                                 17
Audit and Trace Services
 Manage Trace Sessions

       Trace Sessions can be managed via new Services API calls
           Action                             Services API call

           Start a new user trace session isc_action_svc_trace_start


           Stop a trace session               isc_action_svc_trace_stop


           Suspend a trace session            isc_action_svc_trace_suspend


           Resume a trace session             isc_action_svc_trace_resume


           List all trace sessions            isc_action_svc_trace_list

© Software Competence Center Hagenberg GmbH                                  18
Audit and Trace Services
 Security

       Every user can start a trace session
       Used user name upon attaching to the services manager defines
           Privileges in respect to managing other trace sessions
           Visibility of traceable statements
       Privileges
           SYSDBA can manage all other trace sessions including a system
           audit
           Non-SYSDBA users can manage their own trace sessions only
       Visibility
           A user trace session started by SYSDBA logs activities of all
           users/connections
           A user trace session started by a non-SYSDBA user logs only its
           own activities


© Software Competence Center Hagenberg GmbH                                  19
Agenda


       Motivation
       Monitoring Approaches
       Firebird 2.5 Audit and Trace Services
       Usage of fbtracemgr
       FB TraceManager 2
       Q&A




© Software Competence Center Hagenberg GmbH    20
Usage of fbtracemgr




© Software Competence Center Hagenberg GmbH   21
Usage of fbtracemgr




                                 Live Demonstration




© Software Competence Center Hagenberg GmbH           22
Agenda


       Motivation
       Monitoring Approaches
       Firebird 2.5 Audit and Trace Services
       Usage of fbtracemgr
       FB TraceManager 2
       Q&A




© Software Competence Center Hagenberg GmbH    23
FB TraceManager 2




© Software Competence Center Hagenberg GmbH   24
FB TraceManager 2




                                 Live Demonstration




© Software Competence Center Hagenberg GmbH           25
FB TraceManager 2
 Editions

       Lite Edition
             Local connections and raw trace data only
             Freely available
       Standard Edition
             Lite + Remote connections, Parser, Reporting
             99 EUR per user named license
       Enterprise Edition
             Standard + Analysis, Event Processing
             149 EUR per user named license
       Trial Edition
             30 days limited Enterprise Edition
             Limited number of received/parsed trace events


© Software Competence Center Hagenberg GmbH                   26
Agenda


       Motivation
       Monitoring Approaches
       Firebird 2.5 Audit and Trace Services
       Usage of fbtracemgr
       FB TraceManager 2
       Q&A




© Software Competence Center Hagenberg GmbH    27
Q&A




                           Questions and Answers




© Software Competence Center Hagenberg GmbH        28
The End




                         Thanks for your attention!

                                     thomas.steinmaurer@scch.at
                                     t.steinmaurer@upscene.com
                                    http://blog.upscene.com/thomas




© Software Competence Center Hagenberg GmbH                          29
Resources


       Firebird 2.5 Release Notes:
       http://www.firebirdsql.org/devel/doc/rlsnotes/html/rlsnotes2
       5.html
       Trace Services and Audit in Firebird 2.5, by Vlad Khorsun;
       Firebird Conference 2009 Munich
       Audit and Trace Services in Firebird 2.5, by Thomas
       Steinmaurer, 2010:
       http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp
       _audit_trace_steinmaurer
       FB TraceManager 2: http://www.upscene.com/go/?go=fbtm



© Software Competence Center Hagenberg GmbH                           30

Mais conteúdo relacionado

Semelhante a Continuous Database Monitoring with Firebird Trace API

Safeguarding Your SAP System Availability And Performance
Safeguarding Your SAP System Availability And PerformanceSafeguarding Your SAP System Availability And Performance
Safeguarding Your SAP System Availability And PerformanceDave Fox
 
Dot Net Application Monitoring
Dot Net Application MonitoringDot Net Application Monitoring
Dot Net Application MonitoringRavi Okade
 
Continuous Profiling in Production: What, Why and How
Continuous Profiling in Production: What, Why and HowContinuous Profiling in Production: What, Why and How
Continuous Profiling in Production: What, Why and HowSadiq Jaffer
 
3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...
3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...
3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...Sandeep Chellingi
 
NashTech - Azure Application Insights
NashTech - Azure Application InsightsNashTech - Azure Application Insights
NashTech - Azure Application InsightsPhi Huynh
 
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.ioMuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.ioJitendra Bafna
 
Platform Observability and Infrastructure Closed Loops
Platform Observability and Infrastructure Closed LoopsPlatform Observability and Infrastructure Closed Loops
Platform Observability and Infrastructure Closed LoopsLiz Warner
 
Production profiling what, why and how technical audience (3)
Production profiling  what, why and how   technical audience (3)Production profiling  what, why and how   technical audience (3)
Production profiling what, why and how technical audience (3)RichardWarburton
 
T3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of ExcellenceT3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of Excellenceveehikle
 
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...Extra Technology
 
To Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-PatternsTo Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-PatternsDevOps.com
 
06 operations and feedback dap-kabel
06   operations and feedback dap-kabel06   operations and feedback dap-kabel
06 operations and feedback dap-kabelDavid Alvarez Palomo
 
Mastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FMEMastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FMESafe Software
 

Semelhante a Continuous Database Monitoring with Firebird Trace API (20)

Safeguarding Your SAP System Availability And Performance
Safeguarding Your SAP System Availability And PerformanceSafeguarding Your SAP System Availability And Performance
Safeguarding Your SAP System Availability And Performance
 
DevOps (2).pptx
DevOps (2).pptxDevOps (2).pptx
DevOps (2).pptx
 
Dot Net Application Monitoring
Dot Net Application MonitoringDot Net Application Monitoring
Dot Net Application Monitoring
 
Continuous Profiling in Production: What, Why and How
Continuous Profiling in Production: What, Why and HowContinuous Profiling in Production: What, Why and How
Continuous Profiling in Production: What, Why and How
 
Rv11
Rv11Rv11
Rv11
 
3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...
3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...
3158 - Cloud Infrastructure & It Optimization - Application Performance Manag...
 
NashTech - Azure Application Insights
NashTech - Azure Application InsightsNashTech - Azure Application Insights
NashTech - Azure Application Insights
 
Api gitlab: configurazione dei progetti as a service
Api gitlab: configurazione dei progetti as a serviceApi gitlab: configurazione dei progetti as a service
Api gitlab: configurazione dei progetti as a service
 
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.ioMuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
 
Platform Observability and Infrastructure Closed Loops
Platform Observability and Infrastructure Closed LoopsPlatform Observability and Infrastructure Closed Loops
Platform Observability and Infrastructure Closed Loops
 
How to Build a DevOps Toolchain
How to Build a DevOps ToolchainHow to Build a DevOps Toolchain
How to Build a DevOps Toolchain
 
SCOM Tips and Tricks
SCOM Tips and TricksSCOM Tips and Tricks
SCOM Tips and Tricks
 
Production profiling what, why and how technical audience (3)
Production profiling  what, why and how   technical audience (3)Production profiling  what, why and how   technical audience (3)
Production profiling what, why and how technical audience (3)
 
T3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of ExcellenceT3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of Excellence
 
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
 
Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0
 
Kscope presentation 2013
Kscope presentation 2013Kscope presentation 2013
Kscope presentation 2013
 
To Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-PatternsTo Scale Test Automation for DevOps, Avoid These Anti-Patterns
To Scale Test Automation for DevOps, Avoid These Anti-Patterns
 
06 operations and feedback dap-kabel
06   operations and feedback dap-kabel06   operations and feedback dap-kabel
06 operations and feedback dap-kabel
 
Mastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FMEMastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FME
 

Mais de Mind The Firebird

Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tablesMind The Firebird
 
Using Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easilyUsing Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easilyMind The Firebird
 
A year in the life of Firebird .Net provider
A year in the life of Firebird .Net providerA year in the life of Firebird .Net provider
A year in the life of Firebird .Net providerMind The Firebird
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions workMind The Firebird
 
Using ТРСС to study Firebird performance
Using ТРСС to study Firebird performanceUsing ТРСС to study Firebird performance
Using ТРСС to study Firebird performanceMind The Firebird
 
Creating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQLCreating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQLMind The Firebird
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in detailsMind The Firebird
 
Understanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLMind The Firebird
 
Threading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyondThreading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyondMind The Firebird
 
New SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunNew SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunMind The Firebird
 
Orphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingMind The Firebird
 
Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016Mind The Firebird
 
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...Mind The Firebird
 
Working with Large Firebird databases
Working with Large Firebird databasesWorking with Large Firebird databases
Working with Large Firebird databasesMind The Firebird
 
Stored procedures in Firebird
Stored procedures in FirebirdStored procedures in Firebird
Stored procedures in FirebirdMind The Firebird
 
Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...Mind The Firebird
 

Mais de Mind The Firebird (20)

Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
 
Using Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easilyUsing Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easily
 
A year in the life of Firebird .Net provider
A year in the life of Firebird .Net providerA year in the life of Firebird .Net provider
A year in the life of Firebird .Net provider
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions work
 
SuperServer in Firebird 3
SuperServer in Firebird 3SuperServer in Firebird 3
SuperServer in Firebird 3
 
Copycat presentation
Copycat presentationCopycat presentation
Copycat presentation
 
Using ТРСС to study Firebird performance
Using ТРСС to study Firebird performanceUsing ТРСС to study Firebird performance
Using ТРСС to study Firebird performance
 
Overview of RedDatabase 2.5
Overview of RedDatabase 2.5Overview of RedDatabase 2.5
Overview of RedDatabase 2.5
 
Creating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQLCreating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQL
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in details
 
Understanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQL
 
Threading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyondThreading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyond
 
New SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunNew SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad Khorsun
 
Orphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and Logging
 
Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016
 
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
 
Working with Large Firebird databases
Working with Large Firebird databasesWorking with Large Firebird databases
Working with Large Firebird databases
 
Stored procedures in Firebird
Stored procedures in FirebirdStored procedures in Firebird
Stored procedures in Firebird
 
Firebird on Linux
Firebird on LinuxFirebird on Linux
Firebird on Linux
 
Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...
 

Último

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Último (20)

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

Continuous Database Monitoring with Firebird Trace API

  • 1. Continuous Database Monitoring with the Trace API Firebird Conference 2011 – Luxembourg 25.11.2011 – 26.11.2011 Thomas Steinmaurer DI +43 7236 3343 896 thomas.steinmaurer@scch.at t.steinmaurer@upscene.com www.scch.at www.upscene.com http://blog.upscene.com/thomas/ The SCCH is an initiative of The SCCH is located at
  • 2. Agenda Motivation Monitoring Approaches Firebird 2.5 Audit and Trace Services Usage of fbtracemgr FB TraceManager 2 Q&A © Software Competence Center Hagenberg GmbH 2
  • 3. Motivation Several stakeholders for database monitoring Administrators Developers Auditors ... A snapshot (MON$) of current activities is interesting. But, most of the time you need the history of executed events Continuous monitoring gives you a stream of executed events over a period of time and lets you look back A new way to detect and diagnose problems The Audit and Trace Services API in Firebird 2.5 provides that!!! © Software Competence Center Hagenberg GmbH 3
  • 4. Motivation Typical use cases for the Audit and Trace Services API Number of executed statements for a particular time period Usage statistics for load planning Block-box debugging Execution trace for an in-house / third-party product For third-party products, usually you don‘t have access to the client source code No need for adding trace logic into the client application Detection of Failed / Unauthorized access Certain event types Improper client transaction management (e.g. Regular usage of COMMIT RETAINING) Full table scans © Software Competence Center Hagenberg GmbH 4
  • 5. Motivation Typical use cases for the Audit and Trace Services API Detection of (continued) Most-Frequently executed statements Worst-Performing executed statements Executed statements which are slower than a given threshold (e.g. 5 seconds) Statistics Number of statements per IP / process name / user ... Most loaded database on the server When are usual peak loads ... Generated trace as input for a security audit AND MORE ... !!! © Software Competence Center Hagenberg GmbH 5
  • 6. Motivation Quick Start Demonstration © Software Competence Center Hagenberg GmbH 6
  • 7. Agenda Motivation Monitoring Approaches Firebird 2.5 Audit and Trace Services Usage of fbtracemgr FB TraceManager 2 Q&A © Software Competence Center Hagenberg GmbH 7
  • 8. Monitoring Approaches Basic monitoring requirements Continuous Server-side Configurable Three out-of-the box monitoring approaches in Firebird 2.5 Trigger-based (since Firebird 1.0) Monitoring tables (since Firebird 2.1) Audit and Trace Services (since Firebird 2.5) Based on your monitoring requirements, you possibly will have/use a mix of these approaches © Software Competence Center Hagenberg GmbH 8
  • 9. Monitoring Approaches Comparison Monitoring Audit/Trace Trigger-based tables Services Available since Firebird 1.0 2.1 2.5 version Continuous Yes No Yes Serverside Yes Yes Yes Configurable Yes No Yes Monitoring of SELECT No Yes Yes Monitoring of DELETE, Yes Yes Yes INSERT, UPDATE © Software Competence Center Hagenberg GmbH 9
  • 10. Monitoring Approaches Comparison Monitoring Audit/Trace Trigger-based tables Services Access to old/new column values for Yes No No DELETE, INSERT, UPDATE Access to statement No No Yes execution time Access to statement No No Yes execution plan Monitoring of database- Partly wide operations like (database Partly Yes connect, disconnect, triggers in transaction start etc. Firebird 2.1) © Software Competence Center Hagenberg GmbH 10
  • 11. Agenda Motivation Monitoring Approaches Firebird 2.5 Audit and Trace Services Usage of fbtracemgr FB TraceManager 2 Q&A © Software Competence Center Hagenberg GmbH 11
  • 12. Audit and Trace Services General New feature in Firebird 2.5 across all architectures and supported platforms Allows to produce a trace of events in chronological sequence Event types Database-specific Connect, Disconnect Start/Commit/Rollback of transactions Prepare/Start/Finish/Free of SQL statements Start/Finish of stored procedures and triggers etc. Server-wide Services API requests (e.g. backup, restore, get server log etc.) © Software Competence Center Hagenberg GmbH 12
  • 13. Audit and Trace Services System Audit vs. User Trace System Audit Will be started by the engine upon Firebird server start Stores trace output in a text file on the server Is activated by setting the new AuditTraceConfigFile parameter (= path to the trace configuration file) in firebird.conf There can be only one system audit per Firebird instance User Trace Needs to be started by a user manually Trace output is read by the initiating application fetching trace data via the Services API Needs to be re-started after a server crash/restart There can be several user traces per Firebird instance © Software Competence Center Hagenberg GmbH 13
  • 14. Audit and Trace Services Trace Output Implemented by the pre-installed fbtrace(.dll|.so) plugin Trace session ID 1 started 2010-11-10T22:26:00.4160 (1368:0000000000F1DC88) TRACE_INIT SESSION_1 FBTM - tourism 2010-11-10T22:26:00.4160 (1368:0000000000F1DC88) ATTACH_DATABASE tourism.fdb (ATT_1415, TOURISM:NONE, NONE, TCPv4:127.0.0.1) C:Program Files (x86)Upscene ProductionsDatabase Workbench 4 ProDBW4.exe:3768 2010-11-10T22:26:00.4220 (1368:0000000000F1DC88) START_TRANSACTION tourism.fdb (ATT_1415, TOURISM:NONE, NONE, TCPv4:127.0.0.1) C:Program Files (x86)Upscene ProductionsDatabase Workbench 4 ProDBW4.exe:3768 (TRA_24395, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE) 2010-11-10T22:26:00.4860 (1368:0000000000F1DC88) PREPARE_STATEMENT tourism.fdb (ATT_1415, TOURISM:NONE, NONE, TCPv4:127.0.0.1) C:Program Files (x86)Upscene ProductionsDatabase Workbench 4 ProDBW4.exe:3768 (TRA_24395, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE) © Software Competence Center Hagenberg GmbH 14
  • 15. Audit and Trace Services Trace Configuration A system audit / user trace is configurable by providing a mandatory trace configuration (file) Customization of Database-wide events Connect, disconnect, prepare statement etc. Server-wide events Services API requests Consists of Default <database> section <database db_name_pattern> section per database Max. one <services> section for server-wide events Pre-installed fbtrace.conf is a good start for writing your own trace configuration © Software Competence Center Hagenberg GmbH 15
  • 16. Audit and Trace Services Trace Configuration A very simple example <database> enabled true </database> <database employee.fdb> enabled false log_connections true log_transactions true </database> <database tourism.fdb> log_connections true </database> © Software Competence Center Hagenberg GmbH 16
  • 17. Audit and Trace Services Trace Configuration <database> configuration parameters enabled, log_filename, max_log_size, include_filter, exclude_filter, log_connections, connection_id, log_transactions, log_statement_prepare, log_statement_free, log_statement_start, log_statement_finish, log_procedure_start, log_procedure_finish, log_trigger_start, log_trigger_finish, log_context, print_plan, print_perf, log_blr_requests, print_blr, log_dyn_requests, print_dyn, time_threshold, max_sql_length, max_blr_length, max_dyn_length, max_arg_length, max_arg_count <services> configuration parameters enabled, log_filename, max_log_size, include_filter, exclude_filter, log_services, log_service_query © Software Competence Center Hagenberg GmbH 17
  • 18. Audit and Trace Services Manage Trace Sessions Trace Sessions can be managed via new Services API calls Action Services API call Start a new user trace session isc_action_svc_trace_start Stop a trace session isc_action_svc_trace_stop Suspend a trace session isc_action_svc_trace_suspend Resume a trace session isc_action_svc_trace_resume List all trace sessions isc_action_svc_trace_list © Software Competence Center Hagenberg GmbH 18
  • 19. Audit and Trace Services Security Every user can start a trace session Used user name upon attaching to the services manager defines Privileges in respect to managing other trace sessions Visibility of traceable statements Privileges SYSDBA can manage all other trace sessions including a system audit Non-SYSDBA users can manage their own trace sessions only Visibility A user trace session started by SYSDBA logs activities of all users/connections A user trace session started by a non-SYSDBA user logs only its own activities © Software Competence Center Hagenberg GmbH 19
  • 20. Agenda Motivation Monitoring Approaches Firebird 2.5 Audit and Trace Services Usage of fbtracemgr FB TraceManager 2 Q&A © Software Competence Center Hagenberg GmbH 20
  • 21. Usage of fbtracemgr © Software Competence Center Hagenberg GmbH 21
  • 22. Usage of fbtracemgr Live Demonstration © Software Competence Center Hagenberg GmbH 22
  • 23. Agenda Motivation Monitoring Approaches Firebird 2.5 Audit and Trace Services Usage of fbtracemgr FB TraceManager 2 Q&A © Software Competence Center Hagenberg GmbH 23
  • 24. FB TraceManager 2 © Software Competence Center Hagenberg GmbH 24
  • 25. FB TraceManager 2 Live Demonstration © Software Competence Center Hagenberg GmbH 25
  • 26. FB TraceManager 2 Editions Lite Edition Local connections and raw trace data only Freely available Standard Edition Lite + Remote connections, Parser, Reporting 99 EUR per user named license Enterprise Edition Standard + Analysis, Event Processing 149 EUR per user named license Trial Edition 30 days limited Enterprise Edition Limited number of received/parsed trace events © Software Competence Center Hagenberg GmbH 26
  • 27. Agenda Motivation Monitoring Approaches Firebird 2.5 Audit and Trace Services Usage of fbtracemgr FB TraceManager 2 Q&A © Software Competence Center Hagenberg GmbH 27
  • 28. Q&A Questions and Answers © Software Competence Center Hagenberg GmbH 28
  • 29. The End Thanks for your attention! thomas.steinmaurer@scch.at t.steinmaurer@upscene.com http://blog.upscene.com/thomas © Software Competence Center Hagenberg GmbH 29
  • 30. Resources Firebird 2.5 Release Notes: http://www.firebirdsql.org/devel/doc/rlsnotes/html/rlsnotes2 5.html Trace Services and Audit in Firebird 2.5, by Vlad Khorsun; Firebird Conference 2009 Munich Audit and Trace Services in Firebird 2.5, by Thomas Steinmaurer, 2010: http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp _audit_trace_steinmaurer FB TraceManager 2: http://www.upscene.com/go/?go=fbtm © Software Competence Center Hagenberg GmbH 30