SQL Server

SQLCMD Basics

Example Usage: sqlcmd -S ComputerName\InstanceName -i MyScript.sql -o MyOutput.csv -t 1000 -W -s "," -X1 sqlcmd -S localhost\sqlsrv2012 -d AdventureWorks2012 -i C:\DataFiles\EmployeeQuery.sql -o C:\DataFiles\Employees.csv -t 1000 -W -s "," -X1 sqlcmd -S localhost\sqlsrv2012 -d AdventureWorks2012 -Q "SELECT FirstName, LastName FROM…

Instant File Initialization via Powershell

I modified the script from http://blog.karstein-consulting.com/ to change “Perform Volume Maintenance tasks”.  This allows the scripted setup of instant file initialization for SQL Server.  Instant File Initialization allows SQL Server data files to grow very quickly because SQL Server does not have…

Install R On Windows and Connect to SQL Server

R Install Steps: R Project Official Site  http://www.r-project.org/ R Project windows installer http://cran.at.r-project.org/ R Tools (Download rtools31.exe) http://cran.r-project.org/bin/windows/Rtools/ Install normally After R is installed and rtools install the devtools R Install Command “install.packages(“devtools”)” Prerequisite for rclr (Visual C++ Redistributable for Visual Studio…

Partition Alignment for SQL Server or Exchange

How to check partition alignment quickly is below. File allocation size and the partition offset have to both be correct for any performance gain.  If one of these are incorrect then you can increase your disk performance by fixing the…

%d bloggers like this: