SQL Server Auditing

Auditing the SQL Server is a major task for the DBA as well as for the developers. Developers and DBA should be regularly monitoring the changes done in the database where the key transactions have been made.

SQL Server provides various types of Audit 

Database Level

To implement the Audit at the database level, the system provides a function of SQL Server Audit. This helps  auditing an instance of the SQL Server Database Engine or an individual database involves tracking and logging events that occur on the Database Engine

Table Level

To Implement the audit at the Table Data level, there are two major mechanism
a. Change Data Capture
b. Change Tracking

The tracking mechanism in change data capture involves an asynchronous capture of changes from the transaction log so that changes are available after the DML operation. In change tracking, the tracking mechanism involves synchronous tracking of changes in line with DML operations so that change information is available immediately. The major difference is change tracking doesn't hold the history of the data. 

For more details click here






SIMPLIFY YOUR AUTOMATED TEST CASES

Maintaining test automation can take a lot of time.  I have seen automation engineers creating test cases that are very long and that don’t have a clear purpose. If their test cases were more streamlined and focused, the teams that use them would save a lot of time.

Lets discuss how we can simplify those

1. Decrease your scope

2. Single Responsibility

3. Identify the simplest thing you can automate

4. Avoid unnecessary dependencies

and to summarise, Keep it simple, stupid

Angular - HttpClient

The browsers support two different APIs for making HTTP requests:
1. XMLHttpRequest interface
2. fetch() API

Angular 4.3 introduced a new HttpClient service, which is a replacement for the Http service from Angular 2.

The HttpClient in @angular/common/http offers a simplified client HTTP API for Angular applications that rests on the XMLHttpRequest interface exposed by browsers. Additional benefits of HttpClient include testability features, typed request and response objects, request and response interception, Observable apis, and streamlined error handling.

Setup

Before you can use the HttpClient, you need to import the Angular HttpClientModule.

import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpClientModule } from '@angular/common/http'; @NgModule({ imports: [ BrowserModule, HttpClientModule, ], declarations: [ AppComponent, ], bootstrap: [ AppComponent ] }) export class AppModule {}



Having imported HttpClientModule into the AppModule, you can inject the HttpClient into an application class as shown in the following ServiceClient example.


import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable() export class ServiceClient { constructor(private http: HttpClient) { } }


The ServiceClient fetches this file with a get() method on HttpClient.


srvUrl = 'srv/srv.json'; getConfig() { return this.http.get(this.srvUrl); }