Tuesday, August 11, 2020

Microsoft SQL Server Version Details


Quick summary:

 RTM (no SP)SP1SP2SP3SP4
↓ SQL Server 201613.0.1601.513.0.4001.0
or 13.1.4001.0



↓ SQL Server 201412.0.2000.812.0.4100.1
or 12.1.4100.1
12.0.5000.0
or 12.2.5000.0
  
↓ SQL Server 2012
     codename Denali
11.0.2100.6011.0.3000.0
or 11.1.3000.0
11.0.5058.0
or 11.2.5058.0
11.0.6020.0
or 11.3.6020.0
 
↓ SQL Server 2008 R2
     codename Kilimanjaro
10.50.1600.110.50.2500.0
or 10.51.2500.0
10.50.4000.0
or 10.52.4000.0
10.50.6000.34
or 10.53.6000.34
 
↓ SQL Server 2008
     codename Katmai
10.0.1600.2210.0.2531.0
or 10.1.2531.0
10.0.4000.0
or 10.2.4000.0
10.0.5500.0
or 10.3.5500.0
10.0.6000.29
or 10.4.6000.29
↓ SQL Server 2005
     codename Yukon
9.0.1399.069.0.20479.0.30429.0.40359.0.5000
↓ SQL Server 2000
     codename Shiloh
8.0.1948.0.3848.0.5328.0.7608.0.2039
↓ SQL Server 7.0
     codename Sphinx
7.0.6237.0.6997.0.8427.0.9617.0.1063


Ref : https://sqlserverbuilds.blogspot.in/

Thursday, October 31, 2019

Resend an email sent from SQL Server

Dear All,

Sometimes the email goes missing in the SQL server.

Find the email you want to resend using one of the following views in MSDB:

sysmail_allitems

sysmail_faileditems

Use following Query:


DECLARE @mailitemID INT = -- MailItem_Id here e.g 98765

DECLARE @profilename NVARCHAR(125);
DECLARE @recipients VARCHAR(2000);
DECLARE @copy_recipients VARCHAR(2000);
DECLARE @blind_copy_recipients VARCHAR(2000);
DECLARE @subject NVARCHAR(510);
DECLARE @body VARCHAR(2000);
DECLARE @body_format VARCHAR(20);
DECLARE @importance VARCHAR(6);
DECLARE @sensitivity VARCHAR(12);
DECLARE @query BIT;
DECLARE @attachment BIT;

--Get the information for the email
SELECT
@profilename = [profiles].[name],
@recipients = [mail].[recipients],
@copy_recipients = [mail].[copy_recipients],
@blind_copy_recipients = [mail].[blind_copy_recipients],
@subject = [mail].[subject],
@body = [mail].[body],
@body_format = [mail].[body_format],
@importance = [mail].[importance] ,
@sensitivity = [mail].[sensitivity],
@query = CASE WHEN [mail].[query] IS NULL THEN 0 ELSE 1 END,
@attachment = CASE WHEN [mail].[file_attachments] IS NULL THEN 0 ELSE 1 END
FROM msdb.dbo.sysmail_allitems mail
INNER JOIN msdb.dbo.sysmail_profile profiles ON mail.profile_id = profiles.profile_id
WHERE mailitem_id = @mailitemID;

IF @query = 0 AND @attachment = 0
BEGIN

--Re send the email
EXEC msdb.dbo.sp_send_dbmail
@profile_name = @profilename,
@recipients = @recipients,
@copy_recipients = @copy_recipients,
@blind_copy_recipients = @blind_copy_recipients,
@subject = @subject,
@body = @body,
@body_format = @body_format,
@importance = @importance,
@sensitivity = @sensitivity

END
ELSE
BEGIN
RAISERROR('unfortunately this script cannot send',11,0,@mailitemID)
END

I've verified its working fine.


Friday, June 21, 2019

mysql update query



Mysql update query for



SELECT * FROM wordpress99.wp_users;

update wordpress99.wp_users set user_pass=MD5('!@#$%^@2019') where ID=1

Friday, April 12, 2019

DHL web service - timeout

Hello team,

Las few days faced issue with DHL side, following error message received,

DHShipment() The request channel timed out while waiting for a reply after 00:00:59.9990010. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

windows activation

Windows activation Steps, 1} Search command prompt 2} right click and run as an administrator in command prompt 3}  slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (Enter the product key) 4} Enter & 30 Sec wait

Note:- Any get Error Restart the PC & check

2019-04-09.png

Thursday, July 19, 2018

purging cloudflare cache with an api call in wep api and asp.net C#

Hi All,

Cloudflare's cache

To remove one or more files from Cloudflare's cache either by specifying URLs, faced challenges to integrated the cloud-flare API call. We've tried VS 2015 and framework 4.5.2. Exception through 'upgrade the version' and tried higher version VS 2017 and framework 4.6.1 and its works fine.

Cloudflare Request:


curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/purge_cache" \
     -H "X-Auth-Email: user@example.com" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json" \
     --data '{"files":["http://www.example.com/css/styles.css",{"url":"http://www.example.com/cat_picture.jpg","headers":{"Origin":"cloudflare.com","CF-IPCountry":"US","CF-Device-Type":"desktop"}}]}'


Cloudflare Response

{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "id": "9a7806061c88ada191ed06f989cc3dac"
  }
}


Here, Existing application running .net framework 4.5 (immediate need to convert 4.6.1 ), if we change to 4.6.1 version. Required to verify full application and takes 3 to 4 months. Meanstime we think and created web api and call the url in existing application. 

4.5(traditional asp.net)--->4.6.1(web api)---> Cloudflare Purge (Restful API)

Happy coding:)

Saturday, May 5, 2018

IIS,Memory leak,output cache,set the memory limit, recycling


Recenly faced iis related memory leakage, To investigate its happen application level or system level.

Application level

i. Check DB - costly query and DB performance

ii. outputcache

iii. third-party dll and excel macro relate application used


System level

i. To reduce number application pool (each application pool allocating memory, so allocate static site are to defaultapppool)

ii. check system configuration (RAM and C drive space)

I referred below links,


IIS - Output cache: https://serverfault.com/questions/557920/iis-memory-management-thresholds-with-potential-leaks


Memory: https://forums.iis.net/t/1230103.aspx?Windows+Server+2012+IIS+8+0+IIS+Worker+Process+Consumes+more+memory


Recycling: http://www.bursky.net/index.php/2013/03/managing-iis-server-memory-usage/


https://stackoverflow.com/questions/16162524/how-to-increase-memory-and-cache-size-for-application-pool-in-iis-7-efficiently

https://serverfault.com/questions/598672/app-pool-doesnt-respect-memory-limits