SQL SERVER – Unable to Start SQL When Service Account is Removed From Local Administrators Group. Why?

https://blog.sqlauthority.com/2017/07/12/sql-server-unable-start-sql-service-account-removed-local-administrators-group/ One of my clients wanted to secure their SQL Server. One of the rules was that wanted to avoid running SQL Server service with an account which is part of local “Administrators” group. They wanted to provide the minimal permissions needed for the SQL server service account for SQL Server to function. Below are […]

How to change the default MSSQL directory for database files?

https://support.plesk.com/hc/en-us/articles/115002175809-How-to-change-the-default-MSSQL-directory-for-database-files- QuestionThe default directory for storing database files of MS SQL is changed in SQL Management Studio > Database Settings > Database default locations to D:\MSSQL\DATA .However, new database files are being created and stored in %plesk_dir%\Databases\MSSQL\MSSQLXXX.MSSQLSERVER\MSSQL\DATAanyway.How to change the default directory for MS SQL?How to move SQL databases to other disk drive?AnswerBy default, the location for new databases in SQL […]

Check MSSQL status

CREATE TABLE #sp_who2 (SPID INT,Status VARCHAR(255),      Login  VARCHAR(255),HostName  VARCHAR(255),       BlkBy  VARCHAR(255),DBName  VARCHAR(255),       Command VARCHAR(255),CPUTime INT,       DiskIO INT,LastBatch VARCHAR(255),       ProgramName VARCHAR(255),SPID2 INT,       REQUESTID INT) INSERT INTO #sp_who2 EXEC sp_who2SELECT      * FROM        #sp_who2— Add any filtering of the results here :WHERE       DBName <> ‘master’— Add any sorting of the results here :ORDER BY    DBName ASC DROP TABLE #sp_who2 Source: https://www.sqlmatters.com/Articles/sp_who2%20-%20filtering%20and%20sorting%20the%20results.aspx

Quickstart: Install SQL Server and create a database on Ubuntu

https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017 Install SQL Server To configure SQL Server on Ubuntu, run the following commands in a terminal to install the mssql-server package. Important If you have previously installed a CTP or RC release of SQL Server 2017, you must first remove the old repository before registering one of the GA repositories. For more information, see Change repositories from […]

MSQL backup on linux

/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q “BACKUP DATABASE [MYDATABASE_DEV] TO DISK = N’/var/opt/mssql/data/MYDATABASE-20180615.bak’ WITH NOFORMAT, NOINIT, NAME = ‘MYDATABASE_STD50_DEV’, SKIP, NOREWIND, NOUNLOAD, STATS = 10”

MSQL on linux : Fix locale::facet::_S_create_c_locale name not valid

https://github.com/Microsoft/mssql-docker/issues/163 https://github.com/Creepsky/creepMiner/issues/122 First, this report is not just about issue with mssql-docker but I suspect it is related to about mssql-tools for Linux in general, more specifically the sqlcmd. (Not sure where would be better and more accessible by others place to report it.) I run docker container based on ubuntu:latest image and I install the mssql-tools in order to be able […]

MSQL Pssdiag/Sqldiag Manager

https://blogs.msdn.microsoft.com/sqlcat/2017/08/11/collecting-performance-data-with-pssdiag-for-sql-server-on-linux/ https://github.com/Microsoft/DiagManager https://github.com/Microsoft/DiagManager/tree/master/LinuxPSSDiag What is Pssdiag/Sqldiag Manager? Pssdiag/Sqldiag Manager is a graphic interface that provides customization capabilities to collect data for SQL Server using sqldiag collector engine. The data collected can be used by SQL Nexus tool which help you troubleshoot SQL Server performance problems. This is the same tool Microsoft SQL Server support engineers use to […]

Using some best practices for SQL Server in Azure VM (IaaS) to get MAX performance

https://sqlwithmanoj.com/2016/06/30/using-some-best-practices-for-sql-server-in-azure-vm-iaas-to-get-max-performance/ I was setting up an environment on Azure Premium Storage (G-Series) server for my Project, and was not getting the performance I was expecting. The comparison was against an existing Database Server setup on an On-Premise VM. Microsoft Azure Premium Storage delivers high-performance, low-latency disk support for VMs running I/O-intensive workloads. Uses SSD (Solid State Drives) to store your data and Caching capability to provides highest throughput […]