Рубрика: SQL Server Tips
Date Range in SQL
While creating SQL queries for reports, it’s usually required to get a continuous list of dates for a given period. E.g.: get all dates from 1980 Jan 01 till 2013 Dec 31 (12419 records). In this post I would like to describe several ways how this can be done and…
Service Broker: add message to queue
In this post let’s dwell on adding messages to queues. In our system we prefer doing it inside triggers. Why triggers? There are several reasons: You cannot miss trigger event, whenever you perform update through web-service, or direct in the database. Trigger is always inside your transaction. Also you can…
Why Service Broker? + Service Broker customization
Service Broker (SB): first look
Job creation template
Not so long ago we have faced the following problem while implementing SQL jobs to test and production environment: Job is developed be developer by deployed to test or production by DBA. E-mail lists, folders are different on each environment. So the process was the following: developer come and together…
SCHEMABINDING – use or not to use
One developer from my team has made the following suggestion: why not to alter all views we have in ERP system with SCHEMABINDING option? His main argument was: this would help us to set additional control for changes in tables’ structures, thus increasing system stability. The idea was interesting, so…
Change data capture. Practice experience. Part 3
In this post I would like to finish my Change Data Capture practice. So I had not described the update of history table. All details about database structure can be found in the early post http://borisfrolov.com/2012/10/28/change-data-capture-practice-experience-part-2/. As I have told everything about architecture of the designed solution, in this post…
Query optimization. How it works – one optimization hour from my practice
Change data capture. Practice experience. Part 2
Continue speaking about Change data capture I would like to start from the detailed description of the tables with business data database structure. The structure looks like: Just few words about each table: ABSMainRate– for every change in users’ database cause new record in this table. REV – is the…
Date Range in SQL
While creating SQL queries for reports, it’s usually required to get a continuous list of dates for a given period. E.g.: get all dates from 1980 Jan 01 till 2013 Dec 31 (12419 records). In this post I would like to describe several ways how this can be done and…
Service Broker: add message to queue
In this post let’s dwell on adding messages to queues. In our system we prefer doing it inside triggers. Why triggers? There are several reasons: You cannot miss trigger event, whenever you perform update through web-service, or direct in the database. Trigger is always inside your transaction. Also you can…
Why Service Broker? + Service Broker customization
Service Broker (SB): first look
Job creation template
Not so long ago we have faced the following problem while implementing SQL jobs to test and production environment: Job is developed be developer by deployed to test or production by DBA. E-mail lists, folders are different on each environment. So the process was the following: developer come and together…
SCHEMABINDING – use or not to use
One developer from my team has made the following suggestion: why not to alter all views we have in ERP system with SCHEMABINDING option? His main argument was: this would help us to set additional control for changes in tables’ structures, thus increasing system stability. The idea was interesting, so…
Change data capture. Practice experience. Part 3
In this post I would like to finish my Change Data Capture practice. So I had not described the update of history table. All details about database structure can be found in the early post http://borisfrolov.com/2012/10/28/change-data-capture-practice-experience-part-2/. As I have told everything about architecture of the designed solution, in this post…
Query optimization. How it works – one optimization hour from my practice
Change data capture. Practice experience. Part 2
Continue speaking about Change data capture I would like to start from the detailed description of the tables with business data database structure. The structure looks like: Just few words about each table: ABSMainRate– for every change in users’ database cause new record in this table. REV – is the…