SQL Server Internal Versions SQL Server Versions Database Internal Versions and Compatibility Levels Useful Query SELECT SERVERPROPERTY(‘ServerName’) ‘ServerName’ , @@VERSION ‘@@version’ , SERVERPROPERTY(‘ComputerNamePhysicalNetBIOS’) ‘ComputerNamePhysicalNetBIOS’ , SERVERPROPERTY(‘MachineName’) ‘MachineName’ , SERVERPROPERTY(‘InstanceName’) ‘InstanceName’ , SERVERPROPERTY(‘IsClustered’) ‘IsClustered’ , SERVERPROPERTY(‘BuildClrVersion’) ‘BuildClrVersion’ , SERVERPROPERTY(‘Collation’) ‘Collation’ , SERVERPROPERTY(‘CollationID’) ‘CollationID’ , SERVERPROPERTY(‘ComparisonStyle’) ‘ComparisonStyle’ …
Remove Procedure Cache and Reset Wait Stats
Remove Procedure Cache and Reset Wait Stats Remove all elements from the plan cache for the entire sql server instance DBCC FREEPROCCACHE; Flush the cache and suppress the regular completion message DBCC FREEPROCCACHE WITH NO_INFOMSGS; Remove all elements from the plan cache for a specific …
Common Sense RDBMS Patterns
Common Sense Relational and Development Patterns : RDBMS_Best_Practices Great Articles on SQL Magazine Talk: SQL Magazine Best Practices Part One SQL Magazine Best Practices Part Two RBAR – If you are a relational database professional, you know RBAR ( Row By Agonizing Row ) is …
LAMP Stack Setup on El Capitan
Very Good article on Setting up LAMP Stack on El Capitan: http://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/ On OS X Yosemite/El Capitan to start/stop/restart MySQL post 5.7 from the command line: sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
Multi-Tenant Configurations
Multi-Tenant Configurations: I have worked at multi-tenant environment and some of the things worked well in supporting multi tenant environment are listed here. These are based on my personal experiences. I have seen close to flawless design and execution as well as pretty bad design and …
Configurations : Web Config or Database?
Configurations : Web Config or Database? Web Config: Database Connection Strings. OfCourse. You can’t connect without that details. Changes you want trigger Application Pool refresh. Things need to be available when the database is unavailable. (such as a list of email addresses and an smtp …
SQL Server System Info
SQL Server System Info This script provides SQL Server instance level configurations. GitHub Gist : https://gist.github.com/I90Runner/7bc31a10897a2168816073db781d5e77 /****************************************************************************************************** ** Project: Operations ** Issue: Gather SQL Server System Information ** ShortDesc: Gather SQL Server System Information. These commands usually gets executed by SQL Server during startup ** …
SQL Server :Transfer Logins from One Instance to Another Instance
Transfer Logins from One Instance to Another Instance — Login: sampleuser CREATE LOGIN [sampleuser] WITH PASSWORD = 0x02000F2A96350B8D3 HASHED, SID = 0xB30C7C1721D970A4WE34343A434A433A43AW43A453Q49A276CE0E, DEFAULT_DATABASE = [master], CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF USE master GO IF OBJECT_ID (‘sp_hexadecimal’) IS NOT NULL DROP PROCEDURE sp_hexadecimal GO CREATE …
SQL Server AlwaysOn Availability Groups
SQL Server Always on Availability Related Queries: How do I switch Primary / Secondary on Switch Always on Availability Groups ( Swap Primary / Secondary ): When the automatic failover is setup , the Primary / Secondary gets swapped during maintenance tasks. To swap back …
AWS Solution Architect Preparation
AWS Solution Architect Reference Materials Load Balancing : https://aws.amazon.com/documentation/elastic-load-balancing/ Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances. It enables you to achieve greater levels of fault tolerance in your applications, seamlessly providing the required amount of load balancing capacity needed to …