Showing posts with label R programming. Show all posts
Showing posts with label R programming. Show all posts

Tuesday, September 6, 2016

Enabling R Service and Verifying Local R script execution

There are several steps  involved in setting up R Services work with SQL Server 2016() and one of which is enabling R Service and Verifying Local R script execution.

In my previous post (http://hodentekmsss.blogspot.com/2016/07/problem-enabling-r-service-in-sql.html) I have completely described the installation of SQL Server 2016 Developer's edition during which the R Server was also installed as shown here:


Rserver_00
In order to run R in SQL Server 2016 you need to use the sp_execute_external_scripts stored procedure. In order to do use this, you need first set the external scripts enabled option, which by default is OFF.
The suggested way is to configure by running the following statement:
============
sp_configure 'external scripts enabled', 1; 
RECONFIGURE; 
============
When run on the named instance on which R Server is also configured (Hodentek8\Ohana) we see the following result:
sp_config_00


Let us see if  running the sp_execute_external_script written in R works:

exec sp_execute_external_script @language=N'R',
@script=N'OutputDataSet <-InputDataset',
@input_data_1=N'select 1 as hello'
with result sets (([hello] int not null));
go

This returns the following error:

Msg 39011, Level 16, State 1, Line 4
SQL Server was unable to communicate with the LaunchPad service.
Please verify the configuration of the service.


You can open up Services window from Control Panel and start the service. This is the Launch Pad services to work with Analytics.


After this run the R script again as shown.

Booyah! It works! This was the response expected and the stored procedure works.


Enabling R Service and Verifying Local R script execution

There are several steps involved in setting up R Services work with SQL Server 2016() and one of which is enabling R Service and Verifying Local R script execution.

In my previous post (http://hodentekmsss.blogspot.com/2016/07/problem-enabling-r-service-in-sql.html) I have completely described the installation of SQL Server 2016 Developer's edition during which the R Server was also installed as shown here:


Rserver_00
In order to run R in SQL Server 2016 you need to use the sp_execute_external_scripts stored procedure. In order to do use this, you need first set the external scripts enabled option, which by default is OFF.
The suggested way is to configure by running the following statement:
============
sp_configure 'external scripts enabled', 1; 
RECONFIGURE; 
============
When run on the named instance on which R Server is also configured (Hodentek8\Ohana) we see the following result:
sp_config_00

Let us see if  running the sp_execute_external_script written in R works:

exec sp_execute_external_script @language=N'R',
@script=N'OutputDataSet <-InputDataset',
@input_data_1=N'select 1 as hello'
with result sets (([hello] int not null));
go

This returns the following error:

Msg 39011, Level 16, State 1, Line 4
SQL Server was unable to communicate with the LaunchPad service.
Please verify the configuration of the service.


You can open up Services window from Control Panel and start the service. This is the Launch Pad services to work with Analytics.


After this run the R script again as shown.

Booyah! It works! This was the response expected and the stored procedure works.


Wednesday, May 13, 2015

SQL Server 2016 Public Preview Coming Soon

The first public preview of SQL Server 2016 is imminent. This is deemed to be an historic version with real-time operational analytics; rich data visualization on mobile platforms and advanced analytics already built-in. It also has the latest hybrid cloud scenarios with latest Advanced security technology.

Key features:
Always Encrypted:
Straight from Microsoft Research. Data protection at rest (in Server) and in motion
Encryption key stays with application
Encryption, decryption takes place transparently inside the application
This feature supports the new Stretch Database as well.

Stretch Database:
This technology which is motivated to reduce cost for customers so that they can archive by moving bloated transactional data to Azure and maintain fast performance with hot data. This stretching of transactional data is dynamic and is secure using the latest Always Encrypted feature.



Real-time Operational Analytics and In-Memory OLTP:
Blazing fast transactional performance of real time operational analytics according to Microsoft. 100 times faster queries with in-memory OLTP compared to 30 times presently possible with disk-based system.




Built-in Advanced Analytics, Polybase and Mobile BI
Goes beyond OLTP to data warehousing and Business Intelligence and delivers advanced analytics made possible by Revolution Analytics. It uses R processing with excellent statistics support. Polybase will be integrated with SQL Server to address both relational and unstructured data using SQL Skills. There is a Data Scientist here!!


These are additional capabilities quoted from the blog:

•    Additional security enhancements for Row-level Security and Dynamic Data Masking to round out our security investments with Always Encrypted.
•    Improvements to AlwaysOn for more robust availability and disaster recovery with multiple synchronous replicas and secondary load balancing.
•    Native JSON support to offer better performance and support for your many types of your data.
•    SQL Server Enterprise Information Management (EIM) tools and Analysis Services get an upgrade in performance, usability and scalability.
•    Faster hybrid backups, high availability and disaster recovery scenarios to backup and restore your on-premises databases to Azure and place your SQL Server AlwaysOn secondaries in Azure.

Download a copy of the datasheet here:

You could look up more details here (the pictures are from Microsoft Blog):



When Identity Security Becomes a Wall — Not a Shield

After a breach that forced a reset of my digital identity, I hit a roadblock I never anticipated: multi-factor authentication (2FA) locked m...