casinos

Posts Tagged ‘Technology’

SQL Server AlwaysOn–SQL 2014 Readable Secondary changes March 20th, 2014

Vinod Kumar

This is in continuation to the post around SQL Server AlwaysOn-Readable Secondary Setting which I posted earlier. With every new release there are multiple enhancements and I know by the time we published our book on AlwaysOn many of these features were not quite available and we missed writing about them.

One of the main addition with SQL Server 2014 for AlwaysOn is the capability to have 8 secondary replica. This is has been discussed exclusively in the book and the number of synchronous nodes etc remain as in SQL Server 2012. Nothing much changes. It is important to understand that commits don’t wait for async replica’s hardening, so there will be not much of an impact wrt to deployments are concerned.

Enhanced Readable Secondary with SQL Server 2014

So what are the new scenario’s that we are talking about from a readability point of view? In SQL Server 2012, when the availability on the secondary databases was either NOT SYNCHRONIZED (Data movement SUSPENDED) or in RESOLVING state we were not able to connect to the secondary node for ReadOnly workloads.

Scenario 1: In SQL Server 2012 if we take the Availability group to Offline mode, the secondary databases get into a RESOLVING state and we get the following error:

Unable to access database ‘AdventureWorks2012′ because its replica role is RESOLVING which does not allow connections. Try the operation again later. (Microsoft SQL Server, Error: 983)

From SQL Server 2014, existing connections made to the secondary replica directly can still be served and new connections will also be allowed.

Scenario 2: In SQL Server 2012, if data movement gets suspended, the availability database gets into a NOT SYNCHRONIZED state. In such scenarios the connections are refused and we get the following error:

The target database, ‘AdventureWorks2012′, is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group.

Or we might get a read access error on the secondary. Either way, with SQL Server 2014, this is no longer a problem as read directly to the secondary is possible even when the synchronization is suspended.

Note: Irrespective of the scenario mentioned above, the read operation cannot be performed using the Listener and routing list. In either of the case of RESOLVING or NOT SYNCHRONIZED state if you use the Availability Group Listener name/IP we will get the below error.

Unable to access the ‘AdventureWorks2012′ database because no online secondary replicas are enabled for read-only access. Check the availability group configuration to verify that at least one secondary replica is configured for read-only access. Wait for an enabled replica to come online, and retry your read-only operation.

Thought this is a critical hidden enhancement with AlwaysOn, it can surely come in handy for Hybrid scenarios, or when quorum is lost scenarios where we still get the ability to read from our secondary directly as a last resort and worst case operation.

This post is inspired from Book content: SQL Server 2012 AlwaysOn Joes 2 Pros®: A Tutorial for Implementing High Availability and Disaster Recovery using AlwaysOn Availability Groups” (Paperback, Kindle).

Continue reading...


 

SQL Server 2014: Backup Informational messages March 17th, 2014

Vinod Kumar

This is in continuation to the previous observation I had with backups in SQL Server 2014. Backups are such a mundane every task for a DBA that there hardly much to talk about. Infact in a lot of sessions I ask how many can take a backup in SQL Server, I get about all of them are so confident in using the same with few clicks via SSMS.

So with something as trivial as backup what can some of the message enhancement be? Interestingly, if you have ever taken a backup in the past you will see a number of informational messages. Some of these messages like the one below were always sent to the Errorlogs of SQL Server for records.

If you ever take a backup using T-SQL commands there is another interesting message that gets displayed which is lost after you close the results tab.

With SQL Server 2014, I found the above message being sent to the errorlogs and it is quite an handy information one can have. A typical message now sent would be:

BACKUP DATABASE successfully processed 298 pages in 0.026 seconds (89.261 MB/sec).

If that was not enough, I did a normal restore of the database and Woot !!! We get a similar message on the time it took to actually restore operation.

RESTORE DATABASE successfully processed 298 pages in 0.016 seconds (145.050 MB/sec).

I have personally felt the SQL Server Error Logs are a Pandora of information of your system health. It has amazing wealth of information that sometimes when you troubleshoot ticket for your SQL Server environments our support team generally also asks you to provide the Errorlogs as part of their dumps. With so much interesting information added, these enhancements are hardly noticed by DBA sometime.

PS: Click on the images to get a hi-res readable copy.

Continue reading...


 

SQL Server 2014: Checksum with backups March 14th, 2014

Vinod Kumar

At the MTC, I have been a big time supporter of using CHECKSUM’s in your Page_Verification setting as a best practices. Some of these technology innovations that we do are hidden deep somewhere in-between the options that we don’t get to see. Inorder to get the best of your SQL Server and detect IO related potential issues, it is highly recommended to turn this setting ON.

Now, we also recommend using the CHECKSUM verification with backups. Many a times have seen customers actually have their own third party solutions to take backups and many times this option is never being used. The consequence of this is, a bad backup yields a bad corrupt restore too. So I highly recommend you read this KB article for prior to SQL 2014 deployments.

What is new with SQL 2014?

From SQL Server 2014 onwards we introduce a capability of enabling checksum at the server level by default irrespective of the backup tool that you use. This is an nifty and handy setting and I will be recommending my customers to use this by default.

The image above shows the setting available by default. So to enable the same use the following command.

sp_configure ‘backup checksum default’, 1

GO

RECONFIGURE

As I sign off this new learning, wanted to check how many of you use the CHECKSUM feature as described at the database level atleast? I am getting into this small learning experiences working with SQL Server 2014 for a while and I will keep posting them in future blogs too.

Continue reading...


 

SQL Server 2014: SELECT INTO is parallel March 7th, 2014

Vinod Kumar

Recently I was performance tuning and optimization for a customer and working on SELECT INTO statements code blocks. I saw a weird behavior and a self learning hit when I saw something interesting. In SQL Server 2014, this command seems to be running in parallel. Cool and a must from performance point of view. To reproduce this simple learning, I executed the below query on my SQL 2014 CTP2 box:

Looking at the execution plan revealed the following. Look at the Parallelism and Gather Stream to confirm the same.

Sometimes, there are these nifty tiny features that get added to the product that we stumble upon by accident. Since my TempDB is in compatibility of 120 (SQL 2014), I thought of making an interesting test. I changed my compatibility level to 100 for AdventureWorks and did the test again. To my surprise I saw the Parallelism is gone !!! Woot, that was quite a learning.

Do let me know if you get the same behavior on a pre-SQL 2014 box.

Continue reading...


 

Lync: Join Online meetings quickly March 4th, 2014

Vinod Kumar

Joining a corporate culture has its own challenges and learnings. As we join a team which is geo-dispersed we are often faced with the challenge of collaborating with various at odd hours and getting into an online meeting setup via Lync can be frustrating and time consuming for many.

I have seen a lot of times folks join a Lync call using the button we have on Outlook reminder. No doubt it is the simplest and the easiest step to join a meeting. But for some strange reason we get dropped off that Lync call or close our window we are scouting to Open Outlook –> Click Calendar Tab –> Click the Meeting Invite –> Click on the Lync Call details. Though this works 100% of the time, it is far too many clicks before we landed into our meeting.

With Lync 2013, I found an interesting behavior. As shown below there is a Calendar tab that you can take a quick look at. This lists all the meetings scheduled for today in a snapshot. Cool ain’t it?

If that was not enough, the even cooler part comes next. All meetings which are normal time blocked for various activities will be marked in black. Interestingly, Lync call embedded meetings will be shown in Blue color. Cool right? Now just double click on the blue meeting invite and it will join you to Lync call immediately. No more scrambling around for invite inside Outlook etc.

Continue reading...