Posts

Showing posts from July, 2024

Moving Database Files SQL Server

Image
Move Database Files to Different Location on Disks On this part I'm going to show you how to move database files from one location to another location on the server disks. Bear in mind that this will need downtime for the database, so you need to make sure that there is no activity going on inside the SQL Server to the database. Also you need to make sure the new disk drives have enough spaces to store data files and log files with also in consideration of the files' growth.

Troubleshoot SQL Server Connection

Image
Cannot Connect to SQL Server Sometimes after you install/setup SQL Server and trying to connect to the server you might face this problem: A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. This is a very common problem that often occurs and it is related to the user trying to connect to the SQL Server but cannot find the server or it is not accessible from the user's current connection. So on this docs I will show you how to troubleshoot this problem: 1. Check the Instance Name or IP Address Before we proceed further, make sure that you typed the correct SQL Server instance name or IP Address which you are trying to connect to. If it's a typo then everything should just be fine after you input the right name or IP Address 2. Check SQL Server Protocol and Port Go to the Server which host the SQL Server instance, and then go to SQL Server Configuration Manager. Make sure the protocol

Setup SQL Server Database Log Shipping

Image
In this part I will show you guide to setup SQL Server Database Log Shipping. SQL Server Log shipping allows you to automatically send transaction log backups from a primary database on a primary server instance to secondary databases on separate secondary server instances. The transaction log backups are applied to each of the secondary databases individually. An optional third server instance, known as the monitor server, records the history and status of backup and restore operations and, optionally, raises alerts if these operations fail to occur as scheduled. SQL Server Log Shipping consists of some jobs, so you must enable SQL Server Agent Jobs: backup job: A SQL Server Agent job that performs the backup operation, logs history to the local server and the monitor server, and deletes old backup files and history information. When log shipping is enabled, the job category "Log Shipping Backup" is created on the primary server instance. copy job: A SQL Server Agent job tha

Setting Up SQL Server Failover Cluster Instance (SQL FCI)

Image
SQL Server Failover Cluster Instance (FCI) On this guide, I will show you how to setup a SQL Server Failover Cluster Instance or mostly called SQL Server FCI. It is a bit different than SQL Server AlwaysOn Availability Group where we can have primary node (owner node) and secondary node but the SQL Server itself is actually treated as a single Instance using Shared Cluster Disk.  Notes: This guide will use VMWare on my local computer for testing purpose only The requirements for setting up SQL Server Failover Cluster Instance are these: - Primary node and Secondary node for hosting SQL FCI joined to Active Directory - Windows Server Failover Cluster (WSFC) configured for all nodes - Shared Cluster disk for the Cluster which will be used for SQL FCI - Network Name for the SQL Server name in Active Directory - An IP Address for SQL FCI For configuring and installing SQL Primary node and Secondary Node, also with configuring and installing WSFC you can follow the guide which I previously