Category Archives: SQL Server

Phil Factor @ SimpleTalk: Statistics in SQL: Pearson’s Correlation

Statistics in SQL: Pearson’s Correlation The series so far: Statistics in SQL: Pearson’s Correlation Statistics in SQL: Kendall’s Tau Rank Correlation Statistics in SQL: Simple Linear Regressions Statistics in SQL: The Kruskal–Wallis Test

Posted in Business Intelligence, SQL Server, System/DB Administration | Leave a comment

RedGate: VMWare monitoring in SQL Monitor

VMware monitoring in SQL Monitor  

Posted in SQL Server, System/DB Administration | Leave a comment

Database unit testing resources

Not strictly a linkdump, but a list of resources for database unit testing. tSQLt, SQLunit, DBunit, dbForge

Posted in Linkdump, Programming, SQL Server, System/DB Administration | Leave a comment

Linkdump: SQL Server security through ActiveDirectory Groups, ConnectionString encryption

I swear I have a post or linkdump on this. Log now, search later! Securing SQL Server using ActiveDirectory: https://www.mssqltips.com/sqlservertip/1831/using-windows-groups-for-sql-server-logins-as-a-best-practice/ https://serverfault.com/questions/457798/why-does-a-d-account-need-sql-server-login https://security.stackexchange.com/questions/98247/ad-user-vs-sql-user-for-sql-server-authentication https://dba.stackexchange.com/questions/12453/login-to-sql-server-using-windows-authentication Connection String encryption: https://msdn.microsoft.com/en-us/library/89211k9b(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx http://stackoverflow.com/questions/11637348/encrypt-connection-string-in-app-config https://msdn.microsoft.com/en-us/library/ff647398.aspx          

Posted in Linkdump, SQL Server, System/DB Administration | Leave a comment

SQL Server linkdump: Create login, Relocate database and best practices, corruption repairs

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=sql+server2016+create+new+login&* https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-login http://www.quackit.com/sql_server/sql_server_2014/tutorial/sql_server_user_logins.cfm https://www.supremainc.com/en/node/618   https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=moving+a+database+from+one+drive+to+another+detach+database&* http://dba.stackexchange.com/questions/52007/how-do-i-move-sql-server-database-files https://docs.microsoft.com/en-us/sql/relational-databases/databases/move-user-databases https://docs.microsoft.com/en-us/sql/relational-databases/databases/move-system-databases     https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=ozar+how+to+requisition+drives+for+sql+server&* SQL Server 2005 Setup Checklist Part 2: After The Install https://www.sqlskills.com/blogs/paul/multiple-log-files-and-why-theyre-bad/     When should you put data and logs on the same drive?   SAN Storage Best … Continue reading

Posted in Linkdump, SQL Server | Leave a comment

SQL Server: time zone adjustment that accounts for Daylight Saving Time changes

This pulls the calendar for Daylight Saving Time from the server. DECLARE @time_in DATETIME SET @time_in = GETDATE() — SET @time_in = ‘2016/10/15 09:20:00 pm’ DECLARE @timezone_adjustment INT SET @timezone_adjustment=DATEDIFF(hh,GETUTCDATE(),GETDATE()) DECLARE @time_string NVARCHAR(60) –Convert from stored UTC datetime to local. … Continue reading

Posted in Programming, SQL Server | Leave a comment

Linkdump: SQL Server authentication credentials, users, and logins

Google “best practice for sql server logins”: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=best%20practice%20for%20sql%20server%20logins Recommendations and Guidelines on Configuring the Authentication Mode for SQL Server https://support.microsoft.com/en-us/kb/2028697 Google “how to set up users and logins sql server”: https://www.google.com/search?q=how%20to%20set%20up%20users%20and%20logins%20sql%20server Best practice on users/roles on SQL Server for a web application http://stackoverflow.com/questions/1395278/best-practice-on-users-roles-on-sql-server-for-a-web-application   … Continue reading

Posted in Linkdump, SQL Server, System/DB Administration | Leave a comment

SQL Server trigger to detect who uses sa login

Note to self: Implement this during next upgrade. http://www.sqlfingers.com/2016/07/using-sql-server-logon-trigger.html

Posted in SQL Server, System/DB Administration | Leave a comment

SQL Injection cheat sheet

https://www.netsparker.com/blog/web-security/sql-injection-cheat-sheet/

Posted in SQL Server | Leave a comment

Save a null value to a GUID field using C# SqlParameter

sCommand.Parameters.Add(“@employee_id”, SqlDbType.UniqueIdentifier).Value = (processEmployee_id == String.Empty ? System.Data.SqlTypes.SqlGuid.Null : new Guid(processEmployee_id));   http://stackoverflow.com/questions/23556173/how-to-insert-a-null-value-to-guid-column-in-table-using-c  

Posted in C#, Programming, SQL Server | Leave a comment