Showing posts with label CLR. Show all posts
Showing posts with label CLR. Show all posts

Friday, July 13, 2018

What is Dynamic Language Runtime (DLR)?

Dynamic Language Runtime(DLR) is a runtime environment that adds set of services for dynamic languages to the Common Language Runtime.

The difference between dynamic languages and statically typed languages such as C# and Visual Basic is that you need to specify the object type at design time for the latter.

There are a lot of popular dynamic languages such as the following:

LISP
SmallTalk
Javascript
PHP
Ruby
Python
ColdFusion, Lua
Cobra and
Groovy

Dynamic languages are also excellent scripting languages used in designing Web sites; data transformations; artificial intelligence, etc.

The main driver for DLR is to create the ability to run the dynamic languages on top of the CLR. Dynamic objects (in System.dynamic) now can be used in C# and Visual Basic. This in Visual studio Community 2017.


DLR_0
Here is the architecture of DLR for IronPython and IronRuby from Microsoft documentation in MSDN.


DLR.png

Tuesday, July 10, 2018

How do you install IronPython?


You can get the program from this site. I downloaded the .msi file for installing IronPython from this site.




It is easy once you have the .msi file. These are some screen shots.



Once installed you should find it in All Programs as shown.


You can launch from the above. 



Thursday, December 24, 2015

What is SSISDB and how do you create SSISDB in SQL Server 2012?

Integration Services Server is basically the SQL Server Database Engine that hosts a special database that does not allow replication or mirroring, the SSISDB. The database stores the following objects:

  • Packages
  • Projects
  • Parameters
  • Permissions
  • Server Properties
  • Operational History
While installing SQL Server 2012you would have installed SQL Server Integration Services as shown here:


IntSerServ_00

SSISDB provides the public views that allows querying and for manageability, it allows creating stored procedures. SSISDB has to be in place before you deploy SSIS Projects.

The Packages are created using SQL Server Data Tools and deployed to SSIS. It assumes you have created the SSISDB before deploying the SSIS Projects.

Where is the SSISDB or how do you create the database SSISDB?

Assuming you have installed SQL Server 2012 as I the previously mentioned link, you launch the SQL Server Management Studio and change over from connecting to Database Engine to Integration Services  as shown.

IntSerServ_01

Since you installed with Windows Authentication, just click Connect.

Oops! you may get this message.

IntSerServ_02

Now go ahead and launch SQL Server Management Studio with Elevated permissions (As administrator).  Repeat connecting to Integration Services as before. You may get this message if SQL Server Integration Services has not started.

IntSerServ_04

Start the SQL Server Integration Services in Control Panel|..|Services  shown.

IntSerServ_05

Click Start to start the SQL Server Integration Services 11.0. It processes the information and status changes to Running.

Now connect to the Integration Services as before (after launching the SSMS in Administrative mode).

The first of the nodes in the Object Explorer is the Integration Services. This is an expanded view of the Integration Services Server.


This is a named instance of SQL Server that will host the SSISDB.

IntSerServ_06

Creating the SSISDB

Connect to the named instance of SQL Server 2012, herein the Hodentek8\RegencyPark.
Right click the Integration Servies Catalogs and click Create Catalog.. from the drop-down menu as shown above. The following window will be displayed.

IntSerServ_07

Place check mark for Enable CLR Integration. Leave the catalog database name as is and create a password to protect data using encryption (enter and retype password). Save this information in a secure place (under lock and key). Click OK.

Now the SSISDB gets created as shown.

IntSerServ_08
This is an expanded view of the SSISDB in the Object Explorer of the named instance.

IntSerServ_09

In the next post a SSIS Project creation will be described that can be deployed to the Integration Services Server.




Sunday, November 8, 2015

What is SQL CLR or SQLCLR?

In order to understand what is SQLCLR, you need to know what the individual parts, Sequential Query Language (SQL) and Common Language Runtime (CLR) are.

Common Language Runtime is the programming that manages the execution of programs written in any of the supported languages such as C#, VB, Visual C++ etc to share common object orineted classes. Thiss is somewhat like Java Virtual Machine for programs run from Java. CLR is also called 'managed execution environment'. CLR is therefore related to .NET programming.

SQL is a language that is needed to run queries (post questions to) against SQL Server databases. It is not specific to Microsoft SQL Server. It can also be used with other databases like Oracle, Sybase, etc.
However Transact SQL (T-SQL) is the enhancement to add some progrmmability to SQL.
SQL Common Language Runtime (SQLCLR) is the combo technology (SQL Server and .NET) for hosting .NET common language runtime engine within SQL Server. In other words you can run managed code from within SQL Server.

Since T-SQL already adds to SQL the programming capability why does one need SQL CLR?

The reason I that there are certain useful class of programs that are just not handled by T-SQL, or make it much more complex and less secure. Of course there are more reasons why SQL CLR is needed. This is the reason for the development of SQL CLR. Also Microsoft made extensive integration of SQL Server with its massive .NET programming which makes it lot more flexible.

For, Creating a Visual C++ CLR Console Application in Visual Studio 2015 go here.

Tuesday, August 11, 2015

How do you create a Visual C++ CLR Console Application in Visual Studio 2015?

Common Language Runtime (CLR) applications depend on .NET Framework and are compiled to intermediate code interpreted by CLR at run time. Win32 applications compile/link directly to machine code and is independent of CLR.

You can create Visual C++ CLR Console application using Visual Studio.

Launch VS2015 Express 2015 for Windows Desktop.

Click File | New Project
Expand Visual C++ node and click CLR. The New Project Windows presents the diffrent project Templates as shown:


ClrConsole_01

Click CLR Console Application  shown above and change the Name at the bottom of screen to ClrConsoleApp.

Click OK to create the folder/files for the project template as shown. Accept default location for directory. The project gets created as shown:


ClrConsole_02

Make sure you read the ReadMe.txt file in the project that gives the overview of the project you created.
The References node shows the default references general, data and xml.

Reference System contains fundamental classes and bare classed that define commonly used ValueTypes and reference datatypes, events, handlers etc.

mscorlib: assembly dll that supports .NET Framework development

The template already has the 'Hello World' program. Note that for this program all that you need is the namespace System. The following is the main project file created by the template.
--
// ClrConsoleApp.cpp : main project file.
#include "stdafx.h"
using namespace System;
int main(array ^args)
{
    Console::WriteLine(L"Hello World");
    return 0;
}

-------------
Click Build | Build Solution for F7 (see next image)


ClrConsole_03

 
The build succeeds as it should as shown:

ClrConsole_04

Click Debug | Start Without Debugging. The Console window opens as
shown displaying the result of running the code:

ClrConsole_05
The next image shows the project in the file system of the computer.

ClrConsole_06
Access the project properties to view more details:


ClrConsole_07
The Application.exe file can be run from command line. There is no graphical user interface.

Note that intellisense is available in the VS 2015 IDE as shown here (just added a int variable):

ClrConsole_08

Here is some code added to ClrConsoleApp.cpp
--------------
// ClrConsoleApp.cpp : main project file.
#include "stdafx.h"
using namespace System;
int main(array ^args)
{
    Console::WriteLine(L"Hello World");
    Console::WriteLine("");
 int x = 5;
 Console::WriteLine(x);
 return 0;
}


The code when run produces this:

 

Tuesday, June 2, 2015

What is Microsoft Solver Foundation?

It is a set of tools to work on mathematical simulation, optimization and modelling. It uses the managed execution and common language runtime (CLR). This means you can use any of the CLR languages including VB, Visual C++, Visual C#, Visual F#, and IronPython.
Of course you can also use ASP.NET and Silverlight in your mathematical operations.

Mathematical Solver Foundation APIs
  • Can run remotely as a service within IIS and ASP.NET
  • Can run in Excel as an add-in
  • Integrate with other .NET Framework apps
  • Embed as DSL within CLR languages
  • Embed as a CLR compliant module.
Review this link for more:
https://msdn.microsoft.com/en-us/library/ff524497(v=vs.93).aspx