Webcast sobre R Services para el Capitulo PASS en español


Quedan cordialmente invitados a la charla que voy a impartir sobre el soporte de Lenguaje R para DBAs este 09 de noviembre, la información de registro está en este enlace https://attendee.gotowebinar.com/register/2851577187762041348?mc_cid=79927082a9&mc_eid=d327c82138
Este seminario web consta de 50 sesiones. Está previsto que asista a las 50 sesiones.
  1. mié, 9 de nov de 2016, 11:00 - 12:00 CST
  2. mié, 16 de nov de 2016, 11:00 - 12:00 CST

Resumen: 
Le Lenguaje R ha ganado popularidad en los últimos años y en esta charla vamos a ver los principales conceptos que debe dominiar un DBA sobre el Lenguaje R, veremos cuáles son las instrucciones de R que debe conocer un DBA para cargar datos, limpiar datos, transformar datos y crear aplicaciones dentro de R Studio. 

Expositor: Eduardo Castro 
Microsoft Data Platform MVP and PASS Board of Advisor for LATAM, is well known LATAM SQL Server Expert and focuses on architecture, Business Intelligence and Data Analytics, Eduardo has an specialization and master degree in Data Analysis and Big Data. Eduardo Castro has presented in United States, Costa Rica, Colombia, Guatemala, Mexico, Panama, El Salvador and South Korea. 

Al registrarme acepto que PASS o terceros asociados me envie información de posibles eventos o actividades en el futuro.


Scripts
Les adjunto los scripts utilizados durante este seminario en línea.


-- DMV sys.dm_os_performance_counters
-- Returns a row for each system performance counter being used by the server.

--Total Executions: Number of R processes started by local or remote calls
--Parallel Executions: Number of times that a script included the @parallel specification and that SQL Server was able to generate and use a parallel query plan
--Streaming Executions: Number of times that the streaming feature has been invoked.
--SQL CC Executions: Number of R scripts run where the call was instantiated remotely and SQL Server used as the compute context
--Implied Auth. Logins: Number of times that an ODBC loopback call was made using implied authentication; that is, the SQL Server executed the call on behalf of the user sending the script request
--Total Execution Time (ms): Time elapsed between the call and completion of call.
--Execution Errors: Number of times scripts reported errors. This count does not include R errors.


SELECT * from sys.dm_os_performance_counters 
WHERE object_name LIKE '%Scripts%'


-- DMV sys.dm_external_script_requests
-- This DMV reports a single row for each worker account that is currently 
-- running an external script. Note that this worker account is different 
-- from the credentials of the person sending the script. If a single Windows user 
-- sends multiple script requests, only one worker account would be assigned to handle 
-- all requests from that user. If a different Windows user logs in to run an external script
-- the request would be handled by a separate worker account.

-- OUTPUT
-- external_script_request_id: A GUID, which is also used as the temporary name of the working directory used to store scripts and intermediate results.
-- language: A value such as R that denotes the language of the external script.
-- degree_of_parallelism: An integer indicating the number of parallel processes that were used.
-- external_user_name: A Launchpad worker account, such as SQLRUser01.

SELECT external_script_request_id 
  , [language]
  , degree_of_parallelism
  , external_user_name
FROM sys.dm_external_script_requests; 

-- get info about running scripts

select r.session_id, r.blocking_session_id, r.status
     , db_name(s.database_id) as database_name, s.login_name
     , r.wait_time, r.wait_type, r.last_wait_type
     , r.total_elapsed_time, r.reads, r.logical_reads, r.writes
     , er.language as script_type, er.degree_of_parallelism, er.external_user_name
  from sys.dm_exec_requests as r
  join sys.dm_external_script_requests as er
    on r.external_script_request_id = er.external_script_request_id
  join sys.dm_exec_sessions as s
    on s.session_id = r.session_id

-- DMV sys.dm_external_script_execution_stats
-- Returns one row for each type of external script request.

-- language     -> Name of the registered external script language. Each external script must specify the language in the script request to start the associated launcher.
-- counter_name  -> Name of a registered external script function. Is not nullable.
-- counter_value -> Total number of instances that the registered external script function has been called on the server. This value is cumulative, beginning with the time that the feature was installed on the instance, and cannot be reset.

SELECT counter_name, counter_value   
FROM sys.dm_external_script_execution_stats   
WHERE language = 'R';

-- R Services (In-database) provides a set of extended events to use in troubleshooting operations related to the SQL Server Trusted Launchpad or R jobs sent to SQL Server.
-- However, some additional extended events for R Services (In-database) are fired only from external processes, such as the SQL Server Trusted Launchpad, and BXLServer, the satellite process that starts the R runtime

select o.name, o.description  
from sys.dm_xe_objects o  
join sys.dm_xe_packages p  
on o.package_guid = p.guid  
where o.object_type = 'event'  
and p.name = 'SQLSatellite'  
order by o.name;  

-- R Services (In-database) starts some services that run outside of the SQL Server process. To capture events related to these external processes, you must create an events trace configuration file and place the file in the same directory as the executable for the process.


-- SQL Server Trusted Launchpad , or the Launchpad
-- In a default installation, this would be 
-- C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn


-- BXLServer is the satellite process that supports SQL extensibility with R and other external script languages.
-- In a default installation, this would be 
-- C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES\library\RevoScaleR\rxLibs\x64





Comments

Popular posts from this blog

Desempeño de SQL Server 2008 R2 y Max Worker Threads

Cómo identificar consultas más pesadas en SQL Server

SQL Server La longitud de los datos LOB (2200100) que se van a replicar excede el máximo configurado 65536.