You are here:   Blog

Blog Archive:

* Can be used in order to search for older blogs Entries

Search in blogs

Blog Categories:

* Can be used in order to search for blogs Entries by Categories

Blog Tags:

* Can be used in order to search for blogs by keywords


Awared MVP 


Microsoft® Community Contributor 

Microsoft® Community Contributor

Read first, before you you use the blog


Recent Entries

By ronen ariely on 12/01/2019 05:37

Several days ago, i saw a question in the MSDN forums, which led me to write this blog. I will rephrase the original question a bit and discuss the following request: How can we get the name of the current Stored Procedure (SP) from inside the SP

This is actually very simple question with multiple solutions which we can use on SQL Server On-Premises, but these solutions are not supported in other frameworks like Azure Data Warehouse and Parallel Data Warehouse.

My goal is to provide solutions for Azure Data Warehouse and Parallel Data Warehouse, but on the way I will cover the common solution for SQL Server and Azure Database as well.

By ronen ariely on 25/09/2018 08:24

PowerShell gives us a powerfull tool to invoke queries using the cmdlet command "Invoke-Sqlcmd".

Invoke-Sqlcmd execute statements which are supported by the SQL Server SQLCMD utility, which is where the name Invoke-Sqlcmd came from probably. It allows us to execute Transact-SQL or XQuery statements, or sqlcmd commands. Using the parameter "-Query" we can execute inline queries, and using the parameter "-inputfile" we can specifies a path to a file, which is used as the query input to this cmdlet.

There are a lot of tutorials online on how to use Invoke-Sqlcmd command, which usually focus on the built-in paramatres and how to execute the command. One of these parameters is "Out-File", which allows us to send the output of the queries to a file, but how can we control the output of PRINT for example or the output of ERROR massage?!? 

Today I want to discuss some undocumented options of using Invoke-Sqlcmd. In this post I will show how we can control the target of the output not only of the queries but also errors and user-defined messages (PRINT statements), and how we can send these to a new file, to the shell screen or to any other target.

By ronen ariely on 09/09/2018 18:12

A web server software processes incoming network requests, and serve contents to the World Wide Web. A client software like a browser initiates communication by making a request for a specific resource and the server responds with the content of that resource.

Common web severs like Apache and Internet Information Services (IIS) allow us to keep track the incoming network requests. The server stores the information in simple text files. The raw log file, which lists the information as recorded by the server, are not particularly easy to read directly. The raw log files can become incredibly large very quickly. Moreover, usually we are interested in aggregate information like “how many people visit my website” or “how many times people view my blog”.

In this short post I will show how you can use the power of SQL Server and Transact SQL language in order to (1) import IIS log files to SQL Server table, (2) parse IIS log files data directly or from the data that was imported to the SQL Server Database, and (3) I will show several examples of queries to process the IIS log and get useful information out of it.

By ronen ariely on 23/07/2018 08:38

In this sample code I will present a simple solution to the question "how to drop CLUSTERED INDEX from a PRIMARY KEY column. The case study is that the user created a table with PRIMARY KEY but he did not meant the PRIMARY KEY to become a CLUSTERED INDEX, which is what happen if you do not configure a different CLUSTERED INDEX or you explicitly configure the PRIMARY KEY as a NONCLUSTERED INDEX

By ronen ariely on 21/06/2018 00:28

Central Processing Unit (CPU), CPU Core, Logical cores, vCore…

No… in this short post I am not going to explain about the Azure new vCore-based purchasing model. For more information about this you can read to official documentation. Unfortunately, he documentation does not cover explanation about the meaning of phrase vCore.

In this short post I will try to explain what the hell Microsoft means by vCore and what do we actually get.

By ronen ariely on 11/05/2018 16:33

Do you want to have a shortcut links in your portable device which point to a files in the portable device?

For example I am store Sql Server Operations studio, which does not require any installation in my disk-on-key. If my external disk has the drive letter E, then the path to my executable file is: “E:\sqlops\sqlops.exe”. The problem is that if I will create a link to this path, it might not work the next time I am using the same disk, since the drive letter is given dynamically when we plugin the device.

By ronen ariely on 17/04/2018 16:47

Another year passed and if we want to renew the MVP award then we must report our activities... 
I hate these types of tasks!

It seems to me always like a waste of time. Instead of writing about my community activities, I want to do some more. Instead of wasting my free time on summarize what I did in the forums, I want to spend that time in helping people in the forums... I can answer 10 more questions in the time I fill one activity in the MVP form… it is not like we can get more than 24 hours a day, so we must use the time that we have, in the best constructive way we can!

Note! Before I start spilling my guts, let me clarify that I am going to bring my personal views, recommendation and tips, according to my personal experience while filling my community activities list. These are not solutions or guidelines officially prescribed by the MVP program team.

By ronen ariely on 10/04/2018 22:00

Seems like Microsoft papered their services to the new GDPR regulation, and as part of the preparation several weeks ago a new feature named “PRIVACY” was added to the MSDN and TechNet profile. This feature enables us to download the data that Microsoft stores about our activities! Unfortunately, the data that is given to us is not formatted in a readable way, but in one long line of text [*updated] (JSON FORMAT) which can be in the size of hundreds of megabytes. In this post, I show how to get our data, view the data in raw format (JSON) and in readable format, and I gave queries to parse all the data into tabular structure using the built-in JSON features in SQL Server.

* Update 2018-04-17: I added Microsoft team's feedback and future plan, accordingly my post...

By ronen ariely on 20/03/2018 14:57
Seems like there is a confusion regarding the meaning of the style parameter in CONVERT function, and the way SQL Server use it. This short post based on a question that raise in the MSDN forum, and I will try to bring some insights here.
By ronen ariely on 14/03/2018 08:02
We are living in a very complex world. The combination of fast evolution in technologies (and other fields) together with the online communities and the laziness of people who want to use short words brings to the world a new acronym every several minutes probably. Each acronym word can have 10 and sometimes 10 thousand different meanings... let's go over the meaning of MMDBMS regarding SQL Server OLTP in-memory tables