Skip to main content

Posts

SQL 2012 AlwaysOn: Configuring 2 Synchronous and 1 Asynchronous Replicas

To configure highly available and disaster resilient  databases with SQL 2012 AlwaysOn, 3 servers will be used as show below In the Primary Data Center SQLDEV1 and SQLDEV2 will host synchronous replica of the databases and in the Secondary Data Center on SQLDEV3 an asynchronous replica will reside. To enable AlwaysOn, SQL Server must be installed on a node in the Windows Failover Cluster (WFC) (how to install 3-Node WFC on Windows Server 2012  see  here  ). SQL 2012 needs .NET 3.5. So the first step is to add .NET Framework 3.5 on each of the three servers. The next step is to install SQL 2012 on each of the servers. Even if these servers are part of the WFC the stand-alone installation is required (this WFC has no shared storage and this won't allow you to install SQL failover cluster). When SQL 2012 is installed we need to enable AlwaysOn and Named Pipes. In SQL Server Configuration Manager right-click on the SQL Ser...

SQL 2012 AlwaysOn: Synchronous vs. Asynchronous commit. Performance impact

Recently I've had a chance to build a 3-server AlwaysOn environment distributed between the primary and secondary data centers. The configuration looks like this: Primary Data Center                         Secondary Data Center                        SQLDEV1                                        SQLDEV3          SQLDEV2 The availability group was crated with synchronous commit replicas on SQLDEV1 and SQLDEV2 and the replica on SQLDEV3 was configured for asynchronous commit. The link between the data centers was not great and when I pinged SQLDEV3 from SQLDEV1 I got these results Approximate round trip times in milli-seconds:     Minimum = 39ms, Maximum = 63ms, Average = 42ms I also created a very simp...

Create 3-Node Windows 2012 Multi-subnet Cluster

Environment There are two Data centers connected via a WAN link. Two Windows 2012 Servers (called SQLDEV1 and SQLDEV2) are located in the Primary Data Center (on the IP subnet 192.168.79.0/24) and the third server is placed in the Secondary Data Center with the 192.168.69.0/24 subnet. We’ll be creating a three-node Windows cluster with no shared storage on the multi subnet network with a file share witness at the Primary Data Center. We’ll be using a file share witness to protect from the cluster failure in a situation when the network between the Data Centers is unavailable and one of the servers in the Primary Data Center is also down (or being rebooted). The final state will look like depicted above: -           Two Virtual IP’s will be assigned (192.168.76.218 and 192.168.69.134) to the cluster -           The servers at the Primary Data Center will have a vote (Vote=1) and the ...

How to make Hyper-V image running under VirtualBox

VirtualBox allows you to run 64-bit guests on Windows 7 (64-bit, of course). When I attached a Hyper-V VHD to VM in VIrtualBox it failed to start with the error message A problem has been detected and windows has been shut down to prevent damage to your computer. If this is the first time you’ve seen this stop error screen, restart your computer. If this screen appears again, follow these steps: Check for viruses on your computer. Remove any newly installed hard drives or hard drive controllers. Check your hard drive to make sure it is properly configured and terminated. Run CHKDSK /F to check for hard drive corruption, and then restart your computer. Technical information: *** STOP: 0x0000007B (0x80786b58, 0xC0000034, 0x00000000, 0x00000000) Google quickly unveiled a solution in Olly's blog http://ollysense.blogspot.com/2010/05/virtualbox-using-hyper-v-vhd-image.html (if this link becomes unavailable then all you need to do is to configure your VHD disk to be on I...

Collect Server Information with WMIC (OS, Disks, Partitions, Software, etc.)

I had to create a new test environment and to make it a true representation of the production one I had to install all the service packs, hot fixes, cumulative updates, etc. as in production. So I decided to collect all essential information. And the simplest way (for me) was to use WMIC. To collect information about OS: WMIC OS GET BuildNumber, Caption, CSDVersion, CSName, OSArchitecture, OSLanguage, ServicePackMajorVersion, ServicePackMinorVersion, SystemDirectory, TotalVisibleMemorySize, Version, WindowsDirectory about all installed software (and be patient because it takes a couple of minutes to complete) WMIC PRODUCT GET Caption,Version About Windows domains WMIC NTDOMAIN GET Caption, ClientSiteName, DCSiteName, DnsForestName, DomainCOntrollerAddress, DomainControllerName, DOmainName about disks WMIC DISKDRIVE GET BytesPerSector, Name, SerialNumber, Signature,Size about partitions WMIC PARTITION GET BlockSize,Bootable,Name,Size,Star...

ETL for SharePoint

Microsoft has released on CodePlex a SharePoint adapter with demos ( http://sqlsrvintegrationsrv.codeplex.com/ ) The adapter uses public SharePoint Web services and have several features that enhance their performance and their ease of use: ·         -  Only the fields that you want are returned from SharePoint. ·         -  Large lists are not transferred all at once. They are paged in batches, with a configurable batch size. ·         -  Column type information from SharePoint is used for mapping to Integration Services data types ·         -  CAML queries can be added to the query to filter the rows to be returned. ·         -  Update and Delete operations from an Integration Services package are simple. ·         -  Important custom properties of the source and destination can be set by using Integration Services expressions. ·...

How to check if the SQL Server uses "Instant File Initialization"

 Data and log files are first initialized by filling the files with zeros when you perform one of the following operations: Create a database. Add files, log or data, to an existing database. Increase the size of an existing file (including autogrow operations). Restore a database or filegroup. File initialization causes these operations to take longer. However, when data is written to the files for the first time, the operating system does not have to fill the files with zeros. Instant file initialization is only available if the SQL Server (MSSQLSERVER) service account has been granted SE_MANAGE_VOLUME_NAME . This permission is granted by adding service account to the  Perform Volume Maintenance Tasks  security policy (in GPEDIT.MSC).  Instant file initialization is not available when TDE is enabled. To check if the SQL service account has this permission granted, run the following script: EXEC sp_configure 'Show Advanced Options', 1 reconfigure; EXE...