Posts

Showing posts from 2021

SQL Server | Designing New Databases

Image
"The desire to create is one of the deepest yearnings of the human soul."  -- Dieter F. Uchtdorf   Before we jump into the designing part, lets take a quick look at how the SQL Server databases are formed. Database Files Ever database has one Primary data file, which by default has an .MDF extension. In addition, ever database can also have secondary database files, which have .NDF extension.   All database files are grouped into FileGroups. FileGroup is a logical unit that simplifies database administration.  Imagine houses in an area. We recognize each house with it's own number but we also include a lot og groups in the address. Sector is a Filegroup. Pin-code is a Filegroup. This is how it looks like in database. There are 5 disks with 4 data files and 1 transaction log file. You can add multiple data files inside a filegroup. This lets you spread the load across different storage drives. This could help you improve I/O performance. Filegroup1 - green - contains ...

SQL Server | Planning an Installation

Image
“By failing to prepare, you are preparing to fail.”   ― Benjamin Franklin, Founding Father of the United States   Planning is usually the difference between a smooth road managing the SQL Server & a rocky one. Things to consider: Installation Requirements Selecting the features Scale up Capacity Planning Designing databases Security Core mode installation Bench-marking tools Installation Requirements This steps is all about information gathering. Let's identify all necessary components Evaluate Installation SQL components to install SQL Server Edition Operating System Virtualization Target Hardware     Scale-Up and Scale-Out Gone are the days when someone could predict the Max database size, etc in an early discussion meeting. Ideally you want your business to grow and that means more and more data. You design should consider that possibility. Assuming your database is hosted on a VM, it should have access to Ram, Processor and Storage so you can Scale the syste...

TSQL | CASE Expressions

Image
“If you are faced with a mountain, you have several options. You can climb it and cross to the other side. You can go around it. You can dig under it. You can fly over it. You can blow it up. You can ignore it and pretend it’s not there. You can turn around and go back the way you came. Or you can stay on the mountain and make it your home.” Vera Nazarian, The Perpetual Calendar of Inspiration  

SQL SERVER | Pick a Career

Image
  “First, solve the problem. Then, write the code.”  – John Johnson   Pick a Career: The SQL way by Database with Fun Database Administrator or DBA. SQL Server DBA to be exact. It's generally divided into 3 categories: Prod DBA Dev DBA BI DBA   Production DBA is responsible for handling the instance, server administration including database maintenance, backups, sql jobs, security, installation, etc. Dev DBA is are usually more project specific and are responsible for writing the T-SQL business logic for various applications and projects. BI DBA are responsible for handling the SSRS (reporting capabilities), SSIS (ETL - Extract Transform Load tasks), SSAS (data mining capabilities). Learn SQL SQL or T-SQL (Transact SQL) to be exact, is a MUST. If you love coding, then choose the Dev DBA path. If you don't like coding, you can pick the Prod or Infra DBA path. FYI, a little bit of understanding of how T-SQL works is essential for the best results in any of the paths. F...