One fine day, I was given a project to deploy a failover cluster on Windows server 2012. I did all the usual steps. Enabled failover clustering feature, Validated and created the Windows cluster. But unfortunately, when I click on the cluster name or any group or resource in the Failover Cluster Manager GUI, below popup shoots out and the cluadmin.msc stops responding. Continue reading “Failover Cluster Manager (cluadmin.msc) GUI crashes in Windows Server 2012”
Normally until Windows Server 2008, we use to have the .net Framework available to enabled from Server features section in Server manager. We just have to enable the feature to install .net FW 3.5.
Here we ran into a situation where we had to install SQL Server 2014 on a Windows 2012 Server. .net Framework 3.5 was required for SQL 2014 and Windows 2012 didn’t have that by default. Also, unlike SQL Server 2008 or 2012, 2014 setup doesn’t install it by itself. It just say’s that it needs to be installed manually. We tried to enable the feature via Server manager, but it fails saying the source files doesn’t exist.
Below is how we finally managed to install .net 3.5.
- There is a folder named sxs in Windows Server 2012 / 2012R2 Install Disk. We extracted the sxs folder from a disk image and copied them over to C:\Softwares\Source\sxs folder on the target 2012 windows server.
- Open a powershell prompt and execute below command. It would take few minutes to complete and you now have .net Framework 3.5 on your Windows Server 2012.
Install-WindowsFeature Net-FrameWork-core -Source C:\Softwares\Source\sxs
Final: Question 1
Problems 1 through 3 are an exercise in running mongod’s, replica sets, and an exercise in testing of replica set rollbacks, which can occur when a former primary rejoins a set after it has previously had a failure.
Start a 3 member replica set (with default options for each member, all are peers). (a.sh will start the mongod’s for you if you like.)
$ # if on unix:
$ chmod +x a.sh
You will need to initiate the replica set yourself.
Hey. Its not just me. Even Microsoft makes spelling mistakes in their softwares… Just found below in an error window from SQL Server 2012 Enterprise edition. The mistake is highlighted in yellow. 🙂
We have heard enough of the new feature in SQL Server 2012 that replaces our conventional Database Mirroring notion. It is the Always-on Availability groups feature. I have carried out several tests setting up Always-on on my virtual data-center in my laptop. One fine day at office, I was assigned a project to build an Always-on availability group in Microsoft Azure.
Let’s first go through the prerequisites.
- Availability group replicas must reside in a single Cloud service.
- Availability group Listener IP should be same as the public Cloud service IP assigned to each replica.
- Two endpoints has to be created for the Cloud Service in Azure dashboard. One for the probe port(Through which the Azure Load Balancing services monitors the health of each virtual machine) and one for Always-on Listener port. Probe port should be different from the Listener port. For eg. Give 59999 for Probe port and 1433 for the always-on listener port.
- Install the hotfix 2854082 to enable SQL Server Availability Group Listeners on Windows Server 2008 R2 and Windows Server 2012-based Microsoft Azure virtual machines.
Limitations in Azure:
- Each virtual machine in Azure could have only one Ethernet card and one private IP. This limitation stops us from using a private IP for Always-on availability group. Even if we give a private IP for the listener, the IP will not ping or connect over the network.
- The client application must reside on a different cloud service than the one that contains your availability group VMs. Azure does not support direct server return with client and server in the same cloud service.
- Only one availability group listener is supported per cloud service because the listener is configured to use the cloud service IP address.
- If you are creating a listener for a hybrid environment, the on-premises network must have connectivity to the public Internet in addition to the site-to-site VPN with the Azure virtual network. When in the Azure subnet, the availability group listener is reachable only by the public IP address of the respective cloud service. Ref: http://msdn.microsoft.com/en-us/library/dn425027.aspx
I went ahead and started working on it. I asked for 4 virtual servers.
Continue reading “SQL Server 2012 / 2014 Always-on in Microsoft Windows Azure”
There are several ways to configure and start monitoring page splits on SQL Server. But now in 2012, we could make use of extended events to easily track down page splits.
If you do not want to go through the session wizard, I am sharing the script with which you could create the session in one go.
CREATE EVENT SESSION [SherPageSplit] ON SERVER
ADD EVENT sqlserver.page_split(ACTION(sqlserver.client_hostname,sqlserver.client_pid,sqlserver.context_info,sqlserver.database_id,sqlserver.database_name,sqlserver.nt_username,sqlserver.plan_handle,sqlserver.session_id,sqlserver.sql_text,sqlserver.username))
ADD TARGET package0.event_file(SET filename=N'M:\Program Files\Microsoft SQL Server\MSSQL11.INST01\MSSQL\Log\SherPageSplit.xel',max_file_size=(100),max_rollover_files=(3))
WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF)
I am happy to announce the launch of my webApp+androidApp+desktopApp software www.splitexpense.in. It’s a free tool for anyone or friends and roommates to share and split expenses. At the end of the trip, day, week or month, SplitExpense.in would calculate all your expenses and would suggest who owes whom.
Subscribe to https://www.facebook.com/splitexpense to know more on the product, receive updates, news and release updates.
The url when opened on your smartphone(Android, IOS or Windows), opens as webapp with intuitive interface.
Below article on replication was written by my colleague Nideesh K Vasudevan. I would like to thank him for his easy to understand input on this topic.
There were lot of requirements in replication to add new article with out
running snapshot. Some article explained ‘how to include only the newly
added article in the snapshot with out generating snapshot of all the
All my play only with different publication properties gave me failed
output but a test to also play with subscription property worked!!!!!!!!!!
3 properties that we need to consider are 1) Immediate_Sync
2)allow_Anonymous in the publication properties and important one is 3)
@Sync_Type in subscription properties.
Immediate_Sync and allow_anonymous publication properties
1) The above 2 values do not determine if a snapshot is needed for a new
article, but it determines if snapshot need to be generated for all the
article or only for new article.
2) If both the above options are enabled/true and when we generate a
snapshot after adding new articles, the snapshot will be generated for all
the articles (new article+old article).
3) If both the above options are disable/false and when we generate a
snapshot after adding new articles, the snapshot will be generated only for
newly created article. (only for new article)
@Sync_type – Subscription property
1) The above option determines if a snapshot needs to be generated for
newly added article.
2) If the value of @Sync_type is set to ‘none’ or ‘Replication support
only’ then its enough we just create table structure on both publisher and
subscriber and enable the new table in the publication. When the new data
comes in, it will get replicated automatically.
No snapshot is needed in this case and the application is working with the
above option (@Sync_type=’Replication support only’). Hence adding new
article by creating table structure on publication and subscription got
replicated with this option enabled.
3) If the @sync_type option is set to automatic then for sure we need a
snapshot for newly added article. – Immediate_sync option determines if
snapshot need to be generated for all article or only new article.
this link to see about @sync_type option.
This tip would help you retrieve the list of users currently logged on to a remote windows server and disconnect any user if required.
To see the list of user sessions on a remote windows server, use either of the below queries.
“query session /SERVER:<servername or IP Address>”
“qwinsta /SERVER:<servername or IP Address>”
To terminate a session, note down the session ID from the output obtained from above commands. Execute below commands to terminate a session.
- “net user /user:<Administrator login> \\<servername or IP Address>\C$” . Enter password when prompted.
- Execute “reset session <ID> /SERVER:<servername or IP Address>” or use the command “rwinsta <ID> /SERVER:<servername or IP Address>”
- What are differences between a latch and a lock?
- What are the different states of an spid in SQL Server? Explain each state.
- What are workers in a SQL Server?
- How to reduce network usage by a query?
- Explain SOS_Scheduler_Yield wait type.
- What are CXPACKET waits? how to avoid that?
- Difference between a VAS and buffer pool?
- What are the different components of a SQL Engine? Explain how a SQL query is processed by SQL Server (Query lifecycle)?
- What are the different components of an RDBMS Engine?
- What are primitive and non-primitive way of DBMS functioning? In which type does the SQL server belong to?
- What are Memory Clerks?
- Explain SQLOS.