Monday 26 April 2021
Curious About Cryptographic Boolean Functions?
Sunday 25 April 2021
Exploring What a PhD Is Like
Some
weeks ago, it was my pleasure, and honour, to be invited to participate as a
panellist in the online event Explore What a PhD is Like organised by PhD Social Support Network from Loughborough
University. The event
aimed to give undergraduate and postgraduate students a summary of Doctoral
Researchers’ lives and an idea of what it’s like to do a PhD at Loughborough
University.
With so much confusing and contradictory information out there, it becomes a bit difficult to have a good understanding of many things before embarking on doing a PhD. So I decided to write down my answers for those of you who could not attend the event and are interested in doing a PhD. Because we were four panellists, I just answered some questions, but in this post, I share my answers to all questions, which mainly depend on my personal circumstances and experiences at Loughborough University — And I do hope to help clear some things up. In case that you have any other questions, please let me know in the comment section.
Friday 12 March 2021
Cryptography is Everywhere
The huge desire for secrecy led nations, kings, and queens to make all-out efforts to ensure the security of communications by inventing the best possible secret codes and ciphers.
A lover in Victorian times |
Friday 5 March 2021
Do You Want to Be a Cryptographer?
Alan Turing |
Thursday 4 March 2021
Don't Place the Blame on SQL Server
No matter what technology we are working with, we are at the wheel — technology is just a tool — so it is not the best to blame technology on the ground of one's inefficiency.
Monday 30 July 2018
Installing a stand-alone SQL Server 2017 instance step by step
Today's post is going to outline the process of installing a basic stand-alone SQL Server 2017 instance. This process is just a basic guideline and, surely, not a rule for each installation, because it is fully understood that every environment is different and needs a customised installation to meet very specific requirements. You can read the whole tip about it at mssqltips here https://www.mssqltips.com/sqlservertip/5616/steps-to-install-a-standalone-sql-server-2017-instance. I hope you find it very useful and practical. That's all for now. Please let me know any remarks you may have. Stay tuned!
Tuesday 20 March 2018
Configuring Read-Only Routing and load-balancing across Read-Only replicas
Tuesday 20 February 2018
Looking deeper into the physical & logical architecture - Transaction Log File
Saturday 17 February 2018
Checking SQL Server stale statistics
- How many times did you find yourself in a big problem related to unforeseen performance issues even some days after having carried out dutifully the respective database maintenance tasks?
- Did you wonder why rebuilding index and statistics update tasks are not good enough?
- If everything was working smoothly, why did the performance start going down unexpectedly?
- Why are the indexes not being used as usual? do I need to create more indexes?
Tuesday 13 February 2018
Avoid changing default ANSI database options
Msg 8152, Level 16, State 14, Line 5
String or binary data would be truncated.
Friday 2 February 2018
Some common reasons why the transaction log cannot be reused automatically
Furthermore, even using SIMPLE recovery model the transaction log file might not be truncated automatically because of open transactions, that is why it is essential to execute a COMMIT explicitly and not to use IMPLICIT transactions. Being cognisant of this fact, I am sold on the idea of having total control of the scope of transactions so as to avoiding these issues. Another reason why the transaction log file internal space may not be reused is due to CHECKPOINT wait type when the database has AUTOMATIC CHECKPOINT disable. In this case it is needed to execute a CHECKPOINT command manually. I heartedly recommend not disabling AUTOMATIC CHECKPOINT for any database.
Additionally, with the arrival of SQL Server AlwaysOn, the HADR_SYNC_COMMIT wait type arrived as well. This wait type will be found while an AlwaysOn Availability Group secondary replica is trying to apply or is applying transaction log records of this database to a corresponding secondary databases. However, this wait type might cause a major problem if it is unusually long because the AlwaysOn Availability Group is not working properly as a result of either network issues or at last one secondary replica is slow in log hardening. Thus, it is of paramount importance to ensure Always On Availability Group as a whole is working smoothly and as expected, otherwise there will be no way to truncate the transaction log file and it will indeed risk the availability of the database. Using this code, we can check the wait types for all databases and particularly the HADR_SYNC_COMMIT wait type:
select session_id, status,command,blocking_session_id, wait_type, wait_time, last_wait_type from sys.dm_exec_requests where session_id>=50 Go select wait_type, waiting_tasks_count, wait_time_ms from sys.dm_os_wait_stats and wait_type = 'HADR_SYNC_COMMIT'
0 = Nothing
1 = Checkpoint (When a database uses a recovery model and has a memory-optimized data filegroup, you should expect to see the log_reuse_wait column indicate checkpoint or xtp_checkpoint.) Applies to SQL Server 2008 through SQL Server 2017
2 = Log Backup. Applies to SQL Server 2008 through SQL Server 2017
3 = Active backup or restore. Applies to SQL Server 2008 through SQL Server 2017
4 = Active transaction Applies to SQL Server 2008 through SQL Server 2017
5 = Database mirroring. Applies to SQL Server 2008 through SQL Server 2017
6 = Replication. Applies to SQL Server 2008 through SQL Server 2017
7 = Database snapshot creation. Applies to SQL Server 2008 through SQL Server 2017
8 = Log scan Applies to
9 = An Always On Availability Groups secondary replica is applying transaction log records of this database to a corresponding secondary database. Applies to SQL Server 2012 through SQL Server 2017. In earlier versions of SQL Server, 9 = Other (Transient).
10 = For internal use only Applies to SQL Server 2012 through SQL Server 2017
11 = For internal use only Applies to SQL Server 2012 through SQL Server 2017
12 = For internal use only Applies to SQL Server 2012 through SQL Server 2017
13 = Oldest page Applies to SQL Server 2012 through SQL Server 2017
14 = Other Applies to SQL Server 2012 through SQL Server 2017
16 = XTP_CHECKPOINT (When a database uses a recovery model and has a memory-optimized data filegroup, you should expect to see the log_reuse_wait column indicate checkpoint or xtp_checkpoint.) Applies to SQL Server 2014 through SQL Server 2017
More info: https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-databases-transact-sql
That is all for now, let me know any remarks you may have. Stay tuned.