Sending a text message from SQL Server

You must have SQL Server database mail enabled for this stored procedure to work.

CREATE proc [dbo].[SendTextMessage](
@number nvarchar(255)
,@message nvarchar(255)
,@subject nvarchar(255) = null
,@provider nvarchar(20) = 'Verizon'
set nocount on;

set @number = ltrim(rtrim(@number));
if @number is null or len(@number)<7 begin;
set @message = '@number is too short';
throw 51000, @message, 1;

set @message = ltrim(rtrim(@message));
if @message is null or len(@message)<2 begin;
set @message = '@message is too short';
throw 51000, @message, 1;

set @subject = ltrim(rtrim(@subject));
if @subject is null set @subject = @@SERVERNAME + N' Notification';

declare @to nvarchar(255) = @number + N'@'+
case @provider
when 'Verizon' then N''
when 'VZ' then N''
when 'ATT' then N''
when 'SPRINT' then N''
when 'TMOBILE'  then N''
if nullif(@provider,N'@') is null begin;
throw 51000, 'Unknown provider. Message not sent.', 1;

begin try;
declare @mailitem_id INT;
exec msdb.dbo.sp_send_dbmail @recipients = @to, @subject = @subject, @body = @message, @mailitem_id=@mailitem_id output;
end try
begin catch;
throw 51000, 'Unknown error calling msdb.dbo.sp_send_dbmail.', 1;
end catch;

Google Chrome: Fix to remove all ‘Other Search Engines’.

Found via Google Chrome: Remove all ‘Other Search Engines’ – Super User.

Finally! I’m so tired of every little site I visit adding baggage into my Chrome browser.
There really should be an option to add a site, WHEN I DESIRE TO DO SO.

Freakin’ chrome design team. Grr.

Meanwhile, there is a chrome extension that is supposed to block these silent custom search engine additions: “Don’t add custom search engines“.

Here’s to hoping it works!

[Free] Online Link Expander & Decrypter

@ Link Expander & Decrypter

Quote from their site (with the Grammar fixed!):

“This tool is an Ajax based link expander. It works by taking into account the API & shortening algorithm used by the shortener. After you submit your link, it checks the API used by the shortener. Within seconds the tool unshortens the URL according to the API detected. But that’s not all this tool does, it also tells if the uncovered site is safe to browse and displays a screenshot of the website along with the result. Now you can decrypt any URL with our link unshortener. We have tested our tool with all the services & it works perfectly!”
“Now expand URL from Bitly, Goog.l, AdFly & many more in just a click!”

Performance Boost with VeraCrypt?!

VeraCrypt – Free Open Source Storage Device Encryption
(with strong security for the paranoid!) – Their words, not mine lol.

Has anyone else noticed a performance boost in reading from and writing to a VeraCrypt encrypted storage device?

Let’s run some tests and see if there really is any difference..

Continue reading “Performance Boost with VeraCrypt?!”

Recommended free storage device benchmarking software for Windows 10

For free storage device benchmarking software, I highly recommend CrystalDiskMark. The interface is nice, clean, and simple to use. And the results are easy to understand!

You can even record the test results by pressing Alt-PrintScreen (after the benchmarks have completed, of course) to post to your website or blog for sharing and historical comparisons.

I’ll be using this program in my next blog post to test VeraCrypt’s (a free storage device encryption program) performance vs the same plain hard drive.