diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Active Sessions.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Active Sessions.rdl
new file mode 100644
index 00000000..17f4dee5
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Active Sessions.rdl
@@ -0,0 +1,1590 @@
+
+
+ This report provides SQL Server Machine Learning Services configuration information.
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.
+ true
+
+ Integrated
+ f68705bb-df33-493e-b2ea-e8070ba8d88b
+
+
+
+
+
+ SqlConnection
+ 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;
+ true
+
+
+
+ session_id
+ System.Int16
+
+
+ blocking_session_id
+ System.Int16
+
+
+ status
+ System.String
+
+
+ wait_type
+ System.String
+
+
+ database_name
+ System.String
+
+
+ login_name
+ System.String
+
+
+ wait_time
+ System.Int32
+
+
+ last_wait_type
+ System.String
+
+
+ total_elapsed_time
+ System.Int32
+
+
+ reads
+ System.Int64
+
+
+ writes
+ System.Int64
+
+
+ logical_reads
+ System.Int64
+
+
+ script_type
+ System.String
+
+
+ degree_of_parallelism
+ System.Int32
+
+
+ external_user_name
+ System.String
+
+
+
+
+
+
+
+
+
+
+
+
+ 1in
+
+
+ 1in
+
+
+ 0.63333in
+
+
+ 1in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Total Elapsed Time (ms)
+
+
+
+
+
+
+ Textbox4
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Reads
+
+
+
+
+
+
+ Textbox5
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Logical Reads
+
+
+
+
+
+
+ Textbox29
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Writes
+
+
+
+
+
+
+ Textbox7
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!total_elapsed_time.Value)
+
+
+
+
+
+
+ total_elapsed_time
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!reads.Value)
+
+
+
+
+
+
+ reads
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!logical_reads.Value)
+
+
+
+
+
+
+ reads
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!writes.Value)
+
+
+
+
+
+
+ writes
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Session ID
+
+
+
+
+
+
+ Textbox23
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Blocking Session ID
+
+
+
+
+
+
+ Textbox21
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Status
+
+
+
+
+
+
+ Textbox19
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Wait Type
+
+
+
+
+
+
+ Textbox17
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Wait Time
+
+
+
+
+
+
+ Textbox27
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Last Wait Type
+
+
+
+
+
+
+ Textbox15
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.525in
+
+
+ true
+ true
+
+
+
+
+ Script Type
+
+
+
+
+
+
+ Textbox13
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.475in
+
+
+ true
+ true
+
+
+
+
+ DOP
+
+
+
+
+
+
+ Textbox11
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Database Name
+
+
+
+
+
+
+ Textbox10
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Login Name
+
+
+
+
+
+
+ Textbox2
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1.34167in
+
+
+ true
+ true
+
+
+
+
+ External User Name
+
+
+
+
+
+
+ Textbox9
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!session_id.Value
+
+
+
+
+ =Fields!session_id.Value
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!session_id.Value
+
+
+
+
+
+
+ session_id
+
+
+ #9eb6e4
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!blocking_session_id.Value
+
+
+
+
+ =Fields!blocking_session_id.Value
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!blocking_session_id.Value
+
+
+
+
+
+
+ blocking_session_id
+
+
+ #c6daf8
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!status.Value
+
+
+
+
+ =Fields!status.Value
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!status.Value
+
+
+
+
+
+
+ status
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!wait_type.Value
+
+
+
+
+ =Fields!wait_type.Value
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!wait_type.Value
+
+
+
+
+
+
+ wait_type
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!wait_time.Value
+
+
+
+
+
+
+ wait_time
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!last_wait_type.Value
+
+
+
+
+ =Fields!last_wait_type.Value
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!last_wait_type.Value
+
+
+
+
+
+
+ last_wait_type
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!script_type.Value
+
+
+
+
+ =Fields!script_type.Value
+
+
+
+ 0.525in
+
+
+ true
+ true
+
+
+
+
+ =Fields!script_type.Value
+
+
+
+
+
+
+ script_type
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!degree_of_parallelism.Value
+
+
+
+
+ =Fields!degree_of_parallelism.Value
+
+
+
+ 0.475in
+
+
+ true
+ true
+
+
+
+
+ =Fields!degree_of_parallelism.Value
+
+
+
+
+
+
+ degree_of_parallelism
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!database_name.Value
+
+
+
+
+
+
+ database_name
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!login_name.Value
+
+
+
+
+
+
+ login_name
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!external_user_name.Value
+
+
+
+
+ =Fields!external_user_name.Value
+
+
+
+ 1.34167in
+
+
+ true
+ true
+
+
+
+
+ =Fields!external_user_name.Value
+
+
+
+
+
+
+ external_user_name
+
+
+ #e6eefc
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ external_script_requests
+ 1.10833in
+ 0.5in
+ 13.975in
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Active Sessions
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 8in
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This report shows the currently executing external scripts (Ex: R or Python) on the server.
+
+
+
+
+
+
+ Textbox1
+ 0.46944in
+ 0.25in
+ 9in
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ View SQL script
+
+
+
+
+
+
+
+
+
+
+ =".\ML Services - Script"
+
+
+ SQL Server Machine Learning Services - Active Sessions
+
+
+ =DataSets("external_script_requests").CommandText
+
+
+
+
+
+
+ 0.78889in
+ 12.91667in
+ 0.25in
+ 1.05833in
+ 3
+ Click here to view the T-SQL script used to generate the data in the report.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 1.64667in
+
+
+
+
+ 13.975in
+
+
+ 0.45in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.2in
+ 9.975in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ localhost
+
+
+ ServerName
+ true
+
+
+ Inch
+ 2d6f122f-88fc-4fb4-9573-33bf83616a77
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Configuration.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Configuration.rdl
new file mode 100644
index 00000000..8df784e9
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Configuration.rdl
@@ -0,0 +1,1616 @@
+
+
+ This report provides SQL Server Machine Learning Services configuration information.
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.\SQL16
+ true
+
+ Integrated
+ b3217cf0-c85a-4901-908f-abd9144894c6
+
+
+
+
+
+ SqlConnection
+ /*
+ Retrieve the Machine Learning Services installation setting & configuration options:
+ Implied Authentication Configuration is checked by verifying if login exists for SQLRUserGroup
+*/
+select CAST(SERVERPROPERTY('IsAdvancedAnalyticsInstalled') as int) as IsMLServicesInstalled
+ , CAST(value_in_use as int) as ExternalScriptsEnabled
+ , COALESCE(SIGN(SUSER_ID(CONCAT(CAST(SERVERPROPERTY('MachineName') as nvarchar(128))
+ , '\SQLRUserGroup'
+ , CAST(serverproperty('InstanceName') as nvarchar(128)
+ )))), 0) as ImpliedAuthenticationEnabled
+ , coalesce((select cast(r.value_data as int)
+ from sys.dm_server_registry as r
+ where r.registry_key like 'HKLM\Software\Microsoft\Microsoft SQL Server\%\SuperSocketNetLib\Tcp'
+ and r.value_name = 'Enabled'), -1) as IsTcpEnabled
+ from sys.configurations
+ where name = 'external scripts enabled';
+ true
+
+
+
+ IsMLServicesInstalled
+ System.Int32
+
+
+ ExternalScriptsEnabled
+ System.Int32
+
+
+ ImpliedAuthenticationEnabled
+ System.Int32
+
+
+ IsTcpEnabled
+ System.Int32
+
+
+
+
+
+ SqlConnection
+ /*
+ Get R runtime properties
+*/
+if (select CAST(SERVERPROPERTY('IsAdvancedAnalyticsInstalled') as int) & CAST(value_in_use as int)
+ from sys.configurations
+ where name = 'external scripts enabled') = 1
+ and exists(select * from sys.dm_external_script_execution_stats where language = 'R')
+begin
+ exec sp_execute_external_script
+ @language = N'R'
+ , @script = N'
+ # Transform R version properties to data.frame
+ OutputDataSet <- data.frame(
+ property_name = c("R.version", "Revo.version", "MicrosoftML.version"),
+ property_value = c(paste(R.version$major, R.version$minor, sep = ".")
+ , paste(Revo.version$major, Revo.version$minor, sep = ".")
+ , ifelse(require("MicrosoftML"), as.character(packageVersion("MicrosoftML")), "<<NOT INSTALLED>>")),
+ stringsAsFactors = FALSE)
+ # Retrieve properties like R.home, libPath & default packages
+ OutputDataSet <- rbind(OutputDataSet, data.frame(
+ property_name = c("R.home", "libPaths", "defaultPackages"),
+ property_value = c(R.home(), .libPaths(), paste(getOption("defaultPackages"), collapse=", ")),
+ stringsAsFactors = FALSE)
+ )
+ '
+ with result sets ((property_name nvarchar(100), property_value nvarchar(4000)));
+end;
+ true
+
+
+
+ property_name
+ System.String
+
+
+ property_value
+ System.String
+
+
+
+
+
+ SqlConnection
+ /*
+ Check if restart of SQL Server instance is required:
+*/
+select (cast(value_in_use as int) ^ cast(value as int)) as IsRestartRequired
+ from sys.configurations
+ where name = 'external scripts enabled';
+ true
+
+
+
+ IsRestartRequired
+ true
+
+
+
+
+
+ SqlConnection
+ /*
+ Get Python runtime properties
+*/
+if (select CAST(SERVERPROPERTY('IsAdvancedAnalyticsInstalled') as int) & CAST(value_in_use as int)
+ from sys.configurations
+ where name = 'external scripts enabled') = 1
+ and exists(select * from sys.dm_external_script_execution_stats where language = 'Python')
+begin
+ -- Get Python runtime properties:
+ exec sp_execute_external_script
+ @language = N'Python'
+ , @script = N'
+import sys
+import pkg_resources
+OutputDataSet = pandas.DataFrame(
+ {"property_name": ["Python.home", "Python.version", "Revo.version", "MicrosoftML.version", "libpaths"],
+ "property_value": [sys.executable[:-10], sys.version, pkg_resources.get_distribution("revoscalepy").version, pkg_resources.get_distribution("microsoftml").version, str(sys.path)]}
+)
+'
+ with result sets ((property_name nvarchar(100), property_value nvarchar(4000)));
+end;
+
+
+
+ property_name
+ System.String
+
+
+ property_value
+ System.String
+
+
+
+
+
+ SqlConnection
+ /* Get list of installed language runtimes */
+select distinct language from sys.dm_external_script_execution_stats;
+
+
+
+ language
+ System.String
+
+
+
+
+
+
+
+
+
+
+
+
+ 1in
+
+
+
+
+ 0.23611in
+
+
+
+
+ true
+ true
+
+
+
+
+ Installed Runtimes
+
+
+
+
+
+
+ Textbox14
+
+
+ #384c70
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.23611in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!language.Value
+
+
+
+
+
+
+ language
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ Runtimes
+ 1.49583in
+ 0.47222in
+ 1in
+
+
+
+
+
+
+
+
+ 1.4875in
+
+
+ 7.15in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Python Runtime Property
+
+
+
+
+
+
+ Textbox8
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Property Value
+
+
+
+
+
+
+ Textbox9
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!property_name.Value
+
+
+
+
+
+
+ property_name
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!property_value.Value
+
+
+
+
+
+
+ property_value
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ Py_Properties
+ 2.65833in
+ 0.5in
+ 8.6375in
+ 1
+
+ =IIF(Count(Fields!property_name.Value, "Py_Properties") = 0, True, False)
+
+
+
+
+
+
+
+
+
+ 1in
+
+
+ 1in
+
+
+ 1.25833in
+
+
+ 1in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Machine Learning Services Installed
+
+
+
+
+
+
+ Textbox2
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ External Scripts Enabled
+
+
+
+
+
+
+ Textbox3
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Implied Authentication Enabled
+
+
+
+
+
+
+ Textbox5
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ TCP/IP Enabled
+
+
+
+
+
+
+ Textbox6
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.35833in
+
+
+
+
+
+
+
+ =First(Fields!IsMLServicesInstalled.Value)
+ 1
+ NoOutput
+
+ None
+ Tablix1
+
+ NaN
+ 1
+
+
+ NaN
+ 1
+
+ None
+
+ External
+
+
+ 1
+
+
+
+ 0
+ 1
+
+
+ 0
+ 1
+
+ Red
+ 1
+ ThreeSymbolCross
+
+ External
+
+
+
+
+
+ 1
+ 1
+
+
+ 1
+ 1
+
+ Green
+ 1
+ ThreeSymbolCheck
+
+ External
+
+
+
+
+ 0
+
+ ThreeCircledSymbols
+
+ 4
+ 4
+ 92
+ 92
+
+
+ true
+
+
+
+ Gainsboro
+ DiagonalLeft
+ Gray
+ None
+ 0pt
+
+
+
+
+
+ External
+
+
+
+
+ External
+
+
+ Feature_Settings
+
+
+ White
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!ExternalScriptsEnabled.Value)
+ 1
+ NoOutput
+
+ None
+ Tablix1
+
+ NaN
+ 1
+
+
+ NaN
+ 1
+
+ None
+
+ External
+
+
+ 1
+
+
+
+ 0
+ 1
+
+
+ 0
+ 1
+
+ Red
+ 1
+ ThreeSymbolCross
+
+ External
+
+
+
+
+
+ 1
+ 1
+
+
+ 1
+ 1
+
+ Green
+ 1
+ ThreeSymbolCheck
+
+ External
+
+
+
+
+ 0
+
+ ThreeCircledSymbols
+
+ 4
+ 4
+ 92
+ 92
+
+
+ true
+
+
+
+ Gainsboro
+ DiagonalLeft
+ Gray
+ None
+ 0pt
+
+
+
+
+
+ External
+
+
+
+
+ External
+
+
+ Feature_Settings
+
+
+ White
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!ImpliedAuthenticationEnabled.Value)
+ 1
+ NoOutput
+
+ None
+ Tablix1
+
+ NaN
+ 1
+
+
+ NaN
+ 1
+
+ None
+
+ External
+
+
+ 1
+
+
+
+ 0
+ 1
+
+
+ 0
+ 1
+
+ Red
+ 1
+ ThreeSymbolCross
+
+ External
+
+
+
+
+
+ 1
+ 1
+
+
+ 1
+ 1
+
+ Green
+ 1
+ ThreeSymbolCheck
+
+ External
+
+
+
+
+ 0
+
+ ThreeCircledSymbols
+
+ 4
+ 4
+ 92
+ 92
+
+
+ true
+
+
+
+ Gainsboro
+ DiagonalLeft
+ Gray
+ None
+ 0pt
+
+
+
+
+
+ External
+
+
+
+
+ External
+
+
+ Feature_Settings
+
+
+ White
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!IsTcpEnabled.Value)
+ 1
+ NoOutput
+
+ None
+ Tablix1
+
+ NaN
+ 1
+
+
+ NaN
+ 1
+
+ None
+
+ External
+
+
+ 1
+
+
+
+ 0
+ 1
+
+
+ 0
+ 1
+
+ Red
+ 1
+ ThreeSymbolCross
+
+ External
+
+
+
+
+
+ 1
+ 1
+
+
+ 1
+ 1
+
+ Green
+ 1
+ ThreeSymbolCheck
+
+ External
+
+
+
+
+
+ -1
+ 1
+ NoOutput
+
+
+ -1
+ 1
+ NoOutput
+
+ Orange
+ 1
+ ThreeSymbolUnCircledExclamation
+
+ External
+
+
+
+
+ 0
+
+ ThreeCircledSymbols
+
+ 4
+ 4
+ 92
+ 92
+
+
+ true
+
+
+
+ Gainsboro
+ DiagonalLeft
+ Gray
+ None
+ 0pt
+
+
+
+
+
+ External
+
+
+
+
+ External
+
+
+ Feature_Settings
+
+
+ White
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Feature_Settings
+ 0.84444in
+ 0.60833in
+ 4.25833in
+ 2
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Configuration
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 8in
+ 3
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This report provides configuration settings for SQL Server Machine Learning Services and properties of the R/Python installation. Click the "Configure Instance" buton when visible to configure instance for external scripts execution & implied authentication.
+
+
+
+
+
+
+ Textbox1
+ 0.51333in
+ 0.25in
+ 7.98333in
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ View SQL script
+
+
+
+
+
+
+
+
+
+
+ =".\ML Services - Script"
+
+
+ SQL Server Machine Learning Services - Configuration
+
+
+ =DataSets("Feature_Settings").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("IsRestartRequired").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("Runtimes").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("R_Properties").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("Py_Properties").CommandText
+
+
+
+
+
+
+ 0.84444in
+ 7.57917in
+ 0.25in
+ 1.05833in
+ 5
+ Click here to view the T-SQL script used to generate the data in the report.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Configure Instance
+
+
+
+
+
+
+
+
+
+
+ =".\ML Services - Configure Instance"
+
+
+
+
+ 1.20277in
+ 7.3875in
+ 0.25in
+ 1.25in
+ 6
+
+ =Sum(Fields!ExternalScriptsEnabled.Value, "Feature_Settings") = 1 And Sum(Fields!ImpliedAuthenticationEnabled.Value, "Feature_Settings") = 1
+
+ Click here to configure the instance for Machine Learning Services.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Restart of SQL Server instance is required for configuration changes to take effect.
+
+
+
+
+
+
+ Textbox4
+ 0.81889in
+ 4.46597in
+ 0.60833in
+ 2.85208in
+ 7
+
+ =IIF(First(Fields!Flag.Value, "IsRestartRequired") = 0, True, False)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+ 1.4875in
+
+
+ 7.15in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ R Runtime Property
+
+
+
+
+
+
+ Textbox8
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Property Value
+
+
+
+
+
+
+ Textbox9
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!property_name.Value
+
+
+
+
+
+
+ property_name
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!property_value.Value
+
+
+
+
+
+
+ property_value
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ R_Properties
+ 2.0375in
+ 0.5in
+ 8.6375in
+ 8
+
+ =IIF(Count(Fields!property_name.Value, "R_Properties") = 0, True, False)
+
+
+
+
+
+
+ 3.15833in
+
+
+
+
+ 8.66666in
+
+
+ 0.30417in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 6.6375in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ .\SQL17
+
+
+ ServerName
+ true
+
+
+ Inch
+ 9ab6c190-a62f-424e-a13a-102d103b4239
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Configure Instance.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Configure Instance.rdl
new file mode 100644
index 00000000..da0302ab
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Configure Instance.rdl
@@ -0,0 +1,247 @@
+
+
+ This report enables Machine Learning Services feature on the SQL Server instance
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.
+ true
+
+ Integrated
+ f68705bb-df33-493e-b2ea-e8070ba8d88b
+
+
+
+
+
+ SqlConnection
+ exec sp_configure 'external scripts enabled', 1;
+reconfigure with override;
+
+declare @login_name nvarchar(255) = CONCAT(cast(SERVERPROPERTY('MachineName') as nvarchar(128)), '\SQLRUserGroup', CAST(serverproperty('InstanceName') as nvarchar(128)));
+if SUSER_ID(@login_name) is null
+begin
+ set @login_name = QUOTENAME(@login_name);
+ exec('create login ' + @login_name + ' from windows;');
+end;
+
+select 'Machine Learning Services has been configured for use. SQL Server service needs to be restarted!' as Message
+ true
+
+
+
+ message
+ System.Int32
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Enable Instance Settings
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 8in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Executed script:
+
+
+
+
+
+
+ Textbox1
+ 0.44167in
+ 0.02333in
+ 0.25in
+ 1.10333in
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =DataSets("Reconfigure").CommandText
+
+
+
+
+
+
+ 0.79584in
+ 0.02334in
+ 0.25in
+ 8.95333in
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!message.Value, "Reconfigure")
+
+
+
+
+
+
+ message
+ 1.11528in
+ 0.02333in
+ 0.25in
+ 8.95334in
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 1.42167in
+
+
+
+
+ 9in
+
+
+ 0.45in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.2in
+ 7in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ localhost
+
+
+ ServerName
+ true
+
+
+ Inch
+ 2d6f122f-88fc-4fb4-9573-33bf83616a77
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Execution Statistics.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Execution Statistics.rdl
new file mode 100644
index 00000000..f4098765
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Execution Statistics.rdl
@@ -0,0 +1,805 @@
+
+
+ This report provides execution statistics for SQL Server Machine Learning Services.
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.\sql17
+ true
+
+ Integrated
+ f68705bb-df33-493e-b2ea-e8070ba8d88b
+
+
+
+
+
+ SqlConnection
+ /*
+ Retrieve execution statistics for external runtime (Ex: R or Python).
+ Only statistics of RevoScaleR or revoscalepy or microsoftml package functions are currently available.
+*/
+select language, counter_name, counter_value
+ from sys.dm_external_script_execution_stats
+ where counter_value > 0
+ order by language, case counter_name when 'script_executions' then 1 end;
+ true
+
+
+
+ language
+ System.String
+
+
+ counter_name
+ System.String
+
+
+ counter_value
+ System.Int64
+
+
+
+
+
+ SqlConnection
+ /*
+ Retrieve execution statistics for sp_execute_external_script calls.
+*/
+select rtrim(counter_name) as counter_name, cntr_value as counter_value
+ from sys.dm_os_performance_counters
+ where object_name like concat(case when serverproperty('InstanceName') is null
+ then 'SQLServer'
+ else concat('MSSQL$', cast(serverproperty('InstanceName') as varchar(60)))
+ end, ':External Scripts%');
+ true
+
+
+
+ counter_name
+ System.String
+
+
+ counter_value
+ System.Int64
+
+
+
+
+
+
+
+
+
+
+
+
+ 1in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Counter Value
+
+
+
+
+
+
+ Textbox9
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!counter_value.Value)
+
+
+
+
+
+
+ counter_value1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ Runtime
+
+
+
+
+
+
+ Textbox2
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1.63334in
+
+
+ true
+ true
+
+
+
+
+ Counter Name
+
+
+
+
+
+
+ Textbox10
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!counter_name.Value
+
+
+
+ 1in
+
+
+ true
+ true
+
+
+
+
+ =Fields!language.Value
+
+
+
+
+
+
+ language
+
+
+ #9eb6e4
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1.63334in
+
+
+ true
+ true
+
+
+
+
+ =Fields!counter_name.Value
+
+
+
+
+
+
+ counter_name1
+
+
+ #9eb6e4
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+ ml_statistics
+ 1.08056in
+ 3.89166in
+ 0.5in
+ 3.63334in
+
+
+
+
+
+
+
+
+ 1in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Counter Value
+
+
+
+
+
+
+ Textbox3
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!counter_value.Value)
+
+
+
+
+
+
+ counter_value
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2.25in
+
+
+ true
+ true
+
+
+
+
+ Counter Name
+
+
+
+
+
+
+ Textbox4
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!counter_name.Value
+
+
+
+
+ =Fields!counter_name.Value
+
+
+
+ 2.25in
+
+
+ true
+ true
+
+
+
+
+ =Fields!counter_name.Value
+
+
+
+
+
+
+ counter_name
+
+
+ #9eb6e4
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+ sp_execute_external_script_statistics
+ 1.08056in
+ 0.5in
+ 3.25in
+ 1
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Execution Statistics
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 8in
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This report provides the execution statistics of sp_execute_external_script system stored procedure and rx* functions in RevoScaleR or revoscalepy or microsoftml packages.
+
+
+
+
+
+
+ Textbox1
+ 0.46944in
+ 0.25in
+ 9in
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ View SQL script
+
+
+
+
+
+
+
+
+
+
+ =".\ML Services - Script"
+
+
+ SQL Server Machine Learning Services - Execution Statistics
+
+
+ =DataSets("ml_statistics").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("sp_execute_external_script_statistics").CommandText
+
+
+
+
+
+
+ 0.78889in
+ 7.81667in
+ 0.25in
+ 1.05833in
+ 4
+ Click here to view the T-SQL script used to generate the data in the report.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Statistics for sp_execute_external_script:
+
+
+
+
+
+
+ Textbox6
+ 0.78889in
+ 0.01333in
+ 0.25in
+ 2.65in
+ 5
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Statistics for runtimes:
+
+
+
+
+
+
+ Textbox6
+ 0.78889in
+ 3.89166in
+ 0.25in
+ 1.45625in
+ 6
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 1.61389in
+
+
+
+
+ 9in
+
+
+ 0.3875in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.075in
+ 7in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ localhost
+
+
+ ServerName
+ true
+
+
+ Inch
+ 2d6f122f-88fc-4fb4-9573-33bf83616a77
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Extended Events.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Extended Events.rdl
new file mode 100644
index 00000000..f449df8d
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Extended Events.rdl
@@ -0,0 +1,474 @@
+
+
+ This report provides the list of extended events used for troubleshooting SQL Server Machine Learning Services
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.
+ true
+
+ Integrated
+ f68705bb-df33-493e-b2ea-e8070ba8d88b
+
+
+
+
+
+ SqlConnection
+ /*
+ Get list of extended events from SQLSatellite package.
+*/
+select o.name as event_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';
+ true
+
+
+
+ event_name
+ System.String
+
+
+ description
+ System.String
+
+
+
+
+
+
+
+
+
+
+
+
+ 5.89167in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Description
+
+
+
+
+
+
+ Textbox3
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!description.Value
+
+
+
+
+
+
+ description
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2.98333in
+
+
+ true
+ true
+
+
+
+
+ Event Name
+
+
+
+
+
+
+ Textbox4
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ After
+
+
+
+
+ =Fields!event_name.Value
+
+
+
+
+ =Fields!event_name.Value
+
+
+
+ 2.98333in
+
+
+ true
+ true
+
+
+
+
+ =Fields!event_name.Value
+
+
+
+
+
+
+ event_name
+
+
+ #9eb6e4
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+ r_extended_events
+ 1.09167in
+ 0.5in
+ 8.875in
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Extended Events
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 8.23958in
+ 1
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This report lists the extended events available for SQL Server Machine Learning Services.The events are grouped in the package "SQLSatellite". Typically, the events of interest are satellite_data_receive_completion, satellite_data_send_completion, satellite_schema_received, and satellite_schema_sent to determine the stage of execution for the sp_execute_external_script call.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Additionally, there are extented events that can be configured for Launchpad service & BxlServer process.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ More details can be found at https://msdn.microsoft.com/en-us/library/mt628054.aspx.
+
+
+
+
+
+
+ Textbox1
+ 0.46944in
+ 0.25in
+ 8.875in
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ View SQL script
+
+
+
+
+
+
+
+
+
+
+ =".\R Services - Script"
+
+
+ SQL Server R Services - Extended Events
+
+
+ =DataSets("r_extended_events").CommandText
+
+
+
+
+
+
+ 0.78889in
+ 7.81667in
+ 0.25in
+ 1.05833in
+ 3
+ Click here to view the T-SQL script used to generate the data in the report.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 1.59167in
+
+
+
+
+ 8.90833in
+
+
+ 0.45in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.2in
+ 6.875in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ .
+
+
+ ServerName
+ true
+
+
+ Inch
+ 2d6f122f-88fc-4fb4-9573-33bf83616a77
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Packages.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Packages.rdl
new file mode 100644
index 00000000..645551e4
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Packages.rdl
@@ -0,0 +1,1176 @@
+
+
+ This report shows R packages installed on the SQL Server machine.
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.\sql17
+ true
+
+ Integrated
+ 888cc098-f33d-44a7-9758-c75f85be1817
+
+
+
+
+
+ SqlConnection
+ /*
+ Get list of installed packages:
+*/
+if (select CAST(SERVERPROPERTY('IsAdvancedAnalyticsInstalled') as int) & CAST(value_in_use as int)
+ from sys.configurations
+ where name = 'external scripts enabled') = 1
+begin
+ exec sp_execute_external_script
+ @language = N'R'
+ , @script = N'
+ # Use installed packages to determine packages installed in the R directory
+ OutputDataSet <- data.frame(installed.packages()[,c("Package", "Version", "Depends", "License", "Built", "LibPath")]);
+ '
+ with result sets ((Package nvarchar(255), Version nvarchar(100), Depends nvarchar(4000), License nvarchar(1000), Built nvarchar(100), LibPath nvarchar(2000)));
+end;
+ true
+
+
+
+ Package
+ System.String
+
+
+ Version
+ System.String
+
+
+ Depends
+ System.String
+
+
+ License
+ System.String
+
+
+ Built
+ System.String
+
+
+ LibPath
+ System.String
+
+
+
+
+
+ SqlConnection
+ /*
+ Get list of installed packages:
+*/
+if (select CAST(SERVERPROPERTY('IsAdvancedAnalyticsInstalled') as int) & CAST(value_in_use as int)
+ from sys.configurations
+ where name = 'external scripts enabled') = 1
+ and exists(select * from sys.dm_external_script_execution_stats where language = 'Python')
+begin
+ -- Get list of Python packages installed with SQL Server
+ exec sp_execute_external_script
+ @language = N'Python'
+ , @script = N'
+import pip
+OutputDataSet = pandas.DataFrame([(i.key, i.version, i.location) for i in pip.get_installed_distributions()])
+ '
+ with result sets ((Package nvarchar(128), Version nvarchar(128), Location nvarchar(1000)));
+end;
+
+
+
+ Package
+ System.String
+
+
+ Version
+ System.String
+
+
+ Location
+ System.String
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.82014in
+
+
+ 0.84723in
+
+
+ 7.74098in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Package
+
+
+
+
+
+
+ Textbox12
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Version
+
+
+
+
+
+
+ Textbox13
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Location
+
+
+
+
+
+
+ Textbox15
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Package.Value
+
+
+
+
+
+
+ Package1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Version.Value
+
+
+
+
+
+
+ Version1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Location.Value
+
+
+
+
+
+
+ Location
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ Py_Packages
+ 1.99694in
+ 0.5in
+ 10.40835in
+
+
+
+
+
+
+
+
+ 1.33056in
+
+
+ 0.84723in
+
+
+ 2.18331in
+
+
+ 1.725in
+
+
+ 0.53334in
+
+
+ 3.78891in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ Package
+
+
+
+
+
+
+ Textbox2
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Version
+
+
+
+
+
+
+ Textbox3
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Depends
+
+
+
+
+
+
+ Textbox5
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ License
+
+
+
+
+
+
+ Textbox7
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Built
+
+
+
+
+
+
+ Textbox9
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Lib Path
+
+
+
+
+
+
+ Textbox11
+
+
+ #4c68a2
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Package.Value
+
+
+
+
+
+
+ Package
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Version.Value
+
+
+
+
+
+
+ Version
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Depends.Value
+
+
+
+
+
+
+ Depends
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!License.Value
+
+
+
+
+
+
+ License
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Built.Value
+
+
+
+
+
+
+ Built
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!LibPath.Value
+
+
+
+
+
+
+ LibPath
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+ R_Packages
+
+ Between
+
+ 1.15in
+ 0.5in
+ 10.40835in
+ 1
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Installed Packages
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 10.40835in
+ 2
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This report displays few properties of the packages installed in the R_SERVICES or PYTHON_SERVICES directory of the SQL Server instance. Use this report to determine if a particular package is installed for use in SQL Server and the location of the package on the file system.
+
+
+
+
+
+
+ Textbox1
+ 0.41666in
+ 0.36667in
+ 10.40835in
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ View SQL script
+
+
+
+
+
+
+
+
+
+
+ =".\R Services - Script"
+
+
+ SQL Server R Services - Installed Packages
+
+
+ =DataSets("R_Packages").CommandText
+
+
+
+
+
+
+ 0.825in
+ 9.35002in
+ 0.25in
+ 1.05833in
+ 4
+ Click here to view the T-SQL script used to generate the data in the report.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Total number of R packages:
+
+
+
+
+
+
+ Textbox4
+ 0.85001in
+ 0.25in
+ 2.17779in
+ 5
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Count(Fields!Package.Value, "R_Packages")
+
+
+
+
+
+
+ 0.855in
+ 2.27167in
+ 0.25in
+ 1in
+ 6
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Total number of Python packages:
+
+
+
+
+
+
+ Textbox4
+ 1.71417in
+ 0.01834in
+ 0.25in
+ 2.50778in
+ 7
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Count(Fields!Package.Value, "Py_Packages")
+
+
+
+
+
+
+ 1.71916in
+ 2.54001in
+ 0.25in
+ 1in
+ 8
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 2.49694in
+
+
+
+
+ 10.45002in
+
+
+ 0.3875in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.075in
+ 8.40835in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ .
+
+
+ ServerName
+ true
+
+
+ Inch
+ 753a9ad3-917c-4031-85df-7d90218a26d3
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Resource Usage.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Resource Usage.rdl
new file mode 100644
index 00000000..94067899
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Resource Usage.rdl
@@ -0,0 +1,1970 @@
+
+
+ This report shows resource usage of Machine Learning Services.
+ Umachandar Jayachandran
+ 0
+
+
+
+ SQL
+ Data Source=.
+ true
+
+ Integrated
+ f68705bb-df33-493e-b2ea-e8070ba8d88b
+
+
+
+
+
+ SqlConnection
+ /*
+ Retrieve OS memory, SQL memory (current usage) & R Processes memory (peak)
+*/
+select physical_memory_kb
+ , committed_kb
+ , (select sum(peak_memory_kb)
+ from sys.dm_resource_governor_external_resource_pools as ep
+ ) as external_pool_peak_memory_kb
+ from sys.dm_os_sys_info;
+
+
+
+ physical_memory_kb
+ System.Int64
+
+
+ committed_kb
+ System.Int64
+
+
+ external_pool_peak_memory_kb
+ System.Int64
+
+
+
+
+
+ SqlConnection
+ /*
+ Get SQL resource pool & external resource pool statistics:
+*/
+select concat('SQL Server - ', p.name) as pool_name, p.total_cpu_usage_ms/60./60. as total_cpu_usage_hours, p.read_io_completed_total, p.write_io_completed_total
+ from sys.dm_resource_governor_resource_pools as p
+ union all
+select concat('External Pool - ', ep.name) as pool_name, ep.total_cpu_user_ms/60./60., ep.read_io_count, ep.write_io_count
+ from sys.dm_resource_governor_external_resource_pools as ep;
+ true
+
+
+
+ pool_name
+ System.String
+
+
+ total_cpu_usage_hours
+ System.Decimal
+
+
+ read_io_completed_total
+ System.Int64
+
+
+ write_io_completed_total
+ System.Int64
+
+
+
+
+
+ SqlConnection
+ /*
+ Retrieve memory configuration of SQL Server & External Resource Pools.
+ If SQL Sever is running with default then max_memory limit is considered as 100% of OS memory
+*/
+select 'SQL Server' as name
+ , case cast(c.value as bigint) when 2147483647 then 100 else (select physical_memory_kb from sys.dm_os_sys_info)/cast(c.value as bigint) end as max_memory_percent
+ from sys.configurations as c
+ where c.name like 'max server memory (MB)'
+ union all
+select concat('External Pool - ', ep.name) as pool_name, ep.max_memory_percent
+ from sys.dm_resource_governor_external_resource_pools as ep;
+ true
+
+
+
+ name
+ System.String
+
+
+ max_memory_percent
+ System.Int64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!pool_name.Value
+
+
+
+
+ =Fields!pool_name.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!total_cpu_usage_hours.Value)
+
+
+
+
+ #VALY
+
+
+
+
+ Output
+
+
+ Bar
+
+
+
+
+
+
+
+
+
+
+ Primary
+ Primary
+
+ Black
+ 0pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+ CPU Usage (Hours)
+
+
+
+ BrightPastel
+
+ #4c68a2
+ #b5dddf
+ #7292cc
+ #89bcc5
+ #c4d5f3
+ #c6c595
+ #87acf3
+ #7b9291
+ #a8c4ec
+ #a49ed4
+
+
+ Emboss
+
+
+
+ No Data Available
+
+
+ pool_statistics
+ 4.43055in
+ 2.93056in
+ 4.25in
+
+ 2pt
+
+ #c6daf8
+ TopBottom
+ #e6eefc
+
+
+
+
+
+
+
+
+ =Fields!name.Value
+
+
+
+
+ =Fields!name.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!max_memory_percent.Value)
+
+
+
+
+ #VALY
+
+
+
+
+ Output
+
+
+ Bar
+ Stacked
+
+
+
+
+
+
+
+
+
+
+
+ Max Percent
+
+ Primary
+ Primary
+
+ Black
+ 0pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+ Max Memory Setting (%)
+
+
+
+ BrightPastel
+
+ #4c68a2
+ #b5dddf
+ #7292cc
+ #89bcc5
+ #c4d5f3
+ #c6c595
+ #87acf3
+ #7b9291
+ #a8c4ec
+ #a49ed4
+
+
+ Emboss
+
+
+
+ No Data Available
+
+
+ memory_limits
+ 1.31944in
+ 4.31944in
+ 3in
+ 4.9in
+ 1
+
+ 2pt
+
+ #c6daf8
+ TopBottom
+ #e6eefc
+
+
+
+
+
+
+
+
+ =Fields!pool_name.Value
+
+
+
+
+ =Fields!pool_name.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!read_io_completed_total.Value)
+
+
+
+
+ #VALY
+
+
+
+
+ Output
+
+
+ Bar
+
+
+
+
+
+
+
+
+
+
+
+ Reads
+
+ Primary
+ Primary
+
+ Black
+ 0pt
+
+
+
+
+
+
+ =Sum(Fields!write_io_completed_total.Value)
+
+
+
+
+ #VALY
+
+
+
+
+ Output
+
+
+ Bar
+
+
+
+
+
+
+
+
+
+
+
+ Writes
+
+ Primary
+ Primary
+
+ Black
+ 0pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Black
+ Black
+
+
+
+
+ IO Statistics (Count)
+
+
+
+ BrightPastel
+
+ #4c68a2
+ #b5dddf
+ #7292cc
+ #89bcc5
+ #c4d5f3
+ #c6c595
+ #87acf3
+ #7b9291
+ #a8c4ec
+ #a49ed4
+
+
+ Emboss
+
+
+
+ No Data Available
+
+
+ pool_statistics
+ 4.43055in
+ 4.31944in
+ 3in
+ 4.9in
+ 2
+
+ 2pt
+
+ #c6daf8
+ TopBottom
+ #e6eefc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Sum(Fields!physical_memory_kb.Value)
+
+
+
+ true
+
+ #VALY
+
+
+
+
+ Output
+
+ = "OS (" & Round(Fields!physical_memory_kb.Value/1024) & " MB)"
+
+
+
+ Shape
+ ExplodedPie
+
+
+
+
+
+
+
+
+
+
+ Primary
+ Primary
+
+ Black
+ 0pt
+
+
+
+
+
+
+ =Sum(Fields!committed_kb.Value)
+
+
+
+ true
+
+ #VALY
+
+
+
+
+ Output
+
+ = "SQL Server (" & Round(Fields!committed_kb.Value/1024) & " MB)"
+
+
+
+ Shape
+
+
+
+
+
+
+
+
+
+
+
+
+ PieDrawingStyle
+ Concave
+
+
+ Primary
+ Primary
+
+ Black
+ 0pt
+
+
+
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ NaN
+ NaN
+
+
+
+
+
+
+
+ Axis Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+ NaN
+ Opposite
+ NaN
+ NaN
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Black
+ Black
+
+
+
+
+ Current Memory Consumption
+
+
+
+ BrightPastel
+
+ #4c68a2
+ #b5dddf
+ #7292cc
+ #89bcc5
+ #c4d5f3
+ #c6c595
+ #87acf3
+ #7b9291
+ #a8c4ec
+ #a49ed4
+
+
+ Emboss
+
+
+
+ No Data Available
+
+
+ sql_memory_usage
+ 1.31944in
+ 3in
+ 4.25in
+ 3
+
+ 2pt
+
+ #c6daf8
+ TopBottom
+ #e6eefc
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - Resource Usage
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 8.24375in
+ 4
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+ 1.65833in
+
+
+
+
+ 0.25in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Round(Sum(Fields!external_pool_peak_memory_kb.Value, "sql_memory_usage")/1024) & " MB"
+
+
+
+
+
+
+ peak_memory_kb
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sql_memory_usage
+ 1in
+ 2.93333in
+ 0.25in
+ 1.65833in
+ 5
+
+
+
+
+
+ true
+ true
+
+
+
+
+ External Scripts - Peak Memory Usage:
+
+
+
+
+
+
+ Textbox3
+ 0.98833in
+ 0.08in
+ 0.25in
+ 2.7318in
+ 6
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This report provides detailed data on the resource consumption of Machine Learning Services with respect to SQL Server. Use this report to adjust external resource pool setting for external scripts.
+
+
+
+
+
+
+ Textbox1
+ 0.46944in
+ 0.375in
+ 8.24375in
+ 7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ View SQL script
+
+
+
+
+
+
+
+
+
+
+ =".\R Services - Script"
+
+
+ SQL Server R Services - Resource Usage
+
+
+ =DataSets("sql_memory_usage").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("memory_limits").CommandText & chr(13) & chr(10) & "go" & chr(13) & chr(10) & DataSets("pool_statistics").CommandText
+
+
+
+
+
+
+ 0.98833in
+ 8.075in
+ 0.25in
+ 1.05833in
+ 8
+ Click here to view the T-SQL script used to generate the data in the report.
+
+
+ LightGrey
+ Middle
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 7.55555in
+
+
+
+
+ 9.275in
+
+
+ 0.45in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.2in
+ 7.13333in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ .
+
+
+ ServerName
+ true
+
+
+ Inch
+ 2d6f122f-88fc-4fb4-9573-33bf83616a77
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Script.rdl b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Script.rdl
new file mode 100644
index 00000000..fb702956
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/ML Services - Script.rdl
@@ -0,0 +1,245 @@
+
+
+ 0
+
+
+
+ SQL
+ Data Source=.
+ true
+
+ Integrated
+ f68705bb-df33-493e-b2ea-e8070ba8d88b
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ SQL Server Machine Learning Services - T-SQL Script
+
+
+
+
+
+
+ Title
+ ReportTitle
+ 0.4in
+ 6in
+
+
+ LightGrey
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ This is the T-SQL script for generating the data in report:
+
+
+
+
+
+
+ Textbox1
+ 0.46944in
+ 0.03in
+ 0.25in
+ 3.50333in
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!SQLML_Script.Value
+
+
+
+
+
+
+ 0.80556in
+ 0.03in
+ 0.25in
+ 8.95333in
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!SQLML_ReportName.Value
+
+
+
+
+
+
+ Textbox1
+ 0.46944in
+ 3.56111in
+ 0.25in
+ 5.42222in
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 1.125in
+
+
+
+
+ 9.01667in
+
+
+ 0.45in
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Globals!ExecutionTime
+
+
+
+
+
+
+ ExecutionTime
+ 0.2in
+ 6.98333in
+ 0.25in
+ 2in
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 1in
+ 1in
+ 1in
+ 1in
+
+
+
+
+
+
+ String
+
+
+ .
+
+
+ ServerName
+ true
+
+
+ String
+
+
+ No Report
+
+
+ true
+ SQLML_ReportName
+ true
+
+
+ String
+
+
+ -- SQL Script
+
+
+ SQLML_Script
+ true
+
+
+ Inch
+ 2d6f122f-88fc-4fb4-9573-33bf83616a77
+
\ No newline at end of file
diff --git a/samples/features/machine-learning-services/ssms-custom-reports/README.md b/samples/features/machine-learning-services/ssms-custom-reports/README.md
new file mode 100644
index 00000000..89dfb36b
--- /dev/null
+++ b/samples/features/machine-learning-services/ssms-custom-reports/README.md
@@ -0,0 +1,88 @@
+# SSMS Custom Reports
+
+This sample provides custom reports for SQL Server R Services that can be viewed from SQL Server Management Studio. The reports can be used to view configuration information, resource usage, execution statistics, active sessions and other information about R Services.
+
+### Contents
+
+[About this sample](#about-this-sample)
+[Before you begin](#before-you-begin)
+[Run this sample](#run-this-sample)
+[Sample details](#sample-details)
+[Related links](#related-links)
+
+
+
+
+## About this sample
+
+
+- **Applies to:** SQL Server 2016 (or higher)
+- **Key features:**
+- **Workload:** SQL Server R Services, SQL Server Machine Learnign Services
+- **Programming Language:** T-SQL, R, Python
+- **Authors:** Umachandar Jayachandran
+- **Update history:** Custom reports for SQL Server Machine Learning Services to show configuration, resource usage & statistics.
+
+
+
+## Before you begin
+
+To run this sample, you need the following prerequisites.
+
+**Software prerequisites:**
+
+
+1. SQL Server 2016 with R Services installed
+1. SQL Server 2017 or higher with Machine Learning Services installed
+2. SQL Server Management Studio
+
+
+
+## Run this sample
+Installation instructions for Machine Learning Services can be found [here](https://msdn.microsoft.com/en-us/library/mt696069.aspx).
+
+To use custom reports from SQL Server Management Studio, follow the instructions from "[Add a custom report to Management Studio](https://msdn.microsoft.com/en-us/library/bb153687.aspx)" topic in SQL Server Books Online.
+
+
+
+## Sample details
+
+Custom reports for Machine Learning Services allow you to perform the following tasks from Object Explorer in SQL Server Management Studio. Add the reports to the server name in Object Explorer.
+
+1. Configuration of Machine Learning Services feature after Installation
+2. View list of R or Python packages installed on the SQL Server instance
+3. View resource usage of external scripts and resource governance settings
+4. View list of extended events for Machine Learning Services
+5. View execution statistics for external scripts
+6. View sessions that are currently executing external scripts
+
+### R Services - Configuration.rdl
+
+This report can be used to view the installation settings of Machine Learning Services and properties of the R or Python runtime. You can also use this report to configure Machine Learning Services after installation.
+
+### R Services - Packages.rdl
+
+This report lists the R or Python packages installed on the SQL Server instance and properties like version, name.
+
+### R Services - Resource Usage.rdl
+
+This report can be used to view the CPU, Memory, IO consumption of SQL Server & external scripts execution. You can also view the memory setting of external resource pools.
+
+### R Services - Extended Events.rdl
+
+This report can be used to view the extended events that are available to get more insights into external scripts execution.
+
+### R Services - Execution Statistics.rdl
+
+This report can be used to view the execution statistics of Machine Learning services. For example, you can get the total number of external scripts executions, number of parallel executions and frequently used RevoScaleR functions.
+
+
+
+## Related Links
+
+
+For additional content, see these articles:
+
+[SQL Server Machine Learning Services - Upgrade and Installation FAQ](https://msdn.microsoft.com/en-us/library/mt653951.aspx)
+
+[SQL Server Machine Learning Services Tutorials](https://msdn.microsoft.com/en-us/library/mt591993.aspx)
\ No newline at end of file