When you use JDBC driver to set up an application connection string to MS SQL Server database, it passed the sendStringParametersAsUnicode parameter as True if you don't define sendStringParametersAsUnicode in the connection string specifically. The default value is True. It will cause high CPU usage on SQL Server due to implicit conversion in queries passed from the application. The default setting send all the parameters in the queries as nvarchar.
If the data type in the tables does not align with the parameters datatype declared in the application queries, it will cause implicit conversion and table scan.
We need to always set sendStringParametersAsUnicode = False in JDBC connection string to SQL server database.
JDBC URL —
url="jdbc:sqlserver://
host:port;databaseName=dbName;SelectMethod=cursor;SendStringParametersAsUnicode=false"
Thank you for reading my post.
Thank you for visiting my blog. My site is intended to share information and knowledge with others as well as a reference site for me.
Thursday, January 24, 2019
Wednesday, January 2, 2019
Create your own Microsoft Management Console
HAPPY NEW YEAR EVERYONE!!!
HELLO 2019!!!
I am back to work and this is my first blog for 2019. I used MMC control to group configuration managers that I need to use daily on each server. So, I would like to share this tips.
Click Run
Type MMC
After Control opened, Press Ctl+M
Add the tools to Selected Snap-ins: Choose SQL configuration manager and click Add.
Click OK after adding a few snap-ins.
Click on Save on Console and give a name.
Now, I have my console on my server desktop where I can open and check things.
Subscribe to:
Posts (Atom)
How to add a Database to AlwaysOn Availability Group with four different options
To add a database to an existing AlwaysOn availability group, MS has given us four options to choose from Automatic seeding Full database an...
-
Tempdb filled up last night and databases availability group are not accessible in secondary replica. After restarting a secondary SQL insta...
-
After changing a service account running SQL server, I get an error when I connect to SQL server from Management Studio from my laptop or ot...
-
I was working on a powershell script which tells me which node is AlwaysOn primary replica. We have 38 servers which participate in AlwaysOn...