Wednesday, September 2, 2020

Version control

 GitIgnore

Source Control Bindings


SDLC, DevOps: Delivering a Database : State based vs Migration based

 For database development and deployment there are primarily 2 delivery mechanisms — State based and Migration based approach.


State Based Approach


In State based database delivery, you will need to store a snapshot of the current state of the database in your source control. Every table, stored procedure, view, trigger will be saved as separate sql files which will be the real representation of the state of your database objects.


The most important thing to note is that in State based approach the system of truth is the Source Code itself. Application developers would love this because it is very similar to making changes to your class files, compile and build it. Another good thing is that you do not have to deal with ALTER scripts with State based approach 



Migration Based Approach


In Migration Based Database Delivery, when you start working on a project you capture the current state of the database in a single migration script stored inside source control and that becomes the base/initial state.


As the project evolves over time, you will need to make changes to your database schema and reference data. On every instance, you will need to create a migration script with an incremental version number. If you want to determine the current state of your database or recreate the database in another environment, you will need to run all the migration scripts in the correct order.

The system of truth in Migration based approach is the Database itself. This approach provides more fine grain control on your scripts if you have to deal with data intensive operations and TSQL querying. You have the authority to review the scripts which gets executed against your destination database and modify as required.



Hardware: Laptop unresponsive , hard reboot Event Log

 



The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.


The previous system shutdown at 11:00:55 AM on ‎9/‎2/‎2020 was unexpected.


This is the first Event Log for a reboot:



- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Microsoft-Windows-Kernel-General" Guid="{a68ca8b7-004f-d7b6-a698-07e2de0f1f5d}" />
  <EventID>12</EventID>
  <Version>0</Version>
  <Level>4</Level>
  <Task>1</Task>
  <Opcode>0</Opcode>
  <Keywords>0x8000000000000080</Keywords>
  <TimeCreated SystemTime="2020-09-02T18:16:26.981876100Z" />
  <EventRecordID>15653</EventRecordID>
  <Correlation />
  <Execution ProcessID="4" ThreadID="8" />
  <Channel>System</Channel>
  <Computer>LAPTOPxxxxxxxxxxxx</Computer>
  <Security UserID="S-1-5-18" />
  </System>
- <EventData>
  <Data Name="MajorVersion">10</Data>
  <Data Name="MinorVersion">0</Data>
  <Data Name="BuildVersion">18363</Data>
  <Data Name="QfeVersion">1016</Data>
  <Data Name="ServiceVersion">0</Data>
  <Data Name="BootMode">0</Data>
  <Data Name="StartTime">2020-09-02T18:16:26.500000000Z</Data>
  </EventData>
  </Event>