One of the most common tasks for ApexSQL Log is to be used as part of a post-incident investigation, usually involving inadvertently or maliciously changed or damaged data to determine who made the changes, what exactly was changed, when and how. With ApexSQL Log, users can dig into the transaction log files and see the exact values before and after the change has occurred as well as review the complete history of changes on the affected rows.
Table of contents:
- Auditing
Forensic auditing
DDL auditing
Before and after auditing
Continuous auditing - Monitoring
Monitoring
Operational reporting - Restores and recovery
Disaster recovery
Row-level recovery
Point in time recovery
SQL injection attacks - Testing
Load testing - Replication
Transactional replication
Peer to peer, bi-directional replication
Reporting servers
Cross-platform replication
Consolidated reporting - Migrations and restores
No downtime/data loss migrations
Zero data loss restores
Auditing
Forensic auditing
- Checklist for suspicious activity on SQL Server
- SQL Server database Forensic auditing including row history and before-and-after auditing
- SQL Server true detective – Solving the case of the broken database
DDL auditing
Instead of tracking the DDL changes via database triggers, which can be a performance intensive and intrusive task, you can use ApexSQL Log to filter out, examine, report and export on all schema changes made to a database. You can also track the user, machine and application that made the change and even isolate and rollback problematic and/or inadvertent changes.
Before and after auditing
Before-and-after auditing can be vital to drilling down to isolate the transaction responsible for “breaking changes”, missing or damaged data, or even maliciously changed data. ApexSQL Log allows you to drill down to the table and individual row associated with the change based on powerful filter criteria including date, user, object, operation type etc and see the values before and after the change. This analysis can be done on data changes even before the tool was installed
Continuous auditing
Imagine if you could store every transaction ever made in your database in a repository, and not incur any performance impact. Or query the transaction log information just like you could any other database table?
All of the data that can be read, filtered, viewed, reported on and exported via the ApexSQL Log graphical user interface can also be continuously streamed directly to a SQL Server database repository, in a process we refer to as “Continuous auditing”
Achieving continuous auditing is an easy task for ApexSQL Log. By continuously reading transaction log files (and backups), ApexSQL Log creates uninterrupted auditing trail of all transactions executed on the audited databases ensuring that no transactions are missed or duplicated at any point.
With continuous auditing, ApexSQL Log allows user to always have easy access to the transaction log information which can be stored directly to a SQL Server database for auditing purposes and then accessed/queried on demand just like any other data.
- How to continuously audit transaction log file data directly into a SQL Server database
- Continuous SQL Server database auditing and reporting using the transaction log
- Continuous auditing of SQL Server database using the transaction log
- How to continuously pump transaction log file audit data directly to a SQL Server database
- Automating daily transaction log reading
Monitoring
Monitoring
There is a wealth of information about transaction activity, volume and type in the SQL Server transaction log. This information can be extremely useful in isolating problems and assessing any impacts to the overall system.
With ApexSQL Log and the continuous auditing feature, you can constantly monitor transaction volume, to identify suspicious spikes or other anomalies and create reports on critical metrics like transaction volume by server, database, table, user etc
Even better, if incidents are detected, the affecting transactions can be isolated and rolled back, quickly and easily
Operational reporting
By continuous archiving all transactions in a repository, reports can be configured to create a wealth of valuable aggregate information, such as transactional volumes by day, user, table application, machine etc. Reports can be created for top instances, databases, users, tables etc. by transaction volume, transactions by type e.g. Inserts, updates and deletes or DML vs DDL
Restores and recovery
Disaster recovery
After Identifying who made the inadvertent changes, where and when as described above, one of the critical tasks after the database was affected by the disaster is to roll back those inadvertent changes and revert both structure and data to the pre-disaster original state. With ApexSQL Log we can easily recover from any rogue changes by and isolate rogue transactions and easily reverse them by creating undo scripts down to the transaction, object and even row level
- How to recover from a SQL Server database data-file corruption disaster
- Recover a SQL Server database using an old backup and the current transaction log file
- Recover a SQL Server database using only a transaction log file (.ldf) and old backup files
- How to recover views, stored procedures, functions, and triggers
- 4 techniques for recovering lost tables due to DROP Table operation
- Recover deleted records in Dynamics CRM 2016
- Fatal action guard: guarding against inadvertent execution of code that may damage or destroy data in SQL Server
Row-level recovery
Recovering entire databases or even tables is not always the viable solution because any data changes, since the incident may be lost. By isolating specific transactions, ApexSQL Log can identify, isolate and repair data at the row level with surgical precision, leaving later changes untouched and avoiding any collateral data loss typically associated with a full and even object level restore.
- How to recover SQL Server data from accidental UPDATE and DELETE operations
- Recover deleted SQL data from transaction logs
- How to recover SQL Server data from accidental updates without backups
- SQL Server disaster recovery – How to quickly recover data lost due to an Inadvertent delete operation
Point in time recovery
Restore only the specific database tables back in time without affecting other tables which do not require a rollback with undo scripts created by ApexSQL Log which undo all specified operations as if they’ve never occurred.
- Reverting your SQL Server database back to a specific point in time
- Using SQL Server database snapshots to protect yourself against accidental data modification
SQL injection attacks
Quickly identify SQL injection attacks by identifying spikes in transactions or auditing for suspicious activity and pinpoint the exact areas which were affected or damaged and identify the exact data all the way to the row level that was changed. Create rollback scripts and reverse the changes made on the data to completely repair the damage caused by the incident.
- How to recover objects that are missing as a result of a SQL injection attack
- How to recover data that is missing or damaged as a result of a SQL injection attack
Testing
Load testing
ApexSQL Log can record the load on a production server for a particular period of time, persist that to disk, so it can be replayed on a staging server(s) to perfectly replicate the activity and transactional throughput.
This system can be integrated as part of a continuous integration process to replay the production load on a staging server each time it is rebuilt
- Load testing: Recording production transactions and replaying on a test server
- Using transactional data replication to replay and test production loads on a staging server
Replication
Transactional replication
ApexSQL Log can read all of the transactions on a Publisher database and write them directly to a Subscriber(s) or persist them to file, so they can be shipped and executed against a Subscriber(s) at a remote location.
ApexSQL Log can manage schema changes to keep the subscribers synchronized with the Publisher schema by replicating DDL transactions as well
- Hands free, no-coding SQL Server database replication of a reporting database
- How to setup SQL Server database replication for a reporting server
- How to set up a DDL and DML SQL Server database transactional replication solution
Peer to peer, bi-directional replication
As easily as ApexSQL Log can do uni-directional replication, it can replicate bi-directionally between peers as well. The uni-direction process is replicated for each peer, while filtering our transactions executed by ApexSQL Log itself, or if done remotely, by a user or machine designated to execute the changes
Reporting servers
Maintain a reporting version of production database by offloading performance intensive queries. Once the reporting database has been created and configured, it can be kept up to data with uni-directional replication from a Publisher database
Cross-platform replication
SQL Server still doesn’t support cross-platform replication on Linux but with ApexSQL Log, you won’t have to wait. Replicate from SQL Server on a Windows machine to Linux or any other combination
Consolidated reporting
Consolidated reporting servers allow for optimized performance of the reporting system by avoiding using linked servers or other means to conjoin the systems, frees up loads on the transactional databases and avoids having to provide access to all systems just for reporting users and allows for optimizing the reporting database for handling queries vs transactional loads
ApexSQL Log can be set up to create multiple publishers into a single Subscriber to consolidate data across disparate databases, to provide a single, centralized reporting database.
- Synchronizing databases using the transaction log – SQL Server Log shipping
- How to setup custom SQL Server transactional replication with a central publisher and multiple subscriber databases
Migrations and restores
No downtime/data loss migrations
Migration processes might take a while, especially when working with large databases or in performance intensive environments. If the production system is shut down during this period, it will create a maintenance window which may be unacceptable for system users. If production is shut down, it is bound that some transactions will be missing once the migration downtime ends. With ApexSQL Log those missing transactions can be read from the online transaction log file, at the exact point when the migration began, and replayed on the migrated database to ensure that no data was lost and eliminating the need for a maintenance window
Zero data loss restores
While database restore process restores the database to an exact point in time, it comes with one major flaw – any data or structure changes made after the database backup was created will be lost. ApexSQL Log comes to the rescue by capturing the missing transactions from the ongoing transaction log file and replaying them after the database restore job to ensure that no data (or structure) was lost due to the database restore task.
August 24, 2018