Posts

Showing posts with the label SQL

Configure a Windows Firewall for Database Engine Access SQL Server Port

This topic describes how to configure a Windows firewall for Database Engine access in SQL Server 2016 by using SQL Server Configuration Manager. Firewall systems help prevent unauthorized access to computer resources. To access an instance of the SQL Server Database Engine through a firewall, you must configure the firewall on the computer running SQL Server to allow access. For more information about the default Windows firewall settings, and a description of the TCP ports that affect the Database Engine, Analysis Services, Reporting Services, and Integration Services, see  Configure the Windows Firewall to Allow SQL Server Access . There are many firewall systems available. For information specific to your system, see the firewall documentation. The principal steps to allow access are: Configure the Database Engine to use a specific TCP/IP port. The default instance of the Database Engine uses port 1433, but that can be changed. The port used by the Database Engine is liste

This SQLServer instance does not have the required "max degree of parallelism" setting of 1

Image
I have got this error while trying to install SharePoint 2013 What is Max Degree of Parallelism ? When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number of processors employed to run a single statement, for each parallel plan execution. You can use the  max degree of parallelism  option to limit the number of processors to use in parallel plan execution. SQL Server considers parallel execution plans for queries, index data definition language (DDL) operations, and static and keyset-driven cursor population. Read this for more details http://technet.microsoft.com/en-us/library/ms189094.aspx How to fix it ? Open Microsoft SQL Server Management Studio Login with sysadmin user Right Click on instance name and select properties >> Advanced Change  Max Degree of Parallelism  to 1 Restart the SQL Service

Migrate SharePoint Databases

To Migrate SharePoint DBs from SQL Server to another either same version or to a new version (2008 to 2008 or 2008 to 2012) you can follow the following steps: Stop all SharePoint and IIS Related Services. Stop IIS. Detach all related SQL Server databases. Configuration database Central Administration content database Content databases Service application databases   Move all database files (.mdf, .ldf, and .ndf) to the new server. Set up same user permissions on the new SQL server. Attach your databases to the new SQL Server. Verify ports in your new SQL server. Go to your SharePoint server and create your SQL Server Alias. Start all your SharePoint services.

Improving SharePoint performance using SQL Server settings

SharePoint performance is a recursive problem and preoccupation. As a Database Administrator, we have to deal with SharePoint when configuring SQL Server databases. In this article, I will propose a list of best practices in SQL Server settings aimed to reduce SharePoint performance issues. Autogrowth Do not keep the default value which is 1 MB. We can illustrate with a simple example why this is a bad idea. When a document of 5 MB is uploaded, it means there are 5 Autogrowth which are activated. In fact, there are 5 allocations of space which must slow your system. Moreover, your uploaded document will be fragmented across your different data files. This configuration will decrease your performance a second time. To avoid performance issues and reduce fragmented data files, you should set the autogrowth value to a fixed number of megabytes. My recommendation is 1024 MB for data files and 256 MB for log files. But keep in mind, this is a global recommendation. In f

Install & Configure SharePoint 2013 with SQL Client Alias

Image
* Though this topic is very simple and highly recommended approach in the enterprise deployments, I have seen many deployments which are not following this approach. E.g.: Using SQL client alias for SharePoint installations will be really useful if you want  move all databases to another SQL Server  by just making alias change point to the new SQL server. * In this post I’m going to cover how we can install & configure SharePoint 2013 Preview with SQL Client Alias. Though this post is talking about SharePoint 2013 preview, the underlying concept will be same for SharePoint 2010 & SharePoint 2013 RTM. * In my test lab, I have total four virtual machines configured. This post is based on a SharePoint small server farm for setup and proof of concept. I will refer to this same environment in my future blog posts, there will be more servers adding to the existing server farm. litdc  : is the domain controller and AD server (domain : litware.local), this machine is inst

Configuring SQL Server client aliases

If you block UDP port 1434 or TCP port 1433 on the computer that is running SQL Server, you must create a SQL Server client alias on all other computers in the server farm. You can use SQL Server client components to create a SQL Server client alias for computers that connect to SQL Server. To configure a SQL Server client alias 1. Verify that the user account that is performing this procedure is a member of either the sysadmin or the serveradmin fixed server role. 2. Run Setup for SQL Server on the target computer, and install the following client components:  Connectivity Components  Management Tools 3. Open SQL Server Configuration Manager. 4. In the navigation pane, click SQL Native Client Configuration . 5. In the main window under Items, right-click Aliases , and select New Alias . 6. In the Alias - New dialog box, in the Alias Name field, enter a name for the alias. For example, enter SharePoint_alias. 7. In the Port No field, enter the port number fo

Configure SQL Mirroring

Image
There are 3 different types of SQL Mirroring options available for use: 1. High Performance – Asynchronous (this requires the Enterprise Edition) 2. High Safety without Automatic Failover 3. High Safety with Automatic Failover (this requires a witness server running the same SQL version) All three require roughly the same steps: * Ensure the same login accounts are present on the Principal and the Mirror * Backup the Principal DB and Logs * Restore on the Mirror * Configure the Mirroring Endpoints * Set the partner on the Mirror * Set the partner on the Principal (and the witness if necessary) So lets work through the steps above…… Get our login’s in order To get our accounts in order between our two servers we can run the following SQL script to give us an output to run on our mirror. SELECT ‘create login [‘ + p.name + ‘] ‘ + case when p.type in(‘U’,’G’) then ‘from windows ‘ else ” end + ‘with ‘ + case when p.type = ‘S’ then ‘password = ‘ + master.sys.fn_varbintohe