Posts

Showing posts from 2021

Detaching and Attaching a database in SQLSERVER

Image
  We do detach and attach a database to improve the Performance, to move the physical drive location of datafiles on the same server or to different server and due to space constraints. Steps to Detach and Attach a database: Step-1: Change the Restrict Access to Single mode Right click on database (devdb) -> Properties -> Options -> modify the Restrict Access to Single mode -> Ok Step-3: Right click on database (devdb) -> Tasks -> Detach -> select "Drop connections" and "Update Statistics" -> Ok Step-4: Move the datafiles and logfiles from old location to the new location from OS level  Old location: C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA New location: D:\Datafiles\devdb Step-5: Right click on Databases -> Attach -> select the datafile from new location. Step-6: Validate the database attached and the file locations. Manual Method using Script: Step-1: Locate the database file location sp_helpdb devdb Step-2...

Install SQL Server 2012 on Windows

Image
 Steps to install SQL Server 2012 on Windows

SQL Server TempDB Purpose and Importance of it

What is SQL Server TempDB and it's Purpose. SQL Server TempDB is a system database that is automatically created whenever you install the SQL Server on a machine and also it creates each time when you start the SQL Service. The Purpose of the SQL Server TempDB is, it used by the SQL Server and the database users for sorting operations and it's used to create Global or Local temporary tables, and Temporary stored procedures. Additionally, the TempDB can also be used to offload sorting from main database to TempDB while index creation using SORT_IN_TEMPDB to improve the performance. Important points to be remembered for TempDB: you can't drop it like normal database You can't back up and restore  You can't change it's recovery model  You can't create multiple file groups  You can't detach it like normal database Best practices about TempDB configuration: Should always keep both the datafile and logfile on a separate disk  Always place the files on the fast...

Docker for DevOps

Image
What is a Docker? It's a container management platform to develop, deploy and run your applications as a container.  It enables you to separate your application from infrastructure. It runs directly on the host machine's kernel. It is quick to deploy and easy to use in the real world. It's cross-platform software.  Two types of Versions: Community Edition (CE) - Open Source Enterprise Edition (EE) - Commercial What is a container? It's a runtime process of an image where our application process will be running.  Container contains all application code and required dependencies (like Software, Environment variables) to run the applications.  With the help of containers, we can carry the application from one machine to another without an additional configuration to create/deploy the application. Each and every container has it's own file system. What is required to host your applications? We need Infrastructures like  Physical Servers OR Virtual Machines --- Hardw...

AWS for DevOps

Image
AWS Services: EC2 - Elastic Compute Cloud EBS - Elastic Block Store EFS - Elastic File Store S3 - Simple Storage Service ELB AutoScaling VPC IAM EKS ECR AWS CLI Cloud Service Models: IaaS - Infrastructure as Service (Admins) Managed by Users: Applications Data Runtime Middleware O/S Managed by the Vendor/Service Provider: Virtualization Servers Storage Networking Example: EC2 PaaS -  Platform as a Service (Developers)  Managed by Users: Applications Data Managed by the Vendor/Service Provider: Runtime Middleware O/S Virtualization Servers Storage Networking Example: EKS (Elastic Kubernetes Service) SaaS- Software as a Service  Everything is managed by the Vendor, we just use the Softwares and pay based on the service. Managed by the Vendor/Service Provider: Applications Data Runtime Middleware O/S Virtualization Servers Storage Networking Example: Cloud Watch  AWS Global Infrastructure: i) Availability zones (Data Centers - Physical) ii) Geographical regions (It's...

Apache Tomcat

Application Servers i) JBoss or Wildfly  From 1.x to 7.x called JBoss and from 8.x called Wildfly ii) Tomcat iii) WAS (WebSphere Application Server) iv) Weblogic Tomcat Directory Structure  i) bin startup.sh startup.bat shutdown.sh shutdown.bat catalina.sh start/stop catalina.bat  version.sh version.bat ii) conf tomcat-users.xml server.xml iii)lib jar files iv)logs catalina.out v)webapps It stores 5 default applications. However, you can deploy any number of applications. vi)work After deploying the applications, it will store some application-related files which will use. vii)temp Temporary directory Tomcat Server installation  The pre-requisite is java to be installed download link for tomcat zip file https://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.41/bin/apache-tomcat-9.0.41.zip Step-1: Download and install java Step-2: Download and install tomcat  # wget https://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.41/bin/apache-tomcat-9.0.41....