<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5205277480698189450</id><updated>2026-10-12T09:16:27.972+02:00</updated><category term="SQL Server"/><category term="AlwaysOn"/><category term="Availability Group"/><category term="High Availability"/><category term="Read Only Routing"/><category term="SQL Server 2012"/><category term="SQL Server microsoft performance tuning data collector"/><category term="Trigger"/><category term="Asynchronous"/><category term="Backup Windows 2008 R2 Server Core"/><category term="DML"/><category term="Edition"/><category term="Hyper-V"/><category term="IIS Apache errore WEB 80 IP"/><category term="Licence"/><category term="Microsoft"/><category term="Microsoft Events Virtual Lab"/><category term="Office"/><category term="Power Shell"/><category term="Powershell"/><category term="Price"/><category term="Product Keys"/><category term="ReadyBoost Windows 7 XP vista RAM"/><category term="Script"/><category term="Software Assurance"/><category term="Windows"/><category term="audit"/><category term="events"/><category term="hostname"/><category term="security"/><title type='text'>Ruggiero Lauria Microsoft Tech</title><subtitle type='html'>Blog tecnico di Ruggiero Lauria&#xa;Microsoft Certified Trainer&#xa;Microsoft Certified IT Professional &#xa;Microsoft Certified System Engineer&#xa;Microsoft SQL Server DBA&#xa;Microsoft Windows Server&#xa;Microsoft Hyper-V</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-492358972956839279</id><published>2019-01-18T19:09:00.000+01:00</published><updated>2019-01-18T19:09:32.609+01:00</updated><title type='text'>SQL Server Script to move Database Files</title><content type='html'>Please consider that the below script uses the xp_cmdshell to issue&amp;nbsp; the files move commands to the underlying OS.&lt;br /&gt;
&lt;br /&gt;
It isn&#39;t default enabled on SQL Server Instances.&lt;br /&gt;
Be sure to enable this feature before running the script.&lt;br /&gt;
You can do it issuing these commands:&lt;br /&gt;
&lt;br /&gt;
EXEC sp_configure &#39;show advanced options&#39;, 1;&amp;nbsp;&lt;br /&gt;
GO&amp;nbsp;&lt;br /&gt;
-- To update the currently configured value for advanced options.&amp;nbsp;&lt;br /&gt;
RECONFIGURE;&amp;nbsp;&lt;br /&gt;
GO&amp;nbsp;&lt;br /&gt;
-- To enable the feature.&amp;nbsp;&lt;br /&gt;
EXEC sp_configure &#39;xp_cmdshell&#39;, 1;&amp;nbsp;&lt;br /&gt;
GO&amp;nbsp;&lt;br /&gt;
-- To update the currently configured value for this feature.&amp;nbsp;&lt;br /&gt;
RECONFIGURE;&amp;nbsp;&lt;br /&gt;
GO&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
This script accepts 2 parameters:&lt;br /&gt;
@Dbname - Data Base Name to move&lt;br /&gt;
@UseDFDir - Use the SQL Server Instance Defaults paths&amp;nbsp; 0 = No, 1 = Yes&lt;br /&gt;
&lt;br /&gt;
If you are not willing to use the&amp;nbsp; defaults be sure to set the correct paths in the script after the header:&lt;br /&gt;
&lt;br /&gt;
declare @new_data_file_path nvarchar(300) = LOWER(&#39;f\SQLDati&#39;)&lt;br /&gt;
declare @new_log_file_path nvarchar(300) = LOWER(&#39;l:\SQLLogs&#39;)&lt;br /&gt;
&lt;br /&gt;
You can check/set the default DB paths in the SQL Server properties&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVlj7jrB4NTLrws6dU_ec3heoYLMfG4Xn9hPb_WiiD9WaxdKAYUCc38sfEIEVJv4QJcxRuVSUYy5PqUM5XIfS40U9w_g_VS_VIRFDwDuSSKWJoqNIPAknFGbN3FgNdbBm3SXimhyqBQQI/s1600/SQLServer_DB_Files.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;700&quot; data-original-width=&quot;696&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVlj7jrB4NTLrws6dU_ec3heoYLMfG4Xn9hPb_WiiD9WaxdKAYUCc38sfEIEVJv4QJcxRuVSUYy5PqUM5XIfS40U9w_g_VS_VIRFDwDuSSKWJoqNIPAknFGbN3FgNdbBm3SXimhyqBQQI/s320/SQLServer_DB_Files.jpg&quot; width=&quot;318&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The script creates the&amp;nbsp;&amp;nbsp;dbo.movedbfiles StorePorcedure you can use launch it like this:&lt;br /&gt;
&lt;br /&gt;
exec dbo.movedbfiles &#39;logtest&#39;, 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------&amp;nbsp; Script Start ------------------------------&lt;br /&gt;
&lt;br /&gt;
create PROCEDURE dbo.MoveDBFiles @DBname varchar(300), @UseDFDir int = 0&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
AS&amp;nbsp;&lt;br /&gt;
set nocount on;&lt;br /&gt;
/*&lt;br /&gt;
Title: Move Database Files&lt;br /&gt;
Created:&amp;nbsp; 18-01-2019&lt;br /&gt;
By: Ruggiero Lauria&lt;br /&gt;
&lt;br /&gt;
Steps: 1,change file location, 2, take db offline, 3, copy files, 4,take database back online&lt;br /&gt;
&lt;br /&gt;
Input: Change the values for the following variables&lt;br /&gt;
@Dbname - Data Base Name to move&lt;br /&gt;
@UseDFDir - Use the SQL Server Instance Defaults paths&amp;nbsp; 0 = No, 1 = Yes&lt;br /&gt;
&lt;br /&gt;
Example: exec dbo.MoveDBFiles &#39;Db1&#39; , 1&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
Ensure that paths are set correctly prior to running scripts&lt;br /&gt;
Ensure you have enabled the xp_cmdshell on your instance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The script is provided as it is and for free, use it at your own risk.&lt;br /&gt;
Feel free to modify and distribute it&lt;br /&gt;
&lt;br /&gt;
Credits:&lt;br /&gt;
Thanks to Christopher Provolt for the initial script template I have used to create mine:&lt;br /&gt;
https://cprovolt.wordpress.com/2014/09/10/move-database-files-script/&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* Set your desired Directory if you ar not using the SQL Server Instance Defaults paths&amp;nbsp; @UseDFDir = 0 */&lt;br /&gt;
declare @new_data_file_path nvarchar(300) = LOWER(&#39;f\SQLDati&#39;)&lt;br /&gt;
declare @new_log_file_path nvarchar(300) = LOWER(&#39;l:\SQLLogs&#39;)&lt;br /&gt;
&lt;br /&gt;
/* Temp Table to hold script messages */&lt;br /&gt;
&lt;br /&gt;
declare @message table&lt;br /&gt;
(&lt;br /&gt;
msg_num int,&lt;br /&gt;
message_text nvarchar(300)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
/*Check if the DB exists and is not a System Database */&lt;br /&gt;
if (select database_id from sys.databases where name= @dbname) &amp;lt; 5 or (select count(*) from sys.databases where name= @dbname) = 0&lt;br /&gt;
&lt;br /&gt;
insert into @message values((select count(*) from @message) + 1, &#39;Please check you DB Name, consider this procedure does not process System Databases&#39;)&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp;begin&lt;br /&gt;
&amp;nbsp;insert into @message values((select count(*) from @message) + 1, &#39;Processing Database: &#39; + @DBname )&lt;br /&gt;
&lt;br /&gt;
/* Load the Instance default paths settings */&lt;br /&gt;
if (@UseDFDir =1)&lt;br /&gt;
begin&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set @new_data_file_path = (select left(cast(serverproperty(&#39;InstanceDefaultDataPath&#39;) as varchar(100)), len(cast(serverproperty(&#39;InstanceDefaultDataPath&#39;) as nvarchar(100)) )&amp;nbsp; &amp;nbsp;-1))&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set @new_log_file_path = (select left(cast(serverproperty(&#39;InstanceDefaultLogPath&#39;) as varchar(100)), len(cast(serverproperty(&#39;InstanceDefaultLogPath&#39;) as nvarchar(100)) )&amp;nbsp; &amp;nbsp;-1))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Dynamic table to hold information on database files and their locations&lt;br /&gt;
we will use this data to create the required move scripts&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
declare @info table&lt;br /&gt;
(&lt;br /&gt;
id int primary key identity,&lt;br /&gt;
database_id int,&lt;br /&gt;
dbname varchar (50),&lt;br /&gt;
virtual_file_name varchar(50),&lt;br /&gt;
type_desc varchar(10),&lt;br /&gt;
db_file_name varchar(50),&lt;br /&gt;
file_path varchar(300)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
/* Dynamic table to hold all the scripting lines created.&lt;br /&gt;
&lt;br /&gt;
Steps: 1,change file location, 2, take db offline, 3, copy files, 4,database online&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
declare @scripts table&lt;br /&gt;
(&lt;br /&gt;
step int,&lt;br /&gt;
scriptText varchar(300),&lt;br /&gt;
commtype char(4)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
/* Dynamic table to store the changes that are to be made.&lt;br /&gt;
This data can be pasted into an email to inform customer of the changes&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* Variable Decleration Area */&lt;br /&gt;
declare @id int; --id is created on temp table to use in cursor for processing data&lt;br /&gt;
declare @old_file_location varchar(1000) --temporarily stores the old file location for comparisons&lt;br /&gt;
declare @tmpString varchar(1000) -- used to temporarily hold strings&lt;br /&gt;
declare @temp_dbname varchar(100) -- holds temp database name&lt;br /&gt;
declare @temp_virtual_file_name varchar(100) -- holds temp virtual file name&lt;br /&gt;
declare @temp_file_name varchar(100) -- holds temp file name&lt;br /&gt;
declare @temp_old_file_location varchar(1000) --holds old location of the file&lt;br /&gt;
declare @new_file_path varchar(1000) --holds new location of the file&lt;br /&gt;
declare @num int = 0 -- Internal row counter&lt;br /&gt;
declare @numrows int -- Total number of files to move for the specified DB&lt;br /&gt;
declare @command nvarchar(1000) -- used to temporarily hold command to launch&lt;br /&gt;
declare @commtype char(4) -- used to temporarily hold command type to launch&lt;br /&gt;
&lt;br /&gt;
/* get required data and place into @info dynamic table */&lt;br /&gt;
insert into @info&lt;br /&gt;
select mf.database_id,&lt;br /&gt;
db.name as &#39;dbname&#39;,&lt;br /&gt;
mf.name as &#39;virtual_file_name&#39;,&lt;br /&gt;
mf.type_desc,&lt;br /&gt;
REVERSE(SUBSTRING(REVERSE(mf.physical_name), 0, CHARINDEX(&#39;\&#39;, REVERSE(mf.physical_name)))) as &#39;db_file_name&#39;,&lt;br /&gt;
LOWER(SUBSTRING(mf.physical_name, 0, LEN(mf.physical_name) - CHARINDEX(&#39;\&#39;, REVERSE(mf.physical_name)) + 1)) as &#39;file_path&#39;&lt;br /&gt;
from sys.master_files mf&lt;br /&gt;
INNER JOIN sys.databases db ON mf.database_id = db.database_id&lt;br /&gt;
where mf.database_id IN&lt;br /&gt;
(Select database_id from sys.databases&lt;br /&gt;
where sys.databases.name = @dbname)&lt;br /&gt;
&lt;br /&gt;
/* Create the scripted commands for the files */&lt;br /&gt;
&lt;br /&gt;
/* Count the number of files to move */&lt;br /&gt;
set @numrows = (select count(*) from @info )&lt;br /&gt;
&lt;br /&gt;
/* Create a cursor on @info table&amp;nbsp; */&lt;br /&gt;
declare c cursor for select id from @info&lt;br /&gt;
open c&lt;br /&gt;
fetch next from c into @id&lt;br /&gt;
&lt;br /&gt;
while @@fetch_Status=0 Begin&lt;br /&gt;
&lt;br /&gt;
/* Assign required values into variables from @info db */&lt;br /&gt;
select @old_file_location = i.file_path,&lt;br /&gt;
@temp_virtual_file_name = i.virtual_file_name,&lt;br /&gt;
@new_file_path = case i.type_desc when &#39;ROWS&#39; then @new_data_file_path&amp;nbsp; when &#39;LOG&#39; then @new_log_file_path else &#39;&#39; end,&lt;br /&gt;
@temp_file_name = i.db_file_name,&lt;br /&gt;
@temp_dbname = i.dbname,&lt;br /&gt;
@temp_old_file_location = i.file_path&lt;br /&gt;
from @info i&lt;br /&gt;
where id = @id&lt;br /&gt;
&lt;br /&gt;
/* check if we need to move the files */&lt;br /&gt;
if (@old_file_location &amp;lt;&amp;gt; @new_file_path and @new_file_path &amp;lt;&amp;gt;&#39;&#39;)&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&amp;nbsp;-- select @old_file_location,&amp;nbsp; @new_file_path&lt;br /&gt;
/* if we have to move files generate the scripts */&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;set @num = @num +1&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;select @num as num, @numrows as numrows&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;set @tmpString = &#39;ALTER DATABASE [&#39; + @temp_dbname + &#39;] MODIFY FILE (NAME=[&#39; + @temp_virtual_file_name + &#39;], FILENAME=&#39;&#39;&#39; + @new_file_path +&#39;\&#39; +&amp;nbsp; &amp;nbsp;@temp_file_name+ &#39;&#39;&#39;)&#39;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;insert into @scripts values(@num, @tmpString, &#39;TSQL&#39;)&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;set @tmpString = &#39;MOVE /Y &quot;&#39; + @old_file_location + &#39;\&#39; + @temp_file_name + &#39;&quot; &quot;&#39; + @new_file_path&amp;nbsp; +&#39;\&#39; + @temp_file_name + &#39;&quot;&#39;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; insert into @scripts values(@num+@numrows+1, @tmpString, &#39;CMD&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;end&lt;br /&gt;
&lt;br /&gt;
fetch next from c into @id&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
if @num &amp;gt; 0&lt;br /&gt;
begin&lt;br /&gt;
&amp;nbsp; set @tmpString = &#39;ALTER DATABASE [&#39; + @temp_dbname +&#39;] SET OFFLINE WITH ROLLBACK IMMEDIATE&#39;;&lt;br /&gt;
&amp;nbsp; insert into @scripts values(@numrows +1, @tmpString, &#39;TSQL&#39;)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; set @tmpString = &#39;ALTER DATABASE [&#39; + @temp_dbname +&#39;] SET ONLINE&#39;;&lt;br /&gt;
&amp;nbsp; insert into @scripts values(@numrows * 2 +2, @tmpString, &#39;TSQL&#39;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
/* Close and deallocate the cursor so we can use it again for dealing with log files */&lt;br /&gt;
close c&lt;br /&gt;
deallocate c&lt;br /&gt;
&lt;br /&gt;
/* Display the scripts to run */&lt;br /&gt;
--select * from @scripts order by step&lt;br /&gt;
&lt;br /&gt;
/* Executes the commands */&lt;br /&gt;
&lt;br /&gt;
if @num &amp;gt; 0&lt;br /&gt;
begin&lt;br /&gt;
declare c cursor for select scriptText , commtype&amp;nbsp; from @scripts order by step&lt;br /&gt;
open c&lt;br /&gt;
fetch next from c into @command, @commtype&lt;br /&gt;
&lt;br /&gt;
while @@fetch_Status=0 Begin&lt;br /&gt;
&amp;nbsp; if @commtype = &#39;TSQL&#39;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; begin&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;insert into @message values((select count(*) from @message) + 1,&amp;nbsp; &#39;Executing TSQL: &#39; + @command)&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;EXECUTE sp_executesql&amp;nbsp; @Command;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; end&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; begin&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert into @message values((select count(*) from @message) + 1,&amp;nbsp; &#39;Executing XP Command: &#39; + @command)&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;EXEC xp_cmdshell @Command;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end&lt;br /&gt;
&lt;br /&gt;
fetch next from c into @command, @commtype&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
close c&lt;br /&gt;
deallocate c&lt;br /&gt;
end&lt;br /&gt;
else&lt;br /&gt;
insert into @message values((select count(*) from @message) + 1, &#39;DB Files are already in the desired Directories. Nothing to do!&#39; )&lt;br /&gt;
end&lt;br /&gt;
select message_text&amp;nbsp; from @message order by msg_num&lt;br /&gt;
go&lt;br /&gt;
&lt;br /&gt;
-------------------------&amp;nbsp; Script end ------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/492358972956839279/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2019/01/sql-server-script-to-move-database-files.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/492358972956839279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/492358972956839279'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2019/01/sql-server-script-to-move-database-files.html' title='SQL Server Script to move Database Files'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVlj7jrB4NTLrws6dU_ec3heoYLMfG4Xn9hPb_WiiD9WaxdKAYUCc38sfEIEVJv4QJcxRuVSUYy5PqUM5XIfS40U9w_g_VS_VIRFDwDuSSKWJoqNIPAknFGbN3FgNdbBm3SXimhyqBQQI/s72-c/SQLServer_DB_Files.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-5867719483220915749</id><published>2016-05-06T15:31:00.004+02:00</published><updated>2016-05-07T23:21:01.378+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Edition"/><category scheme="http://www.blogger.com/atom/ns#" term="Licence"/><category scheme="http://www.blogger.com/atom/ns#" term="Price"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Assurance"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Some Considerations about SQL Server editions and pricing</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://redmondmag.com/articles/2011/11/05/~/media/ECG/redmondmag/Images/2011/11/sql_server_2012_lic_lg.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;186&quot; src=&quot;https://redmondmag.com/articles/2011/11/05/~/media/ECG/redmondmag/Images/2011/11/sql_server_2012_lic_lg.ashx&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;Firts of all let me say I definitively love SQL Server and I&#39;m really impressed about the product technical improvements in the last years, including the stunning 2016 Version.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;But at the same time I am worried about the SQL Server &amp;nbsp;market positioning on non-enterprise customers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;Standard Edition price is growing too much, by my opinion.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;The free SQL Server Express edition is really too limited in terms of resources to work as a company central repository; Standard Edition can do this job well (altough the 128 GB RAM limitation can easly become a bottleneck), but, in many cases, affording a 10K licences price + the SA fee really becomes a serious obstacle &amp;nbsp;to the product adoption.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;Please take in consideration that there are millions of small customers, using only SQL Server standard features as backend for their ERP, accounting software, stock management and so on, that your pricing strategy is pushing away (and this is not only true for SQL Server).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;So, although I am quite sure that my words will be lost in the wind, I would like to give some non-technical suggestion:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;1) In SQL Server 2012 MS has introduced the BI Edition, why don’t cut off the Standard Edition &amp;nbsp;price as well as the BI features?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;2) MS is still selling SQL Server as a product (license) and as a service (Software Assurance); now is giving free licenses to customers migrating from Oracle, but they still have to pay the service (SA). Why don&#39;t do a step forward and decide to sell the whole product, for all customers, as a service eliminating the initial licence price?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;3) MS is already selling SQL Server nearly as a as a service in contexts like SPLAs,Enterprise Agreements and, of course, Azure &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;4) By my opinion Software Assurance is creating problems to both MS and Customers: MS is quite obligated to release a new Version every 2 years, and customers have to afford upgrading side costs; I think that adopting a more relaxed versioning can simpify the life to both parts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;5) Software Assurance covers the whole product price in about 3 years, please consider the benefits of a costant lifetime entroy and don&#39;t be so aggressive in terms of fees&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;6) In the next years a lot of customers will move to cloud, Azure fee can be seen as a Computing service + a Software Service fee, now if your clients are already paying a monthly SQL Server fee it would be very easy to move from/to the public cloud to/from the private cloud simply adding or removing the computing fee &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;Other SQL Server experts at the same time are &lt;a href=&quot;https://www.brentozar.com/archive/2016/05/ram-and-sympathy/?utm_source=Brent+Ozar+Unlimited%C2%AE+List&amp;amp;utm_campaign=d1ee0d85b8-RSS_EMAIL_CAMPAIGN&amp;amp;utm_medium=email&amp;amp;utm_term=0_8e3e861dd9-d1ee0d85b8-296433817#comments&quot; target=&quot;_blank&quot;&gt;complaining&lt;/a&gt; about the Standard Editions features limitations. &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; font-size: 15px; line-height: 21px;&quot;&gt;I think you have really developed a wonderfull product, but at the some time a discutable marketing strategy, that is positioning your product as an Enterprise solution even for the entry level editions; I hope I shouldn’t reskill myself on PostGress in the next years.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/5867719483220915749/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2016/05/some-considerations-about-sql-server.html#comment-form' title='8 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/5867719483220915749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/5867719483220915749'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2016/05/some-considerations-about-sql-server.html' title='Some Considerations about SQL Server editions and pricing'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-9182248442380484315</id><published>2016-02-10T10:41:00.004+01:00</published><updated>2016-10-20T14:42:14.513+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="audit"/><category scheme="http://www.blogger.com/atom/ns#" term="events"/><category scheme="http://www.blogger.com/atom/ns#" term="hostname"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Trigger"/><title type='text'>SQL Server: Audit Security events </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSMOoJckNUeA4Hr7bBfAyRDTO84C3waAPdMYzcKAvUxvks40TmEQa61zM-Ifa7iX0Ax97ITK7snQlNrfg_uWrD9J1DDCrIKNHO_aV5f9zTMQ5Hycr0nx5QCp9R5ydKNu_bEZTnorcVcXg/s1600/SQL+DDL+Trigger.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSMOoJckNUeA4Hr7bBfAyRDTO84C3waAPdMYzcKAvUxvks40TmEQa61zM-Ifa7iX0Ax97ITK7snQlNrfg_uWrD9J1DDCrIKNHO_aV5f9zTMQ5Hycr0nx5QCp9R5ydKNu_bEZTnorcVcXg/s400/SQL+DDL+Trigger.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Few days ago a customer asked me to implement a security auditing solution for their production instances of SQL Server, to track users and logins management events. I immediately thought about the native&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/cc280386(v=sql.120).aspx&quot; target=&quot;_blank&quot;&gt; SQL Audit&lt;/a&gt; function, but there was a problem, all users gain access to SQL Server with the same login, so to identify exactly who I had to capture the hostname field; unfortunately, the available fields in the SQL Server audits are predefined and not mdifiable (at least not easily) and among them the hostname is missing.&lt;br /&gt;
At that point I decided to use DDL triggers, which unlike the DML, have not a significant impact in terms of performances.&lt;br /&gt;
First of all we have to understand which events intercept, using this query you can have a hierarchical view of available events:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;WITH EventsReports (name, PARENT_TYPE, type, level, sort) AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT CONVERT (varchar (255), type_name), PARENT_TYPE, type, 1, CONVERT (varchar (255), type_name)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM sys.trigger_event_types&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; WHERE PARENT_TYPE &amp;nbsp;IS NULL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; UNION ALL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT CONVERT (varchar (255), REPLICATE ( &#39;|&#39;, level) + e.type_name),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.parent_type, e.type, level + 1,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; CONVERT (varchar (255), RTRIM (sort) + &#39;|&#39; + e.type_name)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; FROM sys.trigger_event_types &amp;nbsp;as e&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN EventsReports as d&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON &amp;nbsp;e.parent_type = &amp;nbsp;d.type&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;SELECT PARENT_TYPE, type, name&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;FROM EventsReports&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;-- where [name] like &#39;% object%&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;ORDER BY sort;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The event name is quite explicative, but in the dubt has a look &lt;a href=&quot;https://technet.microsoft.com/en-us/library/ms191441(v=sql.90).aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So we decided to track these events:&amp;nbsp;DDL_DATABASE_SECURITY_EVENTS, DDL_DATABASE_EVENTS, DDL_SERVER_SECURITY_EVENTS&lt;br /&gt;
&lt;br /&gt;
Then I have built the DDL trigger.&lt;br /&gt;
&lt;br /&gt;
First let&#39;s create a DB and the table that will store our events:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Create DataBase AdminDB;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;go&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;use AdminDB;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;go&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;CREATE TABLE dbo.DDL_Security_Audit_LOG&amp;nbsp;&amp;nbsp;( EventId int NOT NULL IDENTITY (1, 1) PRIMARY KEY, EventTime datetime , DbName nvarchar(100), EventType nvarchar(100) , UserName nvarchar(100) ,HostName nvarchar (100) , EventTSQL nvarchar(3000) , Data_XML xml);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then our DDL Trigger:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Create TRIGGER [DDL_Security_Audit]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;ON ALL SERVER&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;FOR DDL_DATABASE_SECURITY_EVENTS, DDL_DATABASE_EVENTS, DDL_SERVER_SECURITY_EVENTS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;Declare @ObjectName nvarchar(100) = &amp;nbsp;EVENTDATA().value(&#39;(/EVENT_INSTANCE/ObjectName)[1]&#39;, &#39;nvarchar(100)&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;Declare @EventType nvarchar(100) = &amp;nbsp;EVENTDATA().value(&#39;(/EVENT_INSTANCE/EventType)[1]&#39;, &#39;nvarchar(100)&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;Declare @DbName &amp;nbsp;nvarchar(100) = isnull( EVENTDATA().value(&#39;(/EVENT_INSTANCE/DatabaseName)[1]&#39;, &#39;nvarchar(1000)&#39;),&#39;Master&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;Declare @Command nvarchar(1000) = &amp;nbsp;EVENTDATA().value(&#39;(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]&#39;, &#39;nvarchar(1000)&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;INSERT INTO AdminDB.dbo.DDL_Security_Audit_LOG&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;VALUES ( GETDATE() , &amp;nbsp;@DbName, @EventType, suser_sname() , HOST_NAME(), @Command, EVENTDATA() &amp;nbsp;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Then remember to create a JOB to purge old data (if you want to)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Declare @CutOffDate datetime = &amp;nbsp;DATEDIFF(d, -30, getdate())&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Delete from AdminDB.dbo.DDL_Audit_Security_TABLE_LOG where EventTime &amp;lt; @CutOffDate&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now you have all info you need to monitor your security events at Server and DataBase level.&lt;br /&gt;
&lt;br /&gt;
Just notice in SQL Server there a security hole: no DDL events avalaible for disable Trigger action.&lt;br /&gt;
&lt;br /&gt;
(Thanks to Alessandro, Matteo, Simone and &quot;Rocco&quot; for allowing me to publish this)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/9182248442380484315/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2016/02/sql-server-audit-security-events.html#comment-form' title='5 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/9182248442380484315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/9182248442380484315'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2016/02/sql-server-audit-security-events.html' title='SQL Server: Audit Security events '/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSMOoJckNUeA4Hr7bBfAyRDTO84C3waAPdMYzcKAvUxvks40TmEQa61zM-Ifa7iX0Ax97ITK7snQlNrfg_uWrD9J1DDCrIKNHO_aV5f9zTMQ5Hycr0nx5QCp9R5ydKNu_bEZTnorcVcXg/s72-c/SQL+DDL+Trigger.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-3599399173076534485</id><published>2015-06-26T18:10:00.002+02:00</published><updated>2015-07-20T12:26:05.483+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="DML"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Trigger"/><title type='text'>SQL Server: Asynchronous DML Triggers</title><content type='html'>Great solution using SQL Server Service Broker:&lt;br /&gt;
http://www.madeirasql.com/service-broker-asynchronous-triggers/&lt;br /&gt;
&lt;br /&gt;
Use this version of &lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;SB_AT_HandleQueue (the original one doesn&#39;t work well):&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;





&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
 {font-family:&quot;Cambria Math&quot;;
 panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
 {font-family:&quot;Segoe UI&quot;;
 panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
 {font-family:Consolas;
 panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0cm;
 margin-right:0cm;
 margin-bottom:8.0pt;
 margin-left:0cm;
 line-height:107%;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,sans-serif;}
.MsoChpDefault
 {font-family:&quot;Calibri&quot;,sans-serif;}
.MsoPapDefault
 {margin-bottom:8.0pt;
 line-height:107%;}
 /* Page Definitions */
 @page WordSection1
 {size:612.0pt 792.0pt;
 margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;





&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;PROCEDURE&lt;/span&gt; [dbo]&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;[SB_AT_HandleQueue]&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;AS&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;NOCOUNT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ARITHABORT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; @msg &lt;span style=&quot;color: blue;&quot;&gt;XML&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; @DlgId &lt;span style=&quot;color: blue;&quot;&gt;UNIQUEIDENTIFIER&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; @Info &lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;max&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; @ErrorsCount &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; @ErrorsCount &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;
0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Set whether to log verbose status messages before
and after each operation&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; @Verbose &lt;span style=&quot;color: blue;&quot;&gt;BIT&lt;/span&gt;
&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 1&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Allow 10 retries in case of service broker errors&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;WHILE&lt;/span&gt; @ErrorsCount &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;
10&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRANSACTION&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRY&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Make sure queue is active&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;EXISTS&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; &lt;span style=&quot;color: lime;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt;service_queues&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; NAME &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;SB_AT_Request_Queue&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: grey;&quot;&gt;AND&lt;/span&gt; is_receive_enabled &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;
0&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;QUEUE&lt;/span&gt;
SB_AT_Request_Queue &lt;span style=&quot;color: blue;&quot;&gt;WITH&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;STATUS&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- handle one message at a time&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;WAITFOR&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;RECEIVE&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TOP&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;1&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@msg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;convert&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;message_body&lt;span style=&quot;color: grey;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@DlgId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;conversation_handle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; dbo&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;SB_AT_Request_Queue&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- exit when waiting has been timed out&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;@@ROWCOUNT&lt;/span&gt;
&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;@@TRANCOUNT&lt;/span&gt;
&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt; 0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;ROLLBACK&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRANSACTION&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BREAK&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;-- Retreive data from xml message&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@ProcedureName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;1000&lt;span style=&quot;color: grey;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@inserted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;XML&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@deleted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;XML&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@ProcedureName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; x&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;value&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;(/Request/ProcedureName)[1]&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;VARCHAR(1000)&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@inserted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; x&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;query&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;/Request/inserted/inserted&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@deleted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; x&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;query&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;/Request/deleted/deleted&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; @msg&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;nodes&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;/Request&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; T(X)&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Log operation start&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; @Verbose &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 1&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt;
SB_AT_ServiceBrokerLogs&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;ErrorSeverity&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorMessage&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;QueueMessage&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;0&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Starting Process&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;@msg&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Encapsulate execution in TRY..CATCH&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- to catch errors in the specific request&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRY&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Execute Request&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt; @ProcedureName @inserted&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; @deleted&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRY&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;CATCH&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- log operation fail&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt;
SB_AT_ServiceBrokerLogs&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;ErrorSeverity&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorMessage&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorLine&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorProc&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;QueueMessage&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_SEVERITY&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_MESSAGE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_LINE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_PROCEDURE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;@msg&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;CATCH&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- commit&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;@@TRANCOUNT&lt;/span&gt;
&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt; 0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;COMMIT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRANSACTION&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- Log operation end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; @Verbose &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 1&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt;
SB_AT_ServiceBrokerLogs&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;ErrorSeverity&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorMessage&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;QueueMessage&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;0&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Finished Process&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;@msg&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- reset xml message&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; @msg &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRY&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;CATCH&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- rollback transaction&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- this will also rollback the extraction of the
message from the queue&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;@@TRANCOUNT&lt;/span&gt;
&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt; 0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;ROLLBACK&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TRANSACTION&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- log operation fail&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt;
SB_AT_ServiceBrokerLogs&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;ErrorSeverity&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorMessage&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorLine&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ErrorProc&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;QueueMessage&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_SEVERITY&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_MESSAGE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_LINE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ERROR_PROCEDURE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(),&lt;/span&gt;@msg&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- increase error counter&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; @ErrorsCount &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;
@ErrorsCount &lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; 1&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;-- wait 5 seconds before retrying&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;WAITFOR&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;DELAY&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;00:00:05&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;CATCH&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/3599399173076534485/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2015/06/asynchronous-triggers.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/3599399173076534485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/3599399173076534485'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2015/06/asynchronous-triggers.html' title='SQL Server: Asynchronous DML Triggers'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-7370337299286245442</id><published>2014-03-28T16:37:00.000+01:00</published><updated>2014-04-17T15:32:25.025+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Office"/><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Product Keys"/><category scheme="http://www.blogger.com/atom/ns#" term="Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Powershell Script to retrieve Domain&#39;s Windows and Office Product Keys </title><content type='html'>Some customer asked me for this info, because managing&amp;nbsp; Product Keys over the time&amp;nbsp; can become a very time-wasting activity.&lt;br /&gt;
&lt;br /&gt;
First of all you have to enable the Remote Registry Service, as we are in Windows domain, you can easily do this using a GPO&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdNf6DmWiKUkL7AtLtFcHQf5QC_ZS8qBsXD1woZXSgQ_HaTamP_kBsG4jvpPWJig5l9rILfSES2ps8ECA-syXzdsMFGrBULDF31wl6ZE1KLqXtFHxd2nuNaa9ZBGjiP0GC9F91r2mXAAo/s1600/GPO+Remote+Registry.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdNf6DmWiKUkL7AtLtFcHQf5QC_ZS8qBsXD1woZXSgQ_HaTamP_kBsG4jvpPWJig5l9rILfSES2ps8ECA-syXzdsMFGrBULDF31wl6ZE1KLqXtFHxd2nuNaa9ZBGjiP0GC9F91r2mXAAo/s1600/GPO+Remote+Registry.jpg&quot; height=&quot;276&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
########################################################################################&lt;br /&gt;
# Script: GetMsProductKeys.ps1&lt;br /&gt;
# Objective: Get Windows and Office Product Keys from all domain computers&lt;br /&gt;
# created from: Ruggiero Lauria&lt;br /&gt;
# on : 25/03/2014&lt;br /&gt;
# &lt;br /&gt;
# http://ruggierolauria.blogspot.com&lt;br /&gt;
#&lt;br /&gt;
# Thanks to:&lt;br /&gt;
# http://poshcode.org/4488&lt;br /&gt;
# http://gallery.technet.microsoft.com/scriptcenter/Backup-Windows-product-key-b41468c2&lt;br /&gt;
########################################################################################&lt;br /&gt;
&lt;br /&gt;
# Start Functions definition&lt;br /&gt;
&lt;br /&gt;
# Get Windows Product Key&lt;br /&gt;
function Get-WindowsProductKey&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Param (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [string[]]$Computername = $Env:Computername,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $version&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $hklm = 2147483650&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Invoke the WMI RemoteRegistry access provider&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $wmi = [WMIClass] (&quot;\\&quot; + $Computername + &quot;\root\default:StdRegProv&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Load DigitalProductId value&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $values = [byte[]]($wmi.getbinaryvalue($hklm,&quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion&quot;,&quot;DigitalProductId&quot;).uvalue)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Select the correct decode function based on Windows Version&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($version -lt &quot;6.2&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproductid = Get-Windows7ProductKey($values)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproductid = Get-Windows8ProductKey($values)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproductid&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
#Decode Pre-Windows 8 Product Key&lt;br /&gt;
Function Get-Windows7ProductKey($Key)&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
$lookup = [char[]](&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;M&quot;,&quot;P&quot;,&quot;Q&quot;,&quot;R&quot;,&quot;T&quot;,&quot;V&quot;,&quot;W&quot;,&quot;X&quot;,&quot;Y&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyStartIndex = 0x34;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyEndIndex = [int]($keyStartIndex + 15);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $decodeLength = [int]29&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $decodeStringLength = [int]15&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $decodedChars = new-object char[] $decodeLength&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $hexPid = new-object System.Collections.ArrayList&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ($i = $keyStartIndex; $i -le $keyEndIndex; $i++){ [void]$hexPid.Add($values[$i]) }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ( $i = $decodeLength - 1; $i -ge 0; $i--)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (($i + 1) % 6 -eq 0){$decodedChars[$i] = &#39;-&#39;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $digitMapIndex = [int]0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ($j = $decodeStringLength - 1; $j -ge 0; $j--)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $byteValue = [int](($digitMapIndex * [int]256) -bor [byte]$hexPid[$j]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $hexPid[$j] = [byte] ([math]::Floor($byteValue / 24));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $digitMapIndex = $byteValue % 24;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $decodedChars[$i] = $lookup[$digitMapIndex];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; $keyproduct = &#39;&#39;&lt;br /&gt;
&amp;nbsp; $decodedChars | % { $keyproduct+=$_}&lt;br /&gt;
&amp;nbsp; $keyproduct&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
# Decode Windows 8 Product Key&lt;br /&gt;
Function Get-Windows8ProductKey($Key)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $Keyoffset = 52 &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $isWin8 = [int]($Key[66]/6) -band 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $HF7 = 0xF7&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $Key[66] = ($Key[66] -band $HF7) -bOr (($isWin8 -band 2) * 4)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $i = 24&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [String]$Chars = &quot;BCDFGHJKMPQRTVWXY2346789&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $Cur = 0 &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $X = 14&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $Cur = $Cur * 256&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $Cur = $Key[$X + $Keyoffset] + $Cur&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $Key[$X + $Keyoffset] = [math]::Floor([double]($Cur/24))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $Cur = $Cur % 24&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $X = $X - 1 &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }while($X -ge 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $i = $i- 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $KeyOutput = $Chars.SubString($Cur,1) + $KeyOutput&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $last = $Cur&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }while($i -ge 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $Keypart1 = $KeyOutput.SubString(1,$last)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $Keypart2 = $KeyOutput.Substring(1,$KeyOutput.length-1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if($last -eq 0 )&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $KeyOutput = &quot;N&quot; + $Keypart2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $KeyOutput = $Keypart2.Insert($Keypart2.IndexOf($Keypart1)+$Keypart1.length,&quot;N&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $a = $KeyOutput.Substring(0,5)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $b = $KeyOutput.substring(5,5)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $c = $KeyOutput.substring(10,5)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $d = $KeyOutput.substring(15,5)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $e = $KeyOutput.substring(20,5)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproduct = $a + &quot;-&quot; + $b + &quot;-&quot;+ $c + &quot;-&quot;+ $d + &quot;-&quot;+ $e&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproduct &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; # Get Microsoft Office Product Key &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; function Get-MSOfficeProductKey {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Param(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [string[]]$Computername = $Env:Computername&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $product = @()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $hklm = 2147483650&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; # If DigitalProductId not found in hklm\SOFTWARE\Microsoft\Office\..&lt;br /&gt;
&amp;nbsp;&amp;nbsp; # may be we have Office 32 Bit on 64 bit OS so the registry path becomes: SOFTWARE\Wow6432node\Microsoft\Office\..&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $path = @(&quot;SOFTWARE\Wow6432node\Microsoft\Office&quot;,&quot;SOFTWARE\Microsoft\Office&quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for ($p = 1; $p -ge 0; $p--) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Invoke the WMI RemoteRegistry access provider&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $wmi = [WMIClass] (&quot;\\&quot; + $Computername + &quot;\root\default:StdRegProv&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Navigate 3 levels down the registry tree&amp;nbsp; starting from actual $ path to find DigitalProductID&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # i.e.&amp;nbsp; HKLM\SOFTWARE\Microsoft\Office\11.0\Registration\{90120410-6000-11D3-8CFE-0150048383C9}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subkeys1 = $wmi.EnumKey($hklm,$path[$p])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($subkey1 in $subkeys1.snames) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subkeys2 = $wmi.EnumKey($hklm,$path[$p]+&quot;\$subkey1&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($subkey2 in $subkeys2.snames) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subkeys3 = $wmi.EnumKey($hklm,$path[$p]+&quot;\$subkey1\$subkey2&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($subkey3 in $subkeys3.snames) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subkeys4 = $wmi.EnumValues($hklm,$path[$p]+&quot;\$subkey1\$subkey2\$subkey3&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($subkey4 in $subkeys4.snames) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Looking for DigitalProductID key&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($subkey4 -eq &quot;DigitalProductId&quot;) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Load DigitalProductId value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $values = [byte[]]($wmi.getbinaryvalue($hklm,$path[$p]+&quot;\$subkey1\$subkey2\$subkey3&quot;,&quot;DigitalProductId&quot;).uvalue)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $p = -1 # Key found: exit from path loop&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Decode DigitalProductId&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproductid = Get-Windows7ProductKey($values) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $keyproductid&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
# End Functions definition&lt;br /&gt;
&lt;br /&gt;
# Start of Script body&lt;br /&gt;
&lt;br /&gt;
# Define variables&lt;br /&gt;
$FilePath = &quot;C:\scripts\ProductKey&quot; # Change with your own path (must be created!) to store CSV output&lt;br /&gt;
$NewCSVObject = @()&lt;br /&gt;
&lt;br /&gt;
# Write Columns headers: first output line&lt;br /&gt;
&lt;br /&gt;
$NewCSVObject | Select&amp;nbsp; &quot;ClientName&quot;,&quot;OSArchitecture&quot;, &quot;Username&quot; , &quot;Manufacturer&quot;, &quot;Model&quot;, &quot;Dev SerialNumber&quot; ,&quot;Office Version&quot;,&quot;Office SN&quot;, &quot;Caption&quot;, &quot;Version&quot;, &quot;RegisteredUser&quot;, &quot;OS SerialNumber&quot;, &quot;WindowsPK&quot; | Format-Table -AutoSize&lt;br /&gt;
&lt;br /&gt;
# Get the list of active computer in AD.&lt;br /&gt;
&lt;br /&gt;
Import-Module ActiveDirectory&lt;br /&gt;
$arrComputers = Get-ADComputer -Filter {enabled -eq $true} -properties *|select name | sort name&lt;br /&gt;
&lt;br /&gt;
#$arrComputers = Get-ADComputer -Filter {enabled -eq $true} -properties *|Where {$_.name -like &quot;nb-ac*&quot;} |select name | sort name&lt;br /&gt;
&lt;br /&gt;
# Computers Loop&lt;br /&gt;
foreach ($strComputer in $arrComputers)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;Write-Host $strComputer.name&lt;br /&gt;
&amp;nbsp;#Try to connect to the computer&lt;br /&gt;
&amp;nbsp;If (Test-Connection -ComputerName $strComputer.name -Count 1 -Quiet) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Inizialize a new row&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo = New-Object PSObject | Select&amp;nbsp; &quot;ClientName&quot;, &quot;OSArchitecture&quot;, &quot;Username&quot; ,&quot;Manufacturer&quot;, &quot;Model&quot;, &quot;DevSerialNumber&quot; ,&quot;OfficeVersion&quot;, &quot;OfficeSN&quot;, &quot;Caption&quot;, &quot;Version&quot;,&quot;RegisteredUser&quot;, &quot;OSSerialNumber&quot;, &quot;WindowsPK&quot; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get currently logged in username, client name, manufacturer and model from Win32_ComputerSystem class.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $colItems = Get-WmiObject Win32_ComputerSystem -Namespace &quot;root\CIMV2&quot; -ErrorAction stop -ComputerName $strComputer.name&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($objItem in $colItems) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.Username= $objItem.UserName&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.ClientName = $objItem.Name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.Manufacturer = $objItem.Manufacturer&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.Model = $objItem.Model&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get workstation serial number from Win32_BIOS class.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $colItems = Get-WmiObject Win32_BIOS -Namespace &quot;root\CIMV2&quot; -ErrorAction stop -ComputerName $strComputer.name&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($objItem in $colItems) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.DevSerialNumber = $objItem.SerialNumber&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Get OS Info from Win32_OperatingSystem&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $colItems = Get-WmiObject Win32_OperatingSystem -ErrorAction Stop&amp;nbsp; -ComputerName $strComputer.name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($objItem in $colItems) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($objItem.OSArchitecture) {$objInfo.OSArchitecture = $objItem.OSArchitecture} else { $objInfo.OSArchitecture =&quot;32 bit&quot; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.Caption&amp;nbsp; = $objItem.Caption &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.Version = $objItem.Version&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.RegisteredUser= $objItem.RegisteredUser&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.OsSerialNumber= $objItem.SerialNumber&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Get MS Windows Serial Number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #write-host $objInfo.Version&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.WindowsPK = Get-WindowsProductKey -Computername $strComputer.name -Version $objInfo.Version&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Get Office Version from WIn32_Product&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $colItems = Get-WmiObject WIn32_Product -Computername $strComputer.name -Filter &quot;Name like &#39;%Office%&#39;&quot;| Where {($_.ProductID) }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($objItem in $colItems) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.OfficeVersion = $objItem.Name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($objInfo.OfficeVersion) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Get Office Serial Number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.OfficeSN = Get-MSOfficeProductKey&amp;nbsp; -Computername $strComputer.name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.OfficeVersion = &quot;Office not installed&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; catch # If we get any error Reading computer data let&#39;s say it is Unreadable&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo = New-Object PSObject | Select&amp;nbsp; &quot;ClientName&quot;, &quot;OSArchitecture&quot;, &quot;Username&quot; ,&quot;Manufacturer&quot;, &quot;Model&quot;, &quot;DevSerialNumber&quot; ,&quot;OfficeVersion&quot;, &quot;OfficeSN&quot;, &quot;Caption&quot;, &quot;Version&quot;,&quot;RegisteredUser&quot;, &quot;OSSerialNumber&quot;, &quot;WindowsPK&quot;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.ClientName = $strComputer.name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.OSArchitecture = &#39;Unreadable&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
# If we are unable to connect let&#39;s say the computer is Unreachable&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo = New-Object PSObject | Select&amp;nbsp; &quot;ClientName&quot;, &quot;OSArchitecture&quot;, &quot;Username&quot; ,&quot;Manufacturer&quot;, &quot;Model&quot;, &quot;DevSerialNumber&quot; ,&quot;OfficeVersion&quot;, &quot;OfficeSN&quot;, &quot;Caption&quot;, &quot;Version&quot;,&quot;RegisteredUser&quot;, &quot;OSSerialNumber&quot;, &quot;WindowsPK&quot; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.ClientName = $strComputer.name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $objInfo.OSArchitecture = &#39;Unreachable&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
# Add a new Row with current computer data&lt;br /&gt;
$NewCSVObject += $objInfo&lt;br /&gt;
$objInfo=&quot;&quot;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# OutPut to CSV file&lt;br /&gt;
# If you want a video output too uncomment line below&lt;br /&gt;
$NewCSVObject |Out-GridView&lt;br /&gt;
$NewCSVObject | export-csv &quot;$FilePath\ListPK_$(Get-Date -f yyyy-MM-dd).csv&quot; -noType&lt;br /&gt;
&lt;br /&gt;
# End of Script body&lt;br /&gt;
################################################################### </content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/7370337299286245442/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2014/03/powershell-script-to-retrieve-domains.html#comment-form' title='6 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7370337299286245442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7370337299286245442'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2014/03/powershell-script-to-retrieve-domains.html' title='Powershell Script to retrieve Domain&#39;s Windows and Office Product Keys '/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdNf6DmWiKUkL7AtLtFcHQf5QC_ZS8qBsXD1woZXSgQ_HaTamP_kBsG4jvpPWJig5l9rILfSES2ps8ECA-syXzdsMFGrBULDF31wl6ZE1KLqXtFHxd2nuNaa9ZBGjiP0GC9F91r2mXAAo/s72-c/GPO+Remote+Registry.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-727086993295069152</id><published>2013-10-28T16:42:00.001+01:00</published><updated>2013-10-28T16:43:20.031+01:00</updated><title type='text'>I Forum di Technet</title><content type='html'>Magari fornisco un&#39;informazione già nota, ma c&#39;è una importante risorsa tecnica a volte sottovalutata.&lt;br /&gt;
Alle volte, a prescindere dalla propria preparazione, capita a tutti i bloccarsi su qualche problema e nonostante possiamo essere degli ottimi &quot;googleatori&quot; o &quot;bingatori&quot; non riusciamo a venirne fuori.&lt;br /&gt;
Prima di aprire una chiamata con Microsoft esiste una possibilità&amp;nbsp;&lt;b&gt;assolutamente gratutita&lt;/b&gt; che ci viene incontro:&lt;br /&gt;
i forum di technet : &lt;a href=&quot;http://social.technet.microsoft.com/Forums/it-it/home&quot;&gt;http://social.technet.microsoft.com/Forums/it-it/home&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwmINY5QgNmneQ8voIGTaM-zbMgLER0_dIuSb5roxGTc6yx219tPM7z3rvyVETgYF_CpFMW2s6UAIB6kgkUiRyXtzLOoqWeDIb6dsBTnSUKKxJUS1nokJZndrAERCwJRKHyjWfu95koRg/s1600/technet_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwmINY5QgNmneQ8voIGTaM-zbMgLER0_dIuSb5roxGTc6yx219tPM7z3rvyVETgYF_CpFMW2s6UAIB6kgkUiRyXtzLOoqWeDIb6dsBTnSUKKxJUS1nokJZndrAERCwJRKHyjWfu95koRg/s400/technet_2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
All&#39;interno di questi forum ci sono moltissimi esperti, spesso MVP &amp;nbsp;(Most Valuable Professional), che danno assistenza agli utenti per aiutarli a risolvere i problemi tecnici in tempi molto veloci (non esiste una garanzia in tal senso, ma normalmente si parla di minuti al massimo di ore).&lt;br /&gt;
Quindi il mio suggerimento è, prima di provare altre strade, sottoponete il vostro problema nel Forum di Technet, potreste avere delle piacevolissime sorprese ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/727086993295069152/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/10/i-forum-di-technet.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/727086993295069152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/727086993295069152'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/10/i-forum-di-technet.html' title='I Forum di Technet'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwmINY5QgNmneQ8voIGTaM-zbMgLER0_dIuSb5roxGTc6yx219tPM7z3rvyVETgYF_CpFMW2s6UAIB6kgkUiRyXtzLOoqWeDIb6dsBTnSUKKxJUS1nokJZndrAERCwJRKHyjWfu95koRg/s72-c/technet_2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-6274979171454766641</id><published>2013-04-16T16:52:00.003+02:00</published><updated>2015-09-09T11:04:18.832+02:00</updated><title type='text'>Windows Server 2012 GUI management</title><content type='html'>&lt;br /&gt;
Windows server 2012 introduces the ability to switch from a Core to a FULL or a Partial GUI installation and viceversa.&lt;br /&gt;
Here are Powershell commands:&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
To switch from Server Core to partial GUI mode:&lt;br /&gt;
Install-WindowsFeature Server-Gui-Mgmt-Infra -Restart&lt;br /&gt;
&lt;br /&gt;
To switch from Server Core to full GUI mode:&lt;br /&gt;
Install-WindowsFeature Server-Gui-Mgmt-Infra Server-Gui-Shell -Restart&lt;br /&gt;
&lt;br /&gt;
To switch from Server Core to full GUI mode with the desktop experience installed:&lt;br /&gt;
Install-WindowsFeature Server-Gui-Mgmt-Infra Server-Gui-Shell Desktop-Experience -Restart&lt;br /&gt;
&lt;br /&gt;
To switch from Full installation to Server Core:&lt;br /&gt;
Uninstall-WindowsFeature Server-Gui-Mgmt-Infra -Restart&lt;br /&gt;
&lt;br /&gt;
To switch from Full installation to partial GUI mode:&lt;br /&gt;
Uninstall-WindowsFeature&amp;nbsp;&amp;nbsp;Server-Gui-Shell&amp;nbsp;&amp;nbsp;-Restart&lt;br /&gt;
&lt;br /&gt;
To identify your level of GUI use:&lt;br /&gt;
Get-WindowsFeature *gui*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/6274979171454766641/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/04/windows-server-2012-gui-management.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6274979171454766641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6274979171454766641'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/04/windows-server-2012-gui-management.html' title='Windows Server 2012 GUI management'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-4494639655032364965</id><published>2013-03-19T20:31:00.002+01:00</published><updated>2013-03-27T18:56:48.209+01:00</updated><title type='text'>SQL Injection Attack!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
It&#39;s a radar video system capturing car license number plates...&amp;nbsp; then have a look at the car plate content in the last&amp;nbsp; picture&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;                                    &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;LOL!!!!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4qiM2upnMHuJ4-uKLUPN-qT-UuY4ThyqP0fNwrAr_Z6yrc-in45y2J6lcB-51I2hYr2M-_QE5_yd0A6I8UHE2WUNFJtXmpX5_W_kpoqmUsNygIzZOvV7UouM_9eUoduC-w45m1iVGcM/s1600/418973_4873305585227_364911139_n.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4qiM2upnMHuJ4-uKLUPN-qT-UuY4ThyqP0fNwrAr_Z6yrc-in45y2J6lcB-51I2hYr2M-_QE5_yd0A6I8UHE2WUNFJtXmpX5_W_kpoqmUsNygIzZOvV7UouM_9eUoduC-w45m1iVGcM/s640/418973_4873305585227_364911139_n.jpg&quot; width=&quot;256&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Detail: &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkTCapDQ02wzXJMTysXb0TvlBJ0HeOYCcEzE8KPGaF0ZCf2-hPs3qNyhp9bp_tflpW9_QryOKofyVwXV6IGsC7JcHpa9ESKoNeQ5mIouV4d4zK3MakucUcoJxSBZeZ_a5jxE48YoamEpo/s1600/RQcCi.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkTCapDQ02wzXJMTysXb0TvlBJ0HeOYCcEzE8KPGaF0ZCf2-hPs3qNyhp9bp_tflpW9_QryOKofyVwXV6IGsC7JcHpa9ESKoNeQ5mIouV4d4zK3MakucUcoJxSBZeZ_a5jxE48YoamEpo/s400/RQcCi.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Command: &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ZU 0666’, 0, 0); Drop Database Tablice; --&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Note: TABLICE in Polish = TABLES in English&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
and zwolnij = slow down&amp;nbsp; &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/4494639655032364965/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/03/sql-injection.html#comment-form' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/4494639655032364965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/4494639655032364965'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/03/sql-injection.html' title='SQL Injection Attack!'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4qiM2upnMHuJ4-uKLUPN-qT-UuY4ThyqP0fNwrAr_Z6yrc-in45y2J6lcB-51I2hYr2M-_QE5_yd0A6I8UHE2WUNFJtXmpX5_W_kpoqmUsNygIzZOvV7UouM_9eUoduC-w45m1iVGcM/s72-c/418973_4873305585227_364911139_n.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-1734419385901371592</id><published>2013-03-14T12:16:00.004+01:00</published><updated>2013-03-18T12:52:48.172+01:00</updated><title type='text'>Data Protection Manager Reports ed Exchange </title><content type='html'>Problema: nonostante sia correttamente configurato l&#39;SMTP&amp;nbsp; su Exchange la sottoscrizione ai report via mail non funziona e non viene creato nessun evento di errore.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqx6MqePCmerv2RL2ADHDpvVwNwBCbyOiGw3ZPhAmTYIENLx9S196gAhQ8bFuDcFPS3wpdeFWTL2JXM-dnE4lIu3gca_8vUCjHuY1MvXvIBJJVoIx-Esbwn8LCpSuQH_OB9seGmRVE0LU/s1600/DPM_email1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqx6MqePCmerv2RL2ADHDpvVwNwBCbyOiGw3ZPhAmTYIENLx9S196gAhQ8bFuDcFPS3wpdeFWTL2JXM-dnE4lIu3gca_8vUCjHuY1MvXvIBJJVoIx-Esbwn8LCpSuQH_OB9seGmRVE0LU/s400/DPM_email1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span id=&quot;goog_985259655&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_985259656&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;goog_985259655&quot;&gt;Soluzione: &lt;/span&gt;&lt;span id=&quot;goog_985259656&quot;&gt;&lt;/span&gt;creare su Exchange un nuovo connettore di ricezione&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH_IoWatPwjbqbr0sGGmpxXp1QGMuJKkrvqmvXuAs-1UjOU9euOEyWFZsNCrfpj9JAtpEv90vkcbhMxqI4BuIPfWC1RYKX_slePrDysnKoG3A6lKVuCWL9Q0xzniGYaJKN6GBY3FfN1Ic/s1600/dpm_email_02.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH_IoWatPwjbqbr0sGGmpxXp1QGMuJKkrvqmvXuAs-1UjOU9euOEyWFZsNCrfpj9JAtpEv90vkcbhMxqI4BuIPfWC1RYKX_slePrDysnKoG3A6lKVuCWL9Q0xzniGYaJKN6GBY3FfN1Ic/s400/dpm_email_02.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
Indicare l&#39;indirizzo IP del Server DPM &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2o32mHMTSh_IeuHhIzGpdEiYo_1Fwcf8rYETEEpgSwWl4VURbgzVIfRIeo11OKg5EzjVE9n0HsU9gzp0l0ekpf-9G6xiSIaqRs-7xd7A17xbmlBiBYVkanRFFzmYEV99um79lRb5qd-w/s1600/dpm_email_03.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2o32mHMTSh_IeuHhIzGpdEiYo_1Fwcf8rYETEEpgSwWl4VURbgzVIfRIeo11OKg5EzjVE9n0HsU9gzp0l0ekpf-9G6xiSIaqRs-7xd7A17xbmlBiBYVkanRFFzmYEV99um79lRb5qd-w/s400/dpm_email_03.jpg&quot; width=&quot;371&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Specificare l&#39;autenticazione TLS e Protetto Esternamente&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ6tSRo_WLE0Y85QRTvgXxtKpkLPrEDl5x8Omeor5DcOP-RRzQXMJiVw7D-rhzoGrYRICbpbO9SA9UGg35xp_IopKYY29AOs9tHKtkQL08oGjf3KuDyAx2HVKMM-4j8cGejPdshDUjJ2Y/s1600/dpm_email_04.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ6tSRo_WLE0Y85QRTvgXxtKpkLPrEDl5x8Omeor5DcOP-RRzQXMJiVw7D-rhzoGrYRICbpbO9SA9UGg35xp_IopKYY29AOs9tHKtkQL08oGjf3KuDyAx2HVKMM-4j8cGejPdshDUjJ2Y/s400/dpm_email_04.jpg&quot; width=&quot;358&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Selezioanare Utenti anonimi, Utenti Exchange, Server Exchange e Partner&amp;nbsp; &lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOGP76kyt9ImcMCW387UimeV952qPhzWNZUQk1sVJlQ1u6dksyhx4G9Kcej7xYsOupV5FdPMt0DhVJCRurWLoUkQMfo9n06WoFgST0DqHee9Z5uRDLKNnQsY4MKO9eL2Gev-rOjuymh4k/s1600/dpm_email_05.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOGP76kyt9ImcMCW387UimeV952qPhzWNZUQk1sVJlQ1u6dksyhx4G9Kcej7xYsOupV5FdPMt0DhVJCRurWLoUkQMfo9n06WoFgST0DqHee9Z5uRDLKNnQsY4MKO9eL2Gev-rOjuymh4k/s400/dpm_email_05.jpg&quot; width=&quot;358&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Adesso dovrebbe funzionare tutto&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/1734419385901371592/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/03/data-protection-manager-reports-ed.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/1734419385901371592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/1734419385901371592'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/03/data-protection-manager-reports-ed.html' title='Data Protection Manager Reports ed Exchange '/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqx6MqePCmerv2RL2ADHDpvVwNwBCbyOiGw3ZPhAmTYIENLx9S196gAhQ8bFuDcFPS3wpdeFWTL2JXM-dnE4lIu3gca_8vUCjHuY1MvXvIBJJVoIx-Esbwn8LCpSuQH_OB9seGmRVE0LU/s72-c/DPM_email1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-3009618226057557659</id><published>2013-02-18T00:34:00.001+01:00</published><updated>2014-11-03T09:39:33.490+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AlwaysOn"/><category scheme="http://www.blogger.com/atom/ns#" term="Availability Group"/><category scheme="http://www.blogger.com/atom/ns#" term="High Availability"/><category scheme="http://www.blogger.com/atom/ns#" term="Read Only Routing"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><title type='text'>SQL Server 2012 AlwaysOn</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;One of the greatest&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;new features introduced&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server 2012&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in terms&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of high&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;availability&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is the &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;AlwaysOn &lt;/span&gt;technology&lt;/span&gt;.&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is divided into two&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;types:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;AlwaysOn&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Instance&lt;/span&gt;&lt;/b&gt;: Protection at &lt;span class=&quot;hps&quot;&gt;single instance &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;level&lt;/span&gt;,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;improvement &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;of &lt;/span&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;traditional&lt;/span&gt;&amp;nbsp; &lt;span class=&quot;hps&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;installation,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;mainly in &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;the health &lt;/span&gt;monitoring&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps atn&quot;&gt;Multi-&lt;/span&gt;Subnet implementation.&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;AlwaysOn&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Availability Group&lt;/span&gt;&lt;/b&gt;: &lt;span class=&quot;hps&quot;&gt;Database&lt;/span&gt;-level security, evolution of the&amp;nbsp; earlier&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL Server &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;versions&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;DB&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;mirroring&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqcRD0yNE7pL8AudY_2irzL7C3OsjXYrLMZkyrRt2BBzKRkZd7GXB81u5ARMhfXXIuk399U9cme6iJdloEo9v-IfGxigB0VnpOTTC_CK5s4HenwR3IdItTe2Bqg7gIkix3rNTJSlonDJs/s1600/AlwaysOn_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqcRD0yNE7pL8AudY_2irzL7C3OsjXYrLMZkyrRt2BBzKRkZd7GXB81u5ARMhfXXIuk399U9cme6iJdloEo9v-IfGxigB0VnpOTTC_CK5s4HenwR3IdItTe2Bqg7gIkix3rNTJSlonDJs/s400/AlwaysOn_1.jpg&quot; height=&quot;246&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;right&quot;&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;Source: Microsoft Learning&lt;/i&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;First solution,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in terms&lt;/span&gt; of &lt;span class=&quot;hps&quot;&gt;architecture, &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;just&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;adds&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; elimination&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of the need to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a VLAN for&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; cluster nodes&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;while A&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;vailability&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;groups&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;are a true novelty&lt;/span&gt;, perhaps &lt;span id=&quot;tran0&quot;&gt;one of that particular for which it would be worth to migrate to SQL 2012.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;AlwaysOn Availability Group&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;General &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;This technology&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;takes advantage&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Windows&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Failover&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;Cluster (&lt;/span&gt;WSFC) to provide a &lt;span class=&quot;hps&quot;&gt;high availability solution&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL Server databases&lt;/span&gt;. &lt;span class=&quot;hps atn&quot;&gt;It &#39;&lt;/span&gt;an evolution of  &lt;span class=&quot;hps&quot;&gt;DB&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;mirroring &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;technology&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;introduced with&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server 2005 version,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;but&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;offers these&lt;/span&gt; &lt;span id=&quot;tran0&quot;&gt;fundamental additional advantages:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span id=&quot;tran0&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;Nodes&amp;nbsp; number&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;is no longer&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;limited to 2&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&lt;/span&gt;F&lt;span class=&quot;hps&quot;&gt;ailover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is no longer handled&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;by the client,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;but&lt;/span&gt; it&#39;s a&lt;span class=&quot;hps&quot;&gt; server side&lt;/span&gt; event &lt;span class=&quot;hps&quot;&gt;done&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a transparent way to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;client&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span id=&quot;tran2&quot;&gt;And&#39; possible to perform read-only &lt;/span&gt;&lt;span id=&quot;tran2&quot;&gt;&lt;span id=&quot;tran2&quot;&gt;access &lt;/span&gt;to a passive node of the &lt;/span&gt;&lt;span id=&quot;tran2&quot;&gt;&lt;span id=&quot;tran2&quot;&gt;availability &lt;/span&gt;group &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span id=&quot;tran3&quot;&gt;And&#39; possible to perform the backup operations on a passive node of the &lt;/span&gt;&lt;span id=&quot;tran3&quot;&gt;&lt;span id=&quot;tran3&quot;&gt;availability &lt;/span&gt;group &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span class=&quot;hps&quot;&gt;Although&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;this technology&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is based on the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is not necessary:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;Have&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a storage&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;shared&lt;/span&gt; among&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;cluster nodes&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Perform an &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;SQL Server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Cluster&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;installation&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span class=&quot;hps&quot;&gt;Then each&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;node will have&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a standalone &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server&lt;/span&gt; installation&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;with data&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on local &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;node&lt;/span&gt; storage&lt;/span&gt;.&lt;br /&gt;
&lt;span id=&quot;tran3&quot; style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;In Windows&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server 2012&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;feature&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is available&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;also &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;on the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;standard version&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;There is no&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;problem&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in creating&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;virtualized&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;nodes&lt;/span&gt;, if &lt;span class=&quot;hps&quot;&gt;not the usual&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;recommendations for&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL Server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;running&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on a virtual machine&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Terminology&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCq86U42sSELdvHz2E2XU-K1K3jio_dRS7NPQJFNRXfhWZYrT3mRFhyphenhyphenfCzn_0oJLjaxzmnlcZELR9KHFlDmPbx3lLMS-L3U6e8_W0YQhQ7nrOoKEAwDhnf-4MraTn0psAgzpNtqg62GFQ/s1600/AlwaysOn_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCq86U42sSELdvHz2E2XU-K1K3jio_dRS7NPQJFNRXfhWZYrT3mRFhyphenhyphenfCzn_0oJLjaxzmnlcZELR9KHFlDmPbx3lLMS-L3U6e8_W0YQhQ7nrOoKEAwDhnf-4MraTn0psAgzpNtqg62GFQ/s400/AlwaysOn_2.jpg&quot; height=&quot;251&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;right&quot;&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;Source: Microsoft Learning&lt;/i&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;AlwaysOn&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Availability Group&lt;/span&gt;&lt;/b&gt;: a group of &lt;span class=&quot;hps atn&quot;&gt;servers (&lt;/span&gt;cluster) that provides &lt;span class=&quot;hps&quot;&gt;high availability&lt;/span&gt; to &lt;span class=&quot;hps&quot;&gt;one or more&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;databases&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;/b&gt;&lt;span class=&quot;hps&quot;&gt;&lt;b&gt;Replica&lt;/b&gt;:&lt;/span&gt; SQL Server &lt;span class=&quot;hps&quot;&gt;instance that hosts&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;read and write&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Database&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;copy (only one among group)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Secondary&lt;/span&gt; Replica&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;:&lt;/b&gt; node &lt;span class=&quot;hps&quot;&gt;that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;hosts a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Database&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;copy&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on which&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;you can enable&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;read-only&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;access&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Listener&lt;/span&gt;&lt;/b&gt;: consists of a &lt;span class=&quot;hps&quot;&gt;DNS name&lt;/span&gt;, TCP port, &lt;span class=&quot;hps&quot;&gt;and one or more&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;IP addresses&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;through which&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;clients connect to the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;availability group&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Availability&lt;/span&gt; &lt;/b&gt;&lt;span class=&quot;hps&quot;&gt;&lt;b&gt;Modes&lt;/b&gt;:&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;how&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;data is &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;replicated &lt;/span&gt;between&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; a &lt;span class=&quot;hps&quot;&gt;secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;member&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;can be:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Commit&lt;/span&gt;&lt;span class=&quot;atn&quot;&gt;-&lt;/span&gt;Synchronous&lt;/b&gt;: &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;primary replica&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;waits for confirmation&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;that the changes&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;have been made&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;before closing the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;transaction.&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Reliable&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;but dangerous in terms of&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; performances.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Commit&lt;/span&gt;-Asynchronous&lt;/b&gt;: &lt;span class=&quot;hps&quot;&gt;the primary member&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;sends changes&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to the secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;close the transaction&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;without waiting for&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;any confirmation of &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;the outcome&lt;/span&gt;. &lt;span class=&quot;hps&quot;&gt;Not reliable&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;but&lt;/span&gt; very p&lt;span class=&quot;hps&quot;&gt;erforming.&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Failover&lt;/span&gt;&lt;/b&gt;: &lt;span class=&quot;hps alt-edited&quot;&gt;process through which&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the role&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the Primary Replica&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is passed&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Secondary Replica&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;called&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;target&lt;/span&gt;. &lt;span class=&quot;hps&quot;&gt;There are 3 types&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;failover:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;hps atn&quot;&gt;&lt;b&gt;Automatic failover &lt;/b&gt;(&lt;/span&gt;&lt;span class=&quot;alt-edited&quot;&gt;without data loss&lt;/span&gt;) &lt;span class=&quot;hps&quot;&gt;available when both&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;primary&amp;nbsp;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;that the secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;replica are&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;operating in&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;synchronous mode (&lt;/span&gt;Commit&lt;span class=&quot;atn&quot;&gt;-&lt;/span&gt;Synchronous). &lt;span class=&quot;hps&quot;&gt;In this case&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;failover mode&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in the group&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;set to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;automatic&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and the passage&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;roles&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;takes place without any&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;administrative intervention&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Planned&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;manual failover&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;(without&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;data loss&lt;/span&gt;): as &lt;span class=&quot;hps&quot;&gt;in the previous case&lt;/span&gt;, the two members &lt;span class=&quot;hps&quot;&gt;operate&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in synchronous mode,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;but&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;since the Group was not&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;set&lt;/span&gt; to &lt;span class=&quot;hps&quot;&gt;Automatic failover. requires&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;an administrative intervention&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to send the &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; &lt;span class=&quot;hps alt-edited&quot;&gt;failover &lt;/span&gt;command&lt;/span&gt;&lt;span class=&quot;hps alt-edited&quot;&gt;&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Forced&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;manual failover&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;(with&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;possible data loss&lt;/span&gt;): the two &lt;span class=&quot;hps&quot;&gt;replica members&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;operate&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;asynchronously&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and then&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the administrator can&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;force the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;knowing that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;any transactions that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;have not yet been&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;synchronized&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;from the primary member&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;will be lost.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Active&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt;&lt;/b&gt;: &lt;span class=&quot;hps&quot;&gt;to improve performance&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and manage&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;more efficiently&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;availability group &lt;/span&gt;&lt;span class=&quot;hps alt-edited&quot;&gt;resources you&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;can&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;route&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; &lt;span class=&quot;hps&quot;&gt;read-only and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;backup&lt;/span&gt; requests&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;replica; secondary replica(s) acting in this way is/are called &#39;active&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Installation&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Note: the objective&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of this article is&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;centered on the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Availability Group&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and not on&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the Failover Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;configuration&lt;/span&gt;, so &lt;span class=&quot;hps&quot;&gt;I will not go&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;into detail on&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;this part&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) &lt;span class=&quot;hps&quot;&gt;Install the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;feature&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;each Server&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfB-el8z5QoPlVaNDZ8vsTyM7W5HAGf_Z-osvxL3KjHOyHeOWZwHCX64euIdU-gc26lzxABELZcc-lDp4XiQ4Qq5DYXXbmTe8N5v4DflTs320SBDiQOxSoKWeEffYl7Dk9DKuBIQue3q4/s1600/AlwaysOn_5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfB-el8z5QoPlVaNDZ8vsTyM7W5HAGf_Z-osvxL3KjHOyHeOWZwHCX64euIdU-gc26lzxABELZcc-lDp4XiQ4Qq5DYXXbmTe8N5v4DflTs320SBDiQOxSoKWeEffYl7Dk9DKuBIQue3q4/s400/AlwaysOn_5.jpg&quot; height=&quot;295&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
2) &lt;span class=&quot;hps&quot;&gt;Create a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Failover Cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;that includes&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;all servers&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ylP7AkMCXYMoNSHsvxF2EoB88IYTXRR1aML9jAlcRwSdeZy0GkRIyw7UuRf539KaghISObDrCPM9NmUCLMYqFui-CjyH09gm2BQCVHGpEnBWrskeEJpnst8IctzYU_c_yrJfki8Y1NE/s1600/AlwaysOn_6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ylP7AkMCXYMoNSHsvxF2EoB88IYTXRR1aML9jAlcRwSdeZy0GkRIyw7UuRf539KaghISObDrCPM9NmUCLMYqFui-CjyH09gm2BQCVHGpEnBWrskeEJpnst8IctzYU_c_yrJfki8Y1NE/s400/AlwaysOn_6.jpg&quot; height=&quot;198&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;in our example&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;we have created a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;cluster&lt;/span&gt; called&amp;nbsp; &lt;span class=&quot;hps atn&quot;&gt;MIA-&lt;/span&gt;CLUSTER &lt;span class=&quot;hps&quot;&gt;including&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;servers:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MIA-CLUST1&lt;br /&gt;
&lt;br /&gt;
MIA-CLUST2&lt;br /&gt;
&lt;br /&gt;
MIA-CLUST3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Note that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;there is no&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;shared storage&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in the cluster&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd-h7XZU2z4Tm3it7E79tOEMVPONKUtNTY3MDLcjF7hTIe3BYjx65ZxI0HNO-iCaS_pFAmTXBVlh5sw_aiA1_lbk2hpzCKA37mBH9uQHJIcGJL7-mXWa364onR7jlI9F0Tb0Bu92syLt0/s1600/AlwaysOn_7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd-h7XZU2z4Tm3it7E79tOEMVPONKUtNTY3MDLcjF7hTIe3BYjx65ZxI0HNO-iCaS_pFAmTXBVlh5sw_aiA1_lbk2hpzCKA37mBH9uQHJIcGJL7-mXWa364onR7jlI9F0Tb0Bu92syLt0/s400/AlwaysOn_7.jpg&quot; height=&quot;262&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
3) I&lt;span class=&quot;hps&quot;&gt;nstall a &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Standalone&lt;/span&gt; instance&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;2012 on&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;each server&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4sOdPg7Ia44uvPw4HgHMVvEvbtWRmD-hVoEtbpTFERbezI8hKqPn4_htIPFBulhXd_6KKiAg3P61prL_UhICqCCFnSGsB2-IAaSTfqwBFziUHKjow9t5OhyphenhyphenxD2OjIuybA9-qmDoLR_zQ/s1600/AlwaysOn_8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4sOdPg7Ia44uvPw4HgHMVvEvbtWRmD-hVoEtbpTFERbezI8hKqPn4_htIPFBulhXd_6KKiAg3P61prL_UhICqCCFnSGsB2-IAaSTfqwBFziUHKjow9t5OhyphenhyphenxD2OjIuybA9-qmDoLR_zQ/s400/AlwaysOn_8.jpg&quot; height=&quot;75&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Use a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;domain account&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;for the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Service&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;You can&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;install only the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Database&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Engine&lt;/span&gt; feature, optionally also &lt;span class=&quot;hps&quot;&gt;management tools&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Trough &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; SQL Server &lt;span class=&quot;hps&quot;&gt;Configuration Manager&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;enabled&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;AlwaysOn&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Availability Group&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on each&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;server&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnIDX0lSGZfIGjCwiA4yNjFXSBSU6rIUcKDQjikAolqIcSqyRoRGgrdwMMZNSJ4WpKuVXZ-ApyLefWetHfvlrJCN3Nr9qlEQtndODQ4zgCr-QxIIVgAnLSFIsTsYLf__SEmv1z8Yk08mY/s1600/AlwaysOn_9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnIDX0lSGZfIGjCwiA4yNjFXSBSU6rIUcKDQjikAolqIcSqyRoRGgrdwMMZNSJ4WpKuVXZ-ApyLefWetHfvlrJCN3Nr9qlEQtndODQ4zgCr-QxIIVgAnLSFIsTsYLf__SEmv1z8Yk08mY/s400/AlwaysOn_9.jpg&quot; height=&quot;260&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: &lt;span class=&quot;hps&quot;&gt;Restart&lt;/span&gt; the &lt;span class=&quot;hps&quot;&gt;SQL Server service&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5)&amp;nbsp; &lt;span class=&quot;hps&quot;&gt;Create&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a network share&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the backup files&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;used to synchronize&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the replicas&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWvOdGkmBbgPfnr0u6jNYyTn2_sqnElLzktBHUc40iLkXfvx79LVo1habWx4HqADHky-0oAd8XZ59hxjIMfY48AT5tw_N3bBBJVb4IHR0x9419ClYsIPlq6odKshBsmAWm_smNm2bcSXM/s1600/AlwaysOn_10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWvOdGkmBbgPfnr0u6jNYyTn2_sqnElLzktBHUc40iLkXfvx79LVo1habWx4HqADHky-0oAd8XZ59hxjIMfY48AT5tw_N3bBBJVb4IHR0x9419ClYsIPlq6odKshBsmAWm_smNm2bcSXM/s400/AlwaysOn_10.jpg&quot; height=&quot;148&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) &lt;span class=&quot;hps&quot;&gt;Create&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;Database&lt;/span&gt;(s)&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;we want to protect&lt;/span&gt; on the &lt;span class=&quot;hps&quot;&gt;Server &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;that will become your&lt;/span&gt; P&lt;span class=&quot;hps&quot;&gt;rimary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitgysXJuFN9WmhS4PJ7huCrdfabKKHnYTest-l-QSRD50oDN9cotXy7jnQIDRCq8RjGVHr5ahhCHZ05kv9tCMCVndVVhkxEl8jPR-FRUGXfoOWGljq7B-PEzqSk-y7UeeWwc0-sQM41Q/s1600/AlwaysON_11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitgysXJuFN9WmhS4PJ7huCrdfabKKHnYTest-l-QSRD50oDN9cotXy7jnQIDRCq8RjGVHr5ahhCHZ05kv9tCMCVndVVhkxEl8jPR-FRUGXfoOWGljq7B-PEzqSk-y7UeeWwc0-sQM41Q/s400/AlwaysON_11.jpg&quot; height=&quot;400&quot; width=&quot;290&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;In our case&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the Server that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;will act as&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;hps atn&quot;&gt;MIA-&lt;/span&gt;CLUST1&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;and we&#39;ll put&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;High Availability&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&amp;nbsp;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;b&gt;Sales&lt;/b&gt; d&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;atabase&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Check that the&lt;/span&gt; Database &lt;span class=&quot;hps&quot;&gt;Recovery&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Full&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZGtOoZmfxIc3iAtDlYM_a-bwtsKdsqZFfwiyvESvHV5AxMA9M-TWxvrHGcJKcV-rBS1ZVnlJD0llQTTw8QBLhAYUCVae0rWT8zyjbfkZQXst3kTOixRiTXpMWvfDzXQ5J-bTO4zwccak/s1600/AlwaysON_12.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZGtOoZmfxIc3iAtDlYM_a-bwtsKdsqZFfwiyvESvHV5AxMA9M-TWxvrHGcJKcV-rBS1ZVnlJD0llQTTw8QBLhAYUCVae0rWT8zyjbfkZQXst3kTOixRiTXpMWvfDzXQ5J-bTO4zwccak/s400/AlwaysON_12.jpg&quot; height=&quot;118&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
7) &lt;span class=&quot;hps&quot;&gt;Now you can create your&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;AlwaysOn&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Avalaibilty&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Group&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Launch&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Wizard on the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Primary Server&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiG1zAyKJGVDf0mZLtsQznaCj3Q7UEaya76EN_seXSr41hMzZw_vfmuJxEMkB3NzOfW47SUXXKK4esCw8kjDt42u5fKfub6HQk7WtlQYYBsUHn2lafpBIWl3BNObFc2HIOosaQ4E7bh8g/s1600/AlwaysON_14.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiG1zAyKJGVDf0mZLtsQznaCj3Q7UEaya76EN_seXSr41hMzZw_vfmuJxEMkB3NzOfW47SUXXKK4esCw8kjDt42u5fKfub6HQk7WtlQYYBsUHn2lafpBIWl3BNObFc2HIOosaQ4E7bh8g/s400/AlwaysON_14.jpg&quot; height=&quot;400&quot; width=&quot;261&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XfH0W23BMSLmH29UYTTsdlk9HiJWVTQ1xy1TqI1r39nZzslbIV5hJy8dDGTblo1Sj1PMsw9r7y6REzfdVmRyGqvFPRMWnSrXbgW67uqzxIP2XuxIQn9Twe3xnuupSw8JuN8XUgm5tIM/s1600/AlwaysON_15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XfH0W23BMSLmH29UYTTsdlk9HiJWVTQ1xy1TqI1r39nZzslbIV5hJy8dDGTblo1Sj1PMsw9r7y6REzfdVmRyGqvFPRMWnSrXbgW67uqzxIP2XuxIQn9Twe3xnuupSw8JuN8XUgm5tIM/s400/AlwaysON_15.jpg&quot; height=&quot;362&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;hps&quot;&gt;Specify&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;your&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;AG &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;name (in our case &lt;b&gt;MIA-SQL-AG&lt;/b&gt;) &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVByg2T3CpY48pYHld2U1S3Fc3d0Z-3FkkN8kXphcuXi54RKbQYrzwljzYyi3JYXHDQ3HRnq_ALKyL_QUqax3i0ZLIsVMsed4wBvsJtnPueVlkYOxnjAv03f31gPAXt65MF75zhARlDqg/s1600/AlwaysON_16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVByg2T3CpY48pYHld2U1S3Fc3d0Z-3FkkN8kXphcuXi54RKbQYrzwljzYyi3JYXHDQ3HRnq_ALKyL_QUqax3i0ZLIsVMsed4wBvsJtnPueVlkYOxnjAv03f31gPAXt65MF75zhARlDqg/s400/AlwaysON_16.jpg&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;We select the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;b&gt;Sales&lt;/b&gt; database&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhVSIFb-FhTPKM0dajRDwscKKw9D0M2fYKQ5lfL0zpgbz_RtTiKHwBs0xjaCTZe_Z0tdFyhkVS08GRSRVdDx4XLrmAWHtVeg3xhm1XqSc1cilKEOzLjoTUqEYvqVngDHKNHvOo0Dt7L5w/s1600/AlwaysON_17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhVSIFb-FhTPKM0dajRDwscKKw9D0M2fYKQ5lfL0zpgbz_RtTiKHwBs0xjaCTZe_Z0tdFyhkVS08GRSRVdDx4XLrmAWHtVeg3xhm1XqSc1cilKEOzLjoTUqEYvqVngDHKNHvOo0Dt7L5w/s400/AlwaysON_17.jpg&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;hps&quot;&gt;Add the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replicas&lt;/span&gt;: Add &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;...&lt;/span&gt; &lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecGos1yEOGBY6prClNPZpGBt40QRg30-4qwaGy2xH7ovML8m97A5ohW346cfQ1x16Oa3NmxFYgg0gPnm6Hutsb2oDkeq9mI6h_GnZs-mdtqtrG9MVXeCbZeMP8V7PCzrk5UEYBhD9Hic/s1600/AlwaysON_18.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecGos1yEOGBY6prClNPZpGBt40QRg30-4qwaGy2xH7ovML8m97A5ohW346cfQ1x16Oa3NmxFYgg0gPnm6Hutsb2oDkeq9mI6h_GnZs-mdtqtrG9MVXeCbZeMP8V7PCzrk5UEYBhD9Hic/s400/AlwaysON_18.jpg&quot; height=&quot;368&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH-uuGwC2qnlPGLtskSk4GfsgI3igZ7MONGApdQMzKSNx1x4lfzaCv5H14DnerlFeVpuFR4G1qzzRAUUoVWGzjdcliofvSTeqNFaRhhyJbj0NWCCy5YVGCgnpSXCeAPOVJcEw4d_zV83Q/s1600/AlwaysON_19.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH-uuGwC2qnlPGLtskSk4GfsgI3igZ7MONGApdQMzKSNx1x4lfzaCv5H14DnerlFeVpuFR4G1qzzRAUUoVWGzjdcliofvSTeqNFaRhhyJbj0NWCCy5YVGCgnpSXCeAPOVJcEw4d_zV83Q/s400/AlwaysON_19.jpg&quot; height=&quot;296&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvLZRzxHn5N0dvMdSch1tBRE3J1Im1Eu1xu8uB7rvwD8N0IO99IX_UrNBWft7bsUx4AVFLpdd9jEsSZYQ_M-HvxMH68JLchS1Q6Qs4Aj5GfbZbIR8BYvOysHloCZDze-I-aejIEv5n210/s1600/AlwaysON_20.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvLZRzxHn5N0dvMdSch1tBRE3J1Im1Eu1xu8uB7rvwD8N0IO99IX_UrNBWft7bsUx4AVFLpdd9jEsSZYQ_M-HvxMH68JLchS1Q6Qs4Aj5GfbZbIR8BYvOysHloCZDze-I-aejIEv5n210/s400/AlwaysON_20.jpg&quot; height=&quot;368&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span id=&quot;goog_76039168&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;Configure&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; the &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;Listener&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCU19v2DUEloFf6NyKsmk1IwcA9XN-5sWaxZoTPOmpQf7mMEkxdOVRSlVIbJWi4NDt-u-n4xBzxkZAmueGtQ9tyOUgAStvoXISequpBzvZm4kYbcLzUA3zjULFcWY532yTBXhuE_yePSA/s1600/AlwaysON_21.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCU19v2DUEloFf6NyKsmk1IwcA9XN-5sWaxZoTPOmpQf7mMEkxdOVRSlVIbJWi4NDt-u-n4xBzxkZAmueGtQ9tyOUgAStvoXISequpBzvZm4kYbcLzUA3zjULFcWY532yTBXhuE_yePSA/s400/AlwaysON_21.jpg&quot; height=&quot;316&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;hps&quot;&gt;We set the&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; synchronization f&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;older&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdVxiOPVxkVRdToMh3_RHORsyX35FURXDyGFWV4gcyi80kCl_Z41E9ViCH_YHy5a6rDF3lZMTIZr2hwJmGZIVuiqNPJYfIz-TYy4SQdEWlHSp_IOFBk4tC1djmAlqFQTxDkTOL1ifO8YI/s1600/AlwaysON_22.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdVxiOPVxkVRdToMh3_RHORsyX35FURXDyGFWV4gcyi80kCl_Z41E9ViCH_YHy5a6rDF3lZMTIZr2hwJmGZIVuiqNPJYfIz-TYy4SQdEWlHSp_IOFBk4tC1djmAlqFQTxDkTOL1ifO8YI/s400/AlwaysON_22.jpg&quot; height=&quot;320&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;Then let&#39;s go Next&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPeSVFLEN-48tlqQMohhxbsQWjY86ifRnqtzLjTYKFYQCtFJ7aWVAKC-7oLkJJXGlvFpwuJyeaUQBSSkSatC-SW0o5_N2QpIdZY82Mw1JYtxOVqEDvNr8ahQnJN4mlQZSee1ZQipyQvWo/s1600/AlwaysON_23.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPeSVFLEN-48tlqQMohhxbsQWjY86ifRnqtzLjTYKFYQCtFJ7aWVAKC-7oLkJJXGlvFpwuJyeaUQBSSkSatC-SW0o5_N2QpIdZY82Mw1JYtxOVqEDvNr8ahQnJN4mlQZSee1ZQipyQvWo/s400/AlwaysON_23.jpg&quot; height=&quot;318&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic3A4jpATkjDPU3LIJyhr6qqeqljYjkysY2KK-c7ES7PMp97Y_zq2G77RTmN77s3dn6Kt0220WnZ5-XxCz5fFhZsHt1dW8xqK1PrUaYK3Em2879gFlMpBcIKorDNTV3YBS0Fx0M8wRrY0/s1600/AlwaysON_24.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic3A4jpATkjDPU3LIJyhr6qqeqljYjkysY2KK-c7ES7PMp97Y_zq2G77RTmN77s3dn6Kt0220WnZ5-XxCz5fFhZsHt1dW8xqK1PrUaYK3Em2879gFlMpBcIKorDNTV3YBS0Fx0M8wRrY0/s400/AlwaysON_24.jpg&quot; height=&quot;318&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGXOTV3a6z3L0uqlRZ4gJdxaA7jifeWn8cxl42mJZRJYr_04r2RjHZ0e1HvU-9nCSsq3mjfgoA06pyEsKaWuCMwY-su-H2HYPOSXqqpkInFr7Tgqv75V2RVeq7GP3_ve0CWBpTB0Xqz8/s1600/AlwaysON_25.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGXOTV3a6z3L0uqlRZ4gJdxaA7jifeWn8cxl42mJZRJYr_04r2RjHZ0e1HvU-9nCSsq3mjfgoA06pyEsKaWuCMwY-su-H2HYPOSXqqpkInFr7Tgqv75V2RVeq7GP3_ve0CWBpTB0Xqz8/s400/AlwaysON_25.jpg&quot; height=&quot;315&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;C&lt;span class=&quot;hps&quot;&gt;ontrol&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the outcome&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: t&lt;span class=&quot;hps&quot;&gt;he warning&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;I received&lt;/span&gt; about &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;WSFC&lt;/span&gt; &lt;span class=&quot;hps alt-edited&quot;&gt;is not significant&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Final Results&lt;/span&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;The&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Sales d&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;atabase&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;replicated on&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;all three&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Servers&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKeP8hVGOLP3WF_-KOqOWgg4lGKNxi9yoFLpb1YZpl7YFicvzOsnnzYmEhzYHNWixqzxtVOhQVI4B6HAQqAjTJUerBRPvQ95Zk_z_nq5Xdx2NcJZikJySVvDKwdiUQtio0-9Y59fNiJM8/s1600/AlwaysON_26.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKeP8hVGOLP3WF_-KOqOWgg4lGKNxi9yoFLpb1YZpl7YFicvzOsnnzYmEhzYHNWixqzxtVOhQVI4B6HAQqAjTJUerBRPvQ95Zk_z_nq5Xdx2NcJZikJySVvDKwdiUQtio0-9Y59fNiJM8/s400/AlwaysON_26.jpg&quot; height=&quot;400&quot; width=&quot;190&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;In the cluster&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;was created&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a service whose&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;onwer&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is our&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxYVIbhBfrTaaH1huBZdyPtrJYJFe3o85mGzE9gyz9scQKINqehqZYI4YKyiYrBXHAhcdyPF-C4JDb-8cLnaM0K8VfJe3wGMKCB91odLGD9I21tQB0y0xfrUH5_9zj0DQoEiYsOnvV1OQ/s1600/AlwaysON_27.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxYVIbhBfrTaaH1huBZdyPtrJYJFe3o85mGzE9gyz9scQKINqehqZYI4YKyiYrBXHAhcdyPF-C4JDb-8cLnaM0K8VfJe3wGMKCB91odLGD9I21tQB0y0xfrUH5_9zj0DQoEiYsOnvV1OQ/s400/AlwaysON_27.jpg&quot; height=&quot;333&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Configuration&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Now let&#39;s do&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a configuration &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;example&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;We enter &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;our&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Group&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Availability &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;properties&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iAZvDRajEHhebsY7bvNhsYvwBxIXYauV1NkRWm2-xxUXRldSU4nLiPkTh3WDKLJuQv0rdUuxhlVvuL3-P6gVoDfo-3vCSgDojyyJiGZntKTp1GwgpU2DkPqPSrvljxKPw9fhBXhKIsk/s1600/AlwaysON_34.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iAZvDRajEHhebsY7bvNhsYvwBxIXYauV1NkRWm2-xxUXRldSU4nLiPkTh3WDKLJuQv0rdUuxhlVvuL3-P6gVoDfo-3vCSgDojyyJiGZntKTp1GwgpU2DkPqPSrvljxKPw9fhBXhKIsk/s400/AlwaysON_34.jpg&quot; height=&quot;277&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;We set&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;MIA-&lt;/span&gt;CLUST2 &lt;span class=&quot;hps&quot;&gt;in synchronous mode&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;we enable&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;automatic failover&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Let&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;MIA&lt;/span&gt;&lt;span class=&quot;atn&quot;&gt;-&lt;/span&gt;CLUST3 &lt;span class=&quot;hps&quot;&gt;in asynchronous mode&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;failover&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;can&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;only be manual&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;We make&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;both&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Secondary R&lt;/span&gt;eplicas&lt;/span&gt; readable&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Let&#39;s&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;analyze&lt;/span&gt; deeper &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;available &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;options&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Remember that each&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;server can&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;potentially act&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in two modes:&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Primary and Secondary&lt;/span&gt;, here we have &lt;span class=&quot;hps&quot;&gt;options&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;available for each&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;server based on the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;role it plays&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;(state &lt;/span&gt;is intended to be &lt;span class=&quot;hps&quot;&gt;dynamic):&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Connections&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in p&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;rimary&lt;/span&gt; &lt;/b&gt;&lt;span class=&quot;hps&quot;&gt;&lt;b&gt;role&lt;/b&gt;:&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;when acting as a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;primary&lt;/span&gt; replica server &lt;span class=&quot;hps&quot;&gt;can accept&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;all&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;or only&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;write &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;connections&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtmueKdqW5xBgQmrzAvaEeaQn5Iu3VDqnZzLMuUvlY_gEH5DrPW40aD7mb9oqNcAh586Usn9F-FlOLR6uAhSSysNvdip-i-9mSsJFQ7q4FbloGDFYmiTXvD-ulFGMHpwPoXtlqDCE0osQ/s1600/AlwaysON_32.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtmueKdqW5xBgQmrzAvaEeaQn5Iu3VDqnZzLMuUvlY_gEH5DrPW40aD7mb9oqNcAh586Usn9F-FlOLR6uAhSSysNvdip-i-9mSsJFQ7q4FbloGDFYmiTXvD-ulFGMHpwPoXtlqDCE0osQ/s400/AlwaysON_32.jpg&quot; height=&quot;108&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Readable&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Secondary&lt;/span&gt;&lt;/b&gt;: when &lt;span class=&quot;hps&quot;&gt;acting as a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;secondary a server can:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;don&#39;t accept connections (passive)&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;accept any connection&amp;nbsp;&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;(but&lt;/span&gt; operation will &lt;span class=&quot;hps&quot;&gt;fail if&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;you try to change&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; data)&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;or accept&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;only connections that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;explicitly&lt;/span&gt; define &lt;span class=&quot;hps&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Readonly&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIh9aoNwOMdQjSTl2mF-wA6p_3Uml1Hi2ZkTnMaCiSr7pwXNRp9Dsoq1eUzEBkX5yTxvbNj7tL6DT3XAGUfZDKXdibRLLC1sJW6WXIdMu0DiGWYmqgwojBq2tR_tW-c57hBkvKN7uHB4U/s1600/AlwaysON_33.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIh9aoNwOMdQjSTl2mF-wA6p_3Uml1Hi2ZkTnMaCiSr7pwXNRp9Dsoq1eUzEBkX5yTxvbNj7tL6DT3XAGUfZDKXdibRLLC1sJW6WXIdMu0DiGWYmqgwojBq2tR_tW-c57hBkvKN7uHB4U/s400/AlwaysON_33.jpg&quot; height=&quot;142&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;hps&quot;&gt;Then we go&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in the&lt;/span&gt; Backup Preferences&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;We leave the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Prefer&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Secondary&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;in this way&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;backup&lt;/span&gt; &lt;span class=&quot;hps alt-edited&quot;&gt;will&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;always&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;be performed on a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;secondary replica&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;available&lt;/span&gt;.&lt;br /&gt;
We also c&lt;span class=&quot;hps&quot;&gt;hange&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the backup priority&lt;/span&gt; by &lt;span class=&quot;hps&quot;&gt;putting up&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;hps atn&quot;&gt;MIA-&lt;/span&gt;CLUST3&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;Server.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcZVC6vsxehQyJ7YFUCZGYCvkwFzwkdG81koKKuFAws-GbvliFEimDZj8L5utHULNil-akJd3sWFzooh_iHyxpGdICKj4s3wtbBDduYmjINDnnyJLtv8w3B0azg88AnCuAniONaO60agk/s1600/AlwaysON_29.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcZVC6vsxehQyJ7YFUCZGYCvkwFzwkdG81koKKuFAws-GbvliFEimDZj8L5utHULNil-akJd3sWFzooh_iHyxpGdICKj4s3wtbBDduYmjINDnnyJLtv8w3B0azg88AnCuAniONaO60agk/s400/AlwaysON_29.jpg&quot; height=&quot;300&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iAZvDRajEHhebsY7bvNhsYvwBxIXYauV1NkRWm2-xxUXRldSU4nLiPkTh3WDKLJuQv0rdUuxhlVvuL3-P6gVoDfo-3vCSgDojyyJiGZntKTp1GwgpU2DkPqPSrvljxKPw9fhBXhKIsk/s1600/AlwaysON_34.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;hps&quot;&gt;Our&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;settings results are also&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;visible from the&lt;/span&gt; AG &lt;span class=&quot;hps&quot;&gt;Dashboard&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcQJ-_x-iw5cG6dAEOwpRqIQGA0JMFeChKl55J2ghv4jx1L8BGTkiL5-vQo7LtZcHefo973ILBUNWBNPxTbSDYzbq6VNll1quZM3Al2nT39L2BUeuGiDsUJlx2SHGOlBX184iPmVINa7w/s1600/AlwaysON_30.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcQJ-_x-iw5cG6dAEOwpRqIQGA0JMFeChKl55J2ghv4jx1L8BGTkiL5-vQo7LtZcHefo973ILBUNWBNPxTbSDYzbq6VNll1quZM3Al2nT39L2BUeuGiDsUJlx2SHGOlBX184iPmVINa7w/s400/AlwaysON_30.jpg&quot; height=&quot;321&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s1600/AlwaysON_31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s400/AlwaysON_31.jpg&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;READ-ONLY ROUTING&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;After making&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;our secondary replicas&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;readable&lt;/span&gt; it&#39;s &lt;span class=&quot;hps&quot;&gt;already&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;possible&lt;/span&gt; to &lt;span class=&quot;hps&quot;&gt;access&lt;/span&gt; them &lt;span class=&quot;hps&quot;&gt;pointing directly&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to the &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt; server &lt;/span&gt;name.&lt;/span&gt;&lt;br /&gt;
Access example to MIA-CLUST2&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibw-iunQCtVTboNFCKhuAb4yRI8J4kqEM7vp1ZaJDebcfME4oKiVp-wwC-JeHN0dPIqi-MIX40hiH0xP8L1Cf57OoWqx5UKRf67pHaKDE_KglUE5j0HxWdHdX0bOqgITxZQatZzBxGZ4c/s1600/AlwaysON_35.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibw-iunQCtVTboNFCKhuAb4yRI8J4kqEM7vp1ZaJDebcfME4oKiVp-wwC-JeHN0dPIqi-MIX40hiH0xP8L1Cf57OoWqx5UKRf67pHaKDE_KglUE5j0HxWdHdX0bOqgITxZQatZzBxGZ4c/s400/AlwaysON_35.jpg&quot; height=&quot;151&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Access example to MIA-CLUST3 &lt;span class=&quot;hps&quot;&gt;(set to&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;read-&lt;/span&gt;only &lt;span class=&quot;hps&quot;&gt;intent&lt;/span&gt;, note &lt;span class=&quot;hps&quot;&gt;the error in the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;first attempt&lt;/span&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGnyK1rQv0cd5Pk3sC7EIVkuey4KBneZSsrsa3qSj4y5wE-nox6hYfSzcRh957ztfjfuVdfwQTBPswXVEh9U64C0VdGL23bFcsPb0Js4N0x6sj_1H4Aes0FLLpm2gWQNymRqnIwEAe5zw/s1600/AlwaysON_36.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGnyK1rQv0cd5Pk3sC7EIVkuey4KBneZSsrsa3qSj4y5wE-nox6hYfSzcRh957ztfjfuVdfwQTBPswXVEh9U64C0VdGL23bFcsPb0Js4N0x6sj_1H4Aes0FLLpm2gWQNymRqnIwEAe5zw/s400/AlwaysON_36.jpg&quot; height=&quot;186&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;But&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;if we want to create a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;mechanism that&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;automatically &lt;/span&gt;addresses&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;read-only requests&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;Secondary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replicas&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;we have to implement&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Read-Only&lt;/span&gt; &lt;/b&gt;&lt;span class=&quot;hps&quot;&gt;&lt;b&gt;Routing&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;For details about the configuration&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;you can refer to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;this &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh710054.aspx&quot;&gt;article&lt;/a&gt;, but&lt;/span&gt; let&#39;s do it togheter&lt;span class=&quot;hps&quot;&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;You must have&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;configured a&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Listener&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;we did it&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in the AG configuration wizard&lt;/span&gt;:&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DNS: MIA-SQL-CLUSTER &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IP: 10.10.0.40&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCP Port: 1433&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;Identify&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;each &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;AG &lt;/span&gt;server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;member&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;connection &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;URLs&lt;/span&gt;, &lt;span class=&quot;hps&quot;&gt;in our case:&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCP://MIA-CLUST1.AdventureWorks.msft:1433&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCP://MIA-CLUST2.AdventureWorks.msft:1433&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCP://MIA-CLUST3.AdventureWorks.msft:1433&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; As you can see URLs contain the Listener Configuration (TCP 1433) and the server FQDN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; However to obtain URLs you can use this&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;a href=&quot;http://blogs.msdn.com/b/mattn/archive/2012/04/25/calculating-read-only-routing-url-for-alwayson.aspx&quot;&gt;script&lt;/a&gt; created&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;by Matt&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Neerincx&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;that provides&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;an output like :&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYop-daLb_JmVCuMlgQt4r5aqOX5aDAAtJxFpkiIzyVHU8NbqXTmp-DOgZhGgV6l2jAHczOIfTBLiM4l6te1L8vqei0rX9kIBzlnA2wckAxbcqis-hUQXSnfPLcJB5XtxX5F8QnsC1phA/s1600/AlwaysON_37.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYop-daLb_JmVCuMlgQt4r5aqOX5aDAAtJxFpkiIzyVHU8NbqXTmp-DOgZhGgV6l2jAHczOIfTBLiM4l6te1L8vqei0rX9kIBzlnA2wckAxbcqis-hUQXSnfPLcJB5XtxX5F8QnsC1phA/s400/AlwaysON_37.jpg&quot; height=&quot;107&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;Configure&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;Read_only_routing&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;using&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;these TSQL commands&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;on your&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt; &lt;span class=&quot;hps&quot;&gt;Primary &lt;/span&gt;Replica&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
__________________________ Start _________________________________________ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Configure Read_Only_Routing &lt;br /&gt;
&lt;br /&gt;
-- This script needs to be paramatrized with your deployment data!!!!&lt;br /&gt;
&lt;br /&gt;
-- by Ruggiero Lauria &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Enable Server as Readable when acting as Secondary Replica &lt;br /&gt;
&lt;br /&gt;
-- This command is not strictly necessary because we have already configured it&lt;br /&gt;
&lt;br /&gt;
-- trough AG propriety. But for completeness I preferred to include it in the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define the Server Read_only_routing URL &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N&#39;TCP://MIA-CLUST1.AdventureWorks.msft:1433&#39;));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Enable Server as Readable when acting as Secondary Replica &lt;br /&gt;
&lt;br /&gt;
-- This command is not strictly necessary because we have already configured it&lt;br /&gt;
&lt;br /&gt;
-- trough AG propriety. But for completeness I preferred to include it in the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST2&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Server Read_only_routing URL &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST2&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N&#39;TCP://MIA-CLUST2.AdventureWorks.msft:1433&#39;));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Enable Server as Readable when acting as Secondary Replica &lt;br /&gt;
&lt;br /&gt;
-- This command is not strictly necessary because we have already configured it&lt;br /&gt;
&lt;br /&gt;
-- trough AG propriety. But for completeness I preferred to include it in the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST3&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Server Read_only_routing URL &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST3&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N&#39;TCP://MIA-CLUST3.AdventureWorks.msft:1433&#39;));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Read Routing List when Server is acting as Primary Replica &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST2&#39;,&#39;MIA-CLUST3&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Read Routing List when Server is acting as Primary Replica &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST2&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST1&#39;,&#39;MIA-CLUST3&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Read Routing List when Server is acting as Primary Replica &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST3&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST1&#39;,&#39;MIA-CLUST2&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GO &lt;br /&gt;
&lt;br /&gt;
_______________________________End _________________________________________ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Note: S&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;ervers&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;indicated in the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;routing&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;list&lt;/span&gt;s &lt;span class=&quot;hps&quot;&gt;will be used&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;sequence&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;based on availability&lt;/span&gt;, there is no &lt;span class=&quot;hps&quot;&gt;form of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;load balancing&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;round robin.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Connectivity Test&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Here is the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;b&gt;process&lt;/b&gt; used by the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Read Only&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Routing:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;C&lt;span class=&quot;hps&quot;&gt;lients connect to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;our&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Availability Group&lt;/span&gt;&lt;b&gt; &lt;span class=&quot;hps&quot;&gt;Listener&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;C&lt;span class=&quot;hps&quot;&gt;lient request is redirected&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;(&lt;/span&gt;always!) to the &lt;b&gt;&lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;C&lt;span class=&quot;hps&quot;&gt;lient has specified&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;in the connection string&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;hps&quot;&gt;ApplicationIntent&lt;/span&gt;=&lt;span class=&quot;hps&quot;&gt;ReadOnly&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;S&lt;span class=&quot;hps&quot;&gt;ever&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;checks if the &lt;/span&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;target database&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;is member of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;an Availability&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Group&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;If it is true&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;step 4&lt;/span&gt;, server checks &lt;span class=&quot;hps&quot;&gt;if it is set&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;a&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;hps&quot;&gt;read_only_routing_list&lt;/span&gt;&lt;/b&gt; on the &lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;If it is true&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;step 5&lt;/span&gt; server &lt;span class=&quot;hps&quot;&gt;checks,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;order, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;that the &lt;b&gt;servers listed&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;span class=&quot;hps&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Routing_List&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;are&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;synchronizing&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and accept&lt;/span&gt;ing &lt;span class=&quot;hps atn&quot;&gt;connections (&lt;/span&gt;allow_connections &lt;span class=&quot;hps&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;read_only&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;all)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Server reads&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;from the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;read_only_routing_url&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the &lt;b&gt;first&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;span class=&quot;hps&quot;&gt;secondary replica&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;ready&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;to accept connections&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and passes it&#39;s URL&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;to the client&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;The client reads&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;hps&quot;&gt;URL&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;hps&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;redirects&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;itself to the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;secondary &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt; &lt;span class=&quot;hps&quot;&gt;readable&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;instance&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span class=&quot;hps&quot;&gt;To test&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;connectivity&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;we&#39;ll now use SQL Server&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Reporting Services,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;in this example&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;I&#39;ll make a&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;simple report&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;(the example&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;is trivial&lt;/span&gt;!) &lt;span class=&quot;hps&quot;&gt;on the &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Sales.dbo.orders &lt;/span&gt;table&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;, including the name &lt;span class=&quot;hps&quot;&gt;of the &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;&lt;span class=&quot;hps&quot;&gt;responding &lt;/span&gt; server,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt; using &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;the following query:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select OrderDate, OrderTotal, @@ServerName as Server from Orders&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;First&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Test:&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;we access&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;with&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;hps&quot;&gt;ApplicationIntent&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;ReadWrite&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvikwEJBqw3Z_Mhlzb8QDmzSUs5DgWkDgBHWVzGMMOodZxzP4abub6IAGuAL2kjBQeXjGpT60cLVBY2R8ArnTjErL-b-TI-FCsZ247DJBF_C1Z1aX7-gFdob_v7f7qRSMIIrqTud_pFM/s1600/AlwaysON_38.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvikwEJBqw3Z_Mhlzb8QDmzSUs5DgWkDgBHWVzGMMOodZxzP4abub6IAGuAL2kjBQeXjGpT60cLVBY2R8ArnTjErL-b-TI-FCsZ247DJBF_C1Z1aX7-gFdob_v7f7qRSMIIrqTud_pFM/s400/AlwaysON_38.jpg&quot; height=&quot;288&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;And&lt;/span&gt; we &lt;span class=&quot;hps&quot;&gt;receive answer&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;from the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLF9_GhcjZsNzK7fylT6onsOi5x2jVbinLCosnxoLcbwbTxC1nmLN0_sx95Y8PFoyvKbayhQkqJC1azsGEVnz4wIZeNI_zPIFck6ZsNJnw7W_TxQ_Q29KU0B9MWJnFmFmEU4Nch1wk6ho/s1600/AlwaysON_39.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLF9_GhcjZsNzK7fylT6onsOi5x2jVbinLCosnxoLcbwbTxC1nmLN0_sx95Y8PFoyvKbayhQkqJC1azsGEVnz4wIZeNI_zPIFck6ZsNJnw7W_TxQ_Q29KU0B9MWJnFmFmEU4Nch1wk6ho/s400/AlwaysON_39.jpg&quot; height=&quot;180&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;And now&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;let&#39;s change&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;the connection type&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;with&amp;nbsp;&lt;/span&gt;&lt;b&gt;ApplicationIntent=ReadOnly&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrPLk0TjsQooZa7tZ63ym3PJjsoGMxAi9EeOELO0hpnVk3x-lJNU08g0LabZtu-m5V3-dBji6PPmXMLAfohC-2r3n8J4oyr1lUpFzTU7Uy5kmJUGkkDxRAoXDXaTfveQJvM6VyKxEs93s/s1600/AlwaysON_40.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrPLk0TjsQooZa7tZ63ym3PJjsoGMxAi9EeOELO0hpnVk3x-lJNU08g0LabZtu-m5V3-dBji6PPmXMLAfohC-2r3n8J4oyr1lUpFzTU7Uy5kmJUGkkDxRAoXDXaTfveQJvM6VyKxEs93s/s400/AlwaysON_40.jpg&quot; height=&quot;291&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;And&lt;/span&gt; &lt;span class=&quot;hps alt-edited&quot;&gt;resubmitting our &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;report we obtain&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyjtP3-8qyd7v5TYPNnJNdhpecDfDPsou4ehTfuoZ4bUnKgVU7hGOKEGGpP5AtVn4cYeVQVryJa9drf1dA8sZqIysFC8rVflBBvWS8ZtLmoH2UfZ8niJ7c9690sZdrXf7OzWvcHsfIqbE/s1600/AlwaysON_41.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyjtP3-8qyd7v5TYPNnJNdhpecDfDPsou4ehTfuoZ4bUnKgVU7hGOKEGGpP5AtVn4cYeVQVryJa9drf1dA8sZqIysFC8rVflBBvWS8ZtLmoH2UfZ8niJ7c9690sZdrXf7OzWvcHsfIqbE/s320/AlwaysON_41.jpg&quot; height=&quot;146&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;We have been&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;routed to the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;first server in the&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;routing&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;defined for&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Replica, remember:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
&lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST2&#39;,&#39;MIA-CLUST3&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;Useful Commands&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C&lt;span class=&quot;hps&quot;&gt;onnection string &lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;example&lt;/span&gt;:&lt;/b&gt;&lt;br /&gt;
Server=tcp:MIA-SQL-CLUST,1433;Database=Sales;IntegratedSecurity=SSPI;ApplicationIntent=ReadOnly;MultiSubnetFailover=True&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Listener Restart:&amp;nbsp; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG] RESTART LISTENER &#39;MIA-SQL-CLUST&#39;; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Related System Views &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM sys.dm_tcp_listener_states&lt;br /&gt;
&lt;br /&gt;
SELECT * from sys.availability_replicas&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SELECT * from sys.availability_read_only_routing_lists&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Ending&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;I hope&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;that this step by step&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot;&gt;guide will&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;help you to&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;take full advantages of&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;this wonderful&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;opportunity offered by&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SQL&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;Server 2012.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;Any&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;corrections&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;and comments&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;are welcome&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;hps&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;That&#39;s it, have fun!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;hps&quot;&gt;&lt;br /&gt;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/3009618226057557659/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/02/sql-server-2012-alwayson_18.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/3009618226057557659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/3009618226057557659'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/02/sql-server-2012-alwayson_18.html' title='SQL Server 2012 AlwaysOn'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqcRD0yNE7pL8AudY_2irzL7C3OsjXYrLMZkyrRt2BBzKRkZd7GXB81u5ARMhfXXIuk399U9cme6iJdloEo9v-IfGxigB0VnpOTTC_CK5s4HenwR3IdItTe2Bqg7gIkix3rNTJSlonDJs/s72-c/AlwaysOn_1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-7714441238132225131</id><published>2013-02-11T18:25:00.003+01:00</published><updated>2014-11-03T09:40:14.208+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AlwaysOn"/><category scheme="http://www.blogger.com/atom/ns#" term="Availability Group"/><category scheme="http://www.blogger.com/atom/ns#" term="High Availability"/><category scheme="http://www.blogger.com/atom/ns#" term="Read Only Routing"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><title type='text'>SQL Server 2012 AlwaysOn</title><content type='html'>&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;a href=&quot;http://ruggierolauria.blogspot.it/2013/02/sql-server-2012-alwayson_18.html&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;english version &lt;/span&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Introduzione&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Una delle più grandi novità introdotte da SQL Server 2012 sotto il profilo dell&#39; alta disponibilità è la tecnologia AlwaysOn.&lt;br /&gt;
Questa si suddivide in due tipologie:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;AlwaysOn&amp;nbsp; Failover Cluster Instance&lt;/b&gt;: Protezione a livello di singola istanza, miglioramento della tradizionale installazione in Cluster di SQL Server nel monitoraggio dello stato di salute e nelle implementazioni Multi-Subnet&lt;/li&gt;
&lt;li&gt;&lt;b&gt;AlwaysOn Availability Group&lt;/b&gt;: Protezione a livello di Database, evoluzione del DB mirroring delle versioni precedenti di SQL Server&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqcRD0yNE7pL8AudY_2irzL7C3OsjXYrLMZkyrRt2BBzKRkZd7GXB81u5ARMhfXXIuk399U9cme6iJdloEo9v-IfGxigB0VnpOTTC_CK5s4HenwR3IdItTe2Bqg7gIkix3rNTJSlonDJs/s1600/AlwaysOn_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqcRD0yNE7pL8AudY_2irzL7C3OsjXYrLMZkyrRt2BBzKRkZd7GXB81u5ARMhfXXIuk399U9cme6iJdloEo9v-IfGxigB0VnpOTTC_CK5s4HenwR3IdItTe2Bqg7gIkix3rNTJSlonDJs/s400/AlwaysOn_1.jpg&quot; height=&quot;246&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;right&quot;&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;Source: Microsoft Learning&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihzAyfbdgDHZo76UwlDBpsTchHZOadJm_sbViJsOAgZ7vEVlN45IirFEYMZrYu_XDA_RcOM39lnT0bLGvOt73oMqq50582GMsoWWOkGqfTrXEDq8h-T_vDu3Sl2XwsSbquS2wi-ilkb5E/s1600/AlwaysOn_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihzAyfbdgDHZo76UwlDBpsTchHZOadJm_sbViJsOAgZ7vEVlN45IirFEYMZrYu_XDA_RcOM39lnT0bLGvOt73oMqq50582GMsoWWOkGqfTrXEDq8h-T_vDu3Sl2XwsSbquS2wi-ilkb5E/s1600/AlwaysOn_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;La prima soluzione in termini archietturali poco aggiunge alle precedenti versioni se non l&#39;eliminazione della necessità di creazione di una VLAN per i nodi del cluster; invece i gruppi di diponibilità sono una vera novità, forse uno di quei particolari per cui varrebbe la pena di migrare ad SQL 2012.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&lt;b&gt;AlwaysOn Availability Group&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Generale &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Questa tecnologia sfrutta i vantaggi offerti dal &lt;b&gt;Windows Server Failover Cluster &lt;/b&gt;(WSFC) per fornire una soluzione di alta disponibilità per i Database SQL Server. E&#39; un evoluzione della tecnologia di DB mirroring, introdotta con la versione SQL Server 2005, ma offre questi fondamentali vantaggi aggiuntivi:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Il numero dei nodi non è più limitato a 2&lt;/li&gt;
&lt;li&gt;Il failover non è più fatto dal client, ma avviene lato server in maniera trasparente per i client&lt;/li&gt;
&lt;li&gt;E&#39; possibile accedere in sola lettura ad un nodo passivo del gruppo di disponibilità&lt;/li&gt;
&lt;li&gt;E&#39; possibile eseguire le operazioni di backup su un nodo passivo&amp;nbsp; del gruppo di disponibilità&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;Nonostante questa tecnologia si basi sul Failover Cluster non è necessario:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Avere uno storage condiviso fra i nodi del cluster&lt;/li&gt;
&lt;li&gt;Fare un installazione in Cluster di SQL Server&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;Quindi ogni nodo avrà un&#39;installazione autonoma di SQL Server con i dati su uno storage locale del nodo.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;In Windows Server 2012 la funzionalità di Failover Cluster è disponibile anche sulla versione Standard&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Non esiste nessun problema nel creare nodi virtualizzati, se non le solite raccomandazioni relative al fare girare SQL Server su una macchina virtuale&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Terminologia&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCq86U42sSELdvHz2E2XU-K1K3jio_dRS7NPQJFNRXfhWZYrT3mRFhyphenhyphenfCzn_0oJLjaxzmnlcZELR9KHFlDmPbx3lLMS-L3U6e8_W0YQhQ7nrOoKEAwDhnf-4MraTn0psAgzpNtqg62GFQ/s1600/AlwaysOn_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCq86U42sSELdvHz2E2XU-K1K3jio_dRS7NPQJFNRXfhWZYrT3mRFhyphenhyphenfCzn_0oJLjaxzmnlcZELR9KHFlDmPbx3lLMS-L3U6e8_W0YQhQ7nrOoKEAwDhnf-4MraTn0psAgzpNtqg62GFQ/s1600/AlwaysOn_2.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr align=&quot;right&quot;&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;Source: Microsoft Learning&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;AlwaysOn Availability Group&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;:&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;span style=&quot;font-size: small;&quot;&gt;gruppo di&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;server (in cluster) che mette in alta disponibilità uno o più Database&lt;br /&gt;
&lt;b&gt;Primary Replica:&lt;/b&gt;&amp;nbsp; istanza che ospita la copia in lettura e scrittura del Database&lt;br /&gt;
&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Secondary Replica:&lt;/b&gt; host che ospita una copia del database su cui è possibile abilitare accessi in sola lettura &lt;i&gt;&lt;b&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Listener: &lt;/b&gt;consiste di un nome DNS, una porta TCP ed uno o più indirizzi IP attraverso cui i client si connettono al gruppo di disponibilità&lt;br /&gt;
&lt;b&gt;Availability Modes&lt;/b&gt;:&amp;nbsp; modalità di replica dei dati fra il membro primario ed i secondari, può essere:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Commit-Synchronous:&lt;/b&gt; la replica primaria attende conferma che le modifiche siano state apportate sul membro secondario prima di chiudere la transazione&lt;b&gt;. &lt;/b&gt;Affidabile ma pericoloso per le performances&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Commit-Asynchronous:&lt;/b&gt; il membro primario invia le modifiche al secondario e chiude la transazione senza aspettare conferma sull&#39;esito.Non affidabile ma performante.&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;Failover:&lt;/b&gt;&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;processo attraverso il quale il ruolo di replica primaria viene passato ad una replica secondaria, chiamata failover target. Sono disponibili 3 tipi di failover:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Failover automatico&lt;/b&gt; (senza perdita di dati): disponibile quando sia la replica primaria che la secondaria operano in modalità&lt;b&gt; sincrona&lt;/b&gt;&lt;i&gt; (&lt;/i&gt;Commit-Synchronous). In questo caso la modalità di failover nel gruppo è impostata su automatica ed&amp;nbsp; il passaggio di ruoli avviene senza alcun intervento amministrativo.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Failover manuale pianificato&lt;/b&gt; (senza perdita di dati): come nel caso precedente i due membri operano in modalità&lt;b&gt; sincrona&lt;/b&gt;, ma non essendo stato impostato il failover automatico è necessario l&#39;intervento amministrativo&amp;nbsp; per inviare il comando di failover.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Failover manuale forzato&lt;/b&gt; (con possibile perdita di dati): i due membri di replica operano in modalità&lt;b&gt; asincrona &lt;/b&gt;e quindi l&#39;amministratore può forzare il failover sapendo che eventuali transazioni del membro primario non ancora sincronizzate andranno perse.&lt;b&gt; &lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;Active Secondary Replicas: &lt;/b&gt;per migliorare le performance e gestire in maniera più efficiente le risorse del gruppo di disponibilità è possibile indirizzare le richieste di sola lettura e backup verso repliche secondarie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Installazione&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
L&#39;obiettivo di questo articolo è centrato sugli &lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Availability Group&lt;/span&gt;&lt;/b&gt; e non sulla configurazione del Cluster di Failover, quindi non entrerò nei dettagli su questa parte.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) &lt;/b&gt;Installare la funzionalità di&lt;b&gt; Failover Cluster&lt;/b&gt; sui Server&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfB-el8z5QoPlVaNDZ8vsTyM7W5HAGf_Z-osvxL3KjHOyHeOWZwHCX64euIdU-gc26lzxABELZcc-lDp4XiQ4Qq5DYXXbmTe8N5v4DflTs320SBDiQOxSoKWeEffYl7Dk9DKuBIQue3q4/s1600/AlwaysOn_5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfB-el8z5QoPlVaNDZ8vsTyM7W5HAGf_Z-osvxL3KjHOyHeOWZwHCX64euIdU-gc26lzxABELZcc-lDp4XiQ4Qq5DYXXbmTe8N5v4DflTs320SBDiQOxSoKWeEffYl7Dk9DKuBIQue3q4/s1600/AlwaysOn_5.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
2) Creare un &lt;b&gt;Cluster di Failover&lt;/b&gt; che comprenda tutti i Server&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ylP7AkMCXYMoNSHsvxF2EoB88IYTXRR1aML9jAlcRwSdeZy0GkRIyw7UuRf539KaghISObDrCPM9NmUCLMYqFui-CjyH09gm2BQCVHGpEnBWrskeEJpnst8IctzYU_c_yrJfki8Y1NE/s1600/AlwaysOn_6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ylP7AkMCXYMoNSHsvxF2EoB88IYTXRR1aML9jAlcRwSdeZy0GkRIyw7UuRf539KaghISObDrCPM9NmUCLMYqFui-CjyH09gm2BQCVHGpEnBWrskeEJpnst8IctzYU_c_yrJfki8Y1NE/s400/AlwaysOn_6.jpg&quot; height=&quot;198&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;nel nostro esempio abbiamo creato un cluster MIA-CLUSTER a cui partecipano i server:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;MIA-CLUST1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;MIA-CLUST2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;MIA-CLUST3&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;b&gt;Notare che nel Cluster non c&#39;è Storage condiviso. &lt;/b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd-h7XZU2z4Tm3it7E79tOEMVPONKUtNTY3MDLcjF7hTIe3BYjx65ZxI0HNO-iCaS_pFAmTXBVlh5sw_aiA1_lbk2hpzCKA37mBH9uQHJIcGJL7-mXWa364onR7jlI9F0Tb0Bu92syLt0/s1600/AlwaysOn_7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd-h7XZU2z4Tm3it7E79tOEMVPONKUtNTY3MDLcjF7hTIe3BYjx65ZxI0HNO-iCaS_pFAmTXBVlh5sw_aiA1_lbk2hpzCKA37mBH9uQHJIcGJL7-mXWa364onR7jlI9F0Tb0Bu92syLt0/s400/AlwaysOn_7.jpg&quot; height=&quot;262&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3) Installare un&#39;istanza Standalone di SQL Server 2012 su ogni Server&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4sOdPg7Ia44uvPw4HgHMVvEvbtWRmD-hVoEtbpTFERbezI8hKqPn4_htIPFBulhXd_6KKiAg3P61prL_UhICqCCFnSGsB2-IAaSTfqwBFziUHKjow9t5OhyphenhyphenxD2OjIuybA9-qmDoLR_zQ/s1600/AlwaysOn_8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4sOdPg7Ia44uvPw4HgHMVvEvbtWRmD-hVoEtbpTFERbezI8hKqPn4_htIPFBulhXd_6KKiAg3P61prL_UhICqCCFnSGsB2-IAaSTfqwBFziUHKjow9t5OhyphenhyphenxD2OjIuybA9-qmDoLR_zQ/s400/AlwaysOn_8.jpg&quot; height=&quot;75&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Note: &lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Usate un account di dominio per il Servizio SQL&lt;/li&gt;
&lt;li&gt;Potete installare solo il Motore di Database, opzionalmente anche gli strumenti di gestione &lt;/li&gt;
&lt;/ul&gt;
4) Attaverso il Configuration Manager abilitate AlwaysOn Availability Group su ogni Server&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnIDX0lSGZfIGjCwiA4yNjFXSBSU6rIUcKDQjikAolqIcSqyRoRGgrdwMMZNSJ4WpKuVXZ-ApyLefWetHfvlrJCN3Nr9qlEQtndODQ4zgCr-QxIIVgAnLSFIsTsYLf__SEmv1z8Yk08mY/s1600/AlwaysOn_9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnIDX0lSGZfIGjCwiA4yNjFXSBSU6rIUcKDQjikAolqIcSqyRoRGgrdwMMZNSJ4WpKuVXZ-ApyLefWetHfvlrJCN3Nr9qlEQtndODQ4zgCr-QxIIVgAnLSFIsTsYLf__SEmv1z8Yk08mY/s400/AlwaysOn_9.jpg&quot; height=&quot;260&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Riavviate i servizi di SQL Server&lt;br /&gt;
&lt;br /&gt;
5) Create una condivisione di rete per i file di Backup utilizzati per sincronizzare le repliche&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWvOdGkmBbgPfnr0u6jNYyTn2_sqnElLzktBHUc40iLkXfvx79LVo1habWx4HqADHky-0oAd8XZ59hxjIMfY48AT5tw_N3bBBJVb4IHR0x9419ClYsIPlq6odKshBsmAWm_smNm2bcSXM/s1600/AlwaysOn_10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWvOdGkmBbgPfnr0u6jNYyTn2_sqnElLzktBHUc40iLkXfvx79LVo1habWx4HqADHky-0oAd8XZ59hxjIMfY48AT5tw_N3bBBJVb4IHR0x9419ClYsIPlq6odKshBsmAWm_smNm2bcSXM/s400/AlwaysOn_10.jpg&quot; height=&quot;148&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Creiamo i DataBase che vogliamo proteggere sul Server che diventerà la Replica Primaria&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitgysXJuFN9WmhS4PJ7huCrdfabKKHnYTest-l-QSRD50oDN9cotXy7jnQIDRCq8RjGVHr5ahhCHZ05kv9tCMCVndVVhkxEl8jPR-FRUGXfoOWGljq7B-PEzqSk-y7UeeWwc0-sQM41Q/s1600/AlwaysON_11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitgysXJuFN9WmhS4PJ7huCrdfabKKHnYTest-l-QSRD50oDN9cotXy7jnQIDRCq8RjGVHr5ahhCHZ05kv9tCMCVndVVhkxEl8jPR-FRUGXfoOWGljq7B-PEzqSk-y7UeeWwc0-sQM41Q/s320/AlwaysON_11.jpg&quot; height=&quot;320&quot; width=&quot;232&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Nel nostro caso il Server che svolgerà il ruolo di Replica Primaria è&lt;b&gt; MIA-CLUST1&lt;/b&gt; e mettiamo in alta disponibilità il Database&lt;b&gt; Sales &lt;/b&gt;&lt;br /&gt;
Controllate che il Recovery Model sia Full&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZGtOoZmfxIc3iAtDlYM_a-bwtsKdsqZFfwiyvESvHV5AxMA9M-TWxvrHGcJKcV-rBS1ZVnlJD0llQTTw8QBLhAYUCVae0rWT8zyjbfkZQXst3kTOixRiTXpMWvfDzXQ5J-bTO4zwccak/s1600/AlwaysON_12.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZGtOoZmfxIc3iAtDlYM_a-bwtsKdsqZFfwiyvESvHV5AxMA9M-TWxvrHGcJKcV-rBS1ZVnlJD0llQTTw8QBLhAYUCVae0rWT8zyjbfkZQXst3kTOixRiTXpMWvfDzXQ5J-bTO4zwccak/s400/AlwaysON_12.jpg&quot; height=&quot;118&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
7) Creiamo un AlwaysOn Avalaibilty Group&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Lanciamo il Wizard dal Server Primario &lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiG1zAyKJGVDf0mZLtsQznaCj3Q7UEaya76EN_seXSr41hMzZw_vfmuJxEMkB3NzOfW47SUXXKK4esCw8kjDt42u5fKfub6HQk7WtlQYYBsUHn2lafpBIWl3BNObFc2HIOosaQ4E7bh8g/s1600/AlwaysON_14.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiG1zAyKJGVDf0mZLtsQznaCj3Q7UEaya76EN_seXSr41hMzZw_vfmuJxEMkB3NzOfW47SUXXKK4esCw8kjDt42u5fKfub6HQk7WtlQYYBsUHn2lafpBIWl3BNObFc2HIOosaQ4E7bh8g/s400/AlwaysON_14.jpg&quot; height=&quot;400&quot; width=&quot;261&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XfH0W23BMSLmH29UYTTsdlk9HiJWVTQ1xy1TqI1r39nZzslbIV5hJy8dDGTblo1Sj1PMsw9r7y6REzfdVmRyGqvFPRMWnSrXbgW67uqzxIP2XuxIQn9Twe3xnuupSw8JuN8XUgm5tIM/s1600/AlwaysON_15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XfH0W23BMSLmH29UYTTsdlk9HiJWVTQ1xy1TqI1r39nZzslbIV5hJy8dDGTblo1Sj1PMsw9r7y6REzfdVmRyGqvFPRMWnSrXbgW67uqzxIP2XuxIQn9Twe3xnuupSw8JuN8XUgm5tIM/s400/AlwaysON_15.jpg&quot; height=&quot;362&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;Specifichiamo il nome del nostro AG&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVByg2T3CpY48pYHld2U1S3Fc3d0Z-3FkkN8kXphcuXi54RKbQYrzwljzYyi3JYXHDQ3HRnq_ALKyL_QUqax3i0ZLIsVMsed4wBvsJtnPueVlkYOxnjAv03f31gPAXt65MF75zhARlDqg/s1600/AlwaysON_16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVByg2T3CpY48pYHld2U1S3Fc3d0Z-3FkkN8kXphcuXi54RKbQYrzwljzYyi3JYXHDQ3HRnq_ALKyL_QUqax3i0ZLIsVMsed4wBvsJtnPueVlkYOxnjAv03f31gPAXt65MF75zhARlDqg/s400/AlwaysON_16.jpg&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;Selezioniamo il database Sales&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhVSIFb-FhTPKM0dajRDwscKKw9D0M2fYKQ5lfL0zpgbz_RtTiKHwBs0xjaCTZe_Z0tdFyhkVS08GRSRVdDx4XLrmAWHtVeg3xhm1XqSc1cilKEOzLjoTUqEYvqVngDHKNHvOo0Dt7L5w/s1600/AlwaysON_17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhVSIFb-FhTPKM0dajRDwscKKw9D0M2fYKQ5lfL0zpgbz_RtTiKHwBs0xjaCTZe_Z0tdFyhkVS08GRSRVdDx4XLrmAWHtVeg3xhm1XqSc1cilKEOzLjoTUqEYvqVngDHKNHvOo0Dt7L5w/s400/AlwaysON_17.jpg&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecGos1yEOGBY6prClNPZpGBt40QRg30-4qwaGy2xH7ovML8m97A5ohW346cfQ1x16Oa3NmxFYgg0gPnm6Hutsb2oDkeq9mI6h_GnZs-mdtqtrG9MVXeCbZeMP8V7PCzrk5UEYBhD9Hic/s1600/AlwaysON_18.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiecGos1yEOGBY6prClNPZpGBt40QRg30-4qwaGy2xH7ovML8m97A5ohW346cfQ1x16Oa3NmxFYgg0gPnm6Hutsb2oDkeq9mI6h_GnZs-mdtqtrG9MVXeCbZeMP8V7PCzrk5UEYBhD9Hic/s400/AlwaysON_18.jpg&quot; height=&quot;368&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Aggiungiamo le Repliche Secondarie: Add Replica...&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH-uuGwC2qnlPGLtskSk4GfsgI3igZ7MONGApdQMzKSNx1x4lfzaCv5H14DnerlFeVpuFR4G1qzzRAUUoVWGzjdcliofvSTeqNFaRhhyJbj0NWCCy5YVGCgnpSXCeAPOVJcEw4d_zV83Q/s1600/AlwaysON_19.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH-uuGwC2qnlPGLtskSk4GfsgI3igZ7MONGApdQMzKSNx1x4lfzaCv5H14DnerlFeVpuFR4G1qzzRAUUoVWGzjdcliofvSTeqNFaRhhyJbj0NWCCy5YVGCgnpSXCeAPOVJcEw4d_zV83Q/s400/AlwaysON_19.jpg&quot; height=&quot;296&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvLZRzxHn5N0dvMdSch1tBRE3J1Im1Eu1xu8uB7rvwD8N0IO99IX_UrNBWft7bsUx4AVFLpdd9jEsSZYQ_M-HvxMH68JLchS1Q6Qs4Aj5GfbZbIR8BYvOysHloCZDze-I-aejIEv5n210/s1600/AlwaysON_20.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvLZRzxHn5N0dvMdSch1tBRE3J1Im1Eu1xu8uB7rvwD8N0IO99IX_UrNBWft7bsUx4AVFLpdd9jEsSZYQ_M-HvxMH68JLchS1Q6Qs4Aj5GfbZbIR8BYvOysHloCZDze-I-aejIEv5n210/s400/AlwaysON_20.jpg&quot; height=&quot;368&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Configuriamo il Listener &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCU19v2DUEloFf6NyKsmk1IwcA9XN-5sWaxZoTPOmpQf7mMEkxdOVRSlVIbJWi4NDt-u-n4xBzxkZAmueGtQ9tyOUgAStvoXISequpBzvZm4kYbcLzUA3zjULFcWY532yTBXhuE_yePSA/s1600/AlwaysON_21.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCU19v2DUEloFf6NyKsmk1IwcA9XN-5sWaxZoTPOmpQf7mMEkxdOVRSlVIbJWi4NDt-u-n4xBzxkZAmueGtQ9tyOUgAStvoXISequpBzvZm4kYbcLzUA3zjULFcWY532yTBXhuE_yePSA/s400/AlwaysON_21.jpg&quot; height=&quot;316&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Impostiamo il Folder per la sincronizzazione&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdVxiOPVxkVRdToMh3_RHORsyX35FURXDyGFWV4gcyi80kCl_Z41E9ViCH_YHy5a6rDF3lZMTIZr2hwJmGZIVuiqNPJYfIz-TYy4SQdEWlHSp_IOFBk4tC1djmAlqFQTxDkTOL1ifO8YI/s1600/AlwaysON_22.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdVxiOPVxkVRdToMh3_RHORsyX35FURXDyGFWV4gcyi80kCl_Z41E9ViCH_YHy5a6rDF3lZMTIZr2hwJmGZIVuiqNPJYfIz-TYy4SQdEWlHSp_IOFBk4tC1djmAlqFQTxDkTOL1ifO8YI/s400/AlwaysON_22.jpg&quot; height=&quot;320&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPeSVFLEN-48tlqQMohhxbsQWjY86ifRnqtzLjTYKFYQCtFJ7aWVAKC-7oLkJJXGlvFpwuJyeaUQBSSkSatC-SW0o5_N2QpIdZY82Mw1JYtxOVqEDvNr8ahQnJN4mlQZSee1ZQipyQvWo/s1600/AlwaysON_23.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPeSVFLEN-48tlqQMohhxbsQWjY86ifRnqtzLjTYKFYQCtFJ7aWVAKC-7oLkJJXGlvFpwuJyeaUQBSSkSatC-SW0o5_N2QpIdZY82Mw1JYtxOVqEDvNr8ahQnJN4mlQZSee1ZQipyQvWo/s400/AlwaysON_23.jpg&quot; height=&quot;318&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic3A4jpATkjDPU3LIJyhr6qqeqljYjkysY2KK-c7ES7PMp97Y_zq2G77RTmN77s3dn6Kt0220WnZ5-XxCz5fFhZsHt1dW8xqK1PrUaYK3Em2879gFlMpBcIKorDNTV3YBS0Fx0M8wRrY0/s1600/AlwaysON_24.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic3A4jpATkjDPU3LIJyhr6qqeqljYjkysY2KK-c7ES7PMp97Y_zq2G77RTmN77s3dn6Kt0220WnZ5-XxCz5fFhZsHt1dW8xqK1PrUaYK3Em2879gFlMpBcIKorDNTV3YBS0Fx0M8wRrY0/s400/AlwaysON_24.jpg&quot; height=&quot;318&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Controlliamo l&#39;esito &lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGXOTV3a6z3L0uqlRZ4gJdxaA7jifeWn8cxl42mJZRJYr_04r2RjHZ0e1HvU-9nCSsq3mjfgoA06pyEsKaWuCMwY-su-H2HYPOSXqqpkInFr7Tgqv75V2RVeq7GP3_ve0CWBpTB0Xqz8/s1600/AlwaysON_25.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGXOTV3a6z3L0uqlRZ4gJdxaA7jifeWn8cxl42mJZRJYr_04r2RjHZ0e1HvU-9nCSsq3mjfgoA06pyEsKaWuCMwY-su-H2HYPOSXqqpkInFr7Tgqv75V2RVeq7GP3_ve0CWBpTB0Xqz8/s400/AlwaysON_25.jpg&quot; height=&quot;315&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp; Il warning ricevuto relativo al WSFC è trascurabile &lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Risultato Finale:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Il Database Sales è replicato su tutti e tre i Server &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKeP8hVGOLP3WF_-KOqOWgg4lGKNxi9yoFLpb1YZpl7YFicvzOsnnzYmEhzYHNWixqzxtVOhQVI4B6HAQqAjTJUerBRPvQ95Zk_z_nq5Xdx2NcJZikJySVvDKwdiUQtio0-9Y59fNiJM8/s1600/AlwaysON_26.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKeP8hVGOLP3WF_-KOqOWgg4lGKNxi9yoFLpb1YZpl7YFicvzOsnnzYmEhzYHNWixqzxtVOhQVI4B6HAQqAjTJUerBRPvQ95Zk_z_nq5Xdx2NcJZikJySVvDKwdiUQtio0-9Y59fNiJM8/s400/AlwaysON_26.jpg&quot; height=&quot;400&quot; width=&quot;190&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;Nel cluster è stato creato un servizio il cui Onwer è il nostro Primary Replica&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxYVIbhBfrTaaH1huBZdyPtrJYJFe3o85mGzE9gyz9scQKINqehqZYI4YKyiYrBXHAhcdyPF-C4JDb-8cLnaM0K8VfJe3wGMKCB91odLGD9I21tQB0y0xfrUH5_9zj0DQoEiYsOnvV1OQ/s1600/AlwaysON_27.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxYVIbhBfrTaaH1huBZdyPtrJYJFe3o85mGzE9gyz9scQKINqehqZYI4YKyiYrBXHAhcdyPF-C4JDb-8cLnaM0K8VfJe3wGMKCB91odLGD9I21tQB0y0xfrUH5_9zj0DQoEiYsOnvV1OQ/s320/AlwaysON_27.jpg&quot; height=&quot;267&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Configurazione&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Adesso facciamo un esempio di configurazione&lt;span style=&quot;font-size: small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Entriamo nelle proprietà del nostro Availability Group &lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iAZvDRajEHhebsY7bvNhsYvwBxIXYauV1NkRWm2-xxUXRldSU4nLiPkTh3WDKLJuQv0rdUuxhlVvuL3-P6gVoDfo-3vCSgDojyyJiGZntKTp1GwgpU2DkPqPSrvljxKPw9fhBXhKIsk/s1600/AlwaysON_34.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iAZvDRajEHhebsY7bvNhsYvwBxIXYauV1NkRWm2-xxUXRldSU4nLiPkTh3WDKLJuQv0rdUuxhlVvuL3-P6gVoDfo-3vCSgDojyyJiGZntKTp1GwgpU2DkPqPSrvljxKPw9fhBXhKIsk/s400/AlwaysON_34.jpg&quot; height=&quot;277&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcZVC6vsxehQyJ7YFUCZGYCvkwFzwkdG81koKKuFAws-GbvliFEimDZj8L5utHULNil-akJd3sWFzooh_iHyxpGdICKj4s3wtbBDduYmjINDnnyJLtv8w3B0azg88AnCuAniONaO60agk/s1600/AlwaysON_29.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Impostiamo MIA-CLUST2 in modalità sincrona ed abilitiamo il failover automatico&lt;br /&gt;
Lasciamo MIA-CLUST3 in modalità asincrona, e quindi il failover può essere solo manuale&lt;br /&gt;
Rendiamo ambedue le Repliche Secondarie leggibili ed analizziamo meglio le opzioni disponibili.&lt;br /&gt;
Ricordiamo che ogni server può potenzialmente agire in due modalità: Primario e Secondario, qui abbiamo le opzioni disponibili per ogni server in base al ruolo che svolge (la situazione può essere dinamica):&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Connections in primary role&lt;/b&gt;: quando agisce da primario, può accettare tutte le connessioni o solo quelle in scrittura.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtmueKdqW5xBgQmrzAvaEeaQn5Iu3VDqnZzLMuUvlY_gEH5DrPW40aD7mb9oqNcAh586Usn9F-FlOLR6uAhSSysNvdip-i-9mSsJFQ7q4FbloGDFYmiTXvD-ulFGMHpwPoXtlqDCE0osQ/s1600/AlwaysON_32.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtmueKdqW5xBgQmrzAvaEeaQn5Iu3VDqnZzLMuUvlY_gEH5DrPW40aD7mb9oqNcAh586Usn9F-FlOLR6uAhSSysNvdip-i-9mSsJFQ7q4FbloGDFYmiTXvD-ulFGMHpwPoXtlqDCE0osQ/s1600/AlwaysON_32.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Readable Secondary: &lt;/b&gt;quando agisce da secondario può non accettare connessioni, accettarle tutte (ma dare errore se si prova a modificare i dati) o accettare solo le connessioni che abbiano esplicitamente Intent=Readonly&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIh9aoNwOMdQjSTl2mF-wA6p_3Uml1Hi2ZkTnMaCiSr7pwXNRp9Dsoq1eUzEBkX5yTxvbNj7tL6DT3XAGUfZDKXdibRLLC1sJW6WXIdMu0DiGWYmqgwojBq2tR_tW-c57hBkvKN7uHB4U/s1600/AlwaysON_33.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIh9aoNwOMdQjSTl2mF-wA6p_3Uml1Hi2ZkTnMaCiSr7pwXNRp9Dsoq1eUzEBkX5yTxvbNj7tL6DT3XAGUfZDKXdibRLLC1sJW6WXIdMu0DiGWYmqgwojBq2tR_tW-c57hBkvKN7uHB4U/s1600/AlwaysON_33.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Andiamo poi nella sezione Backup Preferences&lt;br /&gt;
Lasciamo il default a Prefer Secondary, in questo modo i backup verrano sempre fatti sui secondari, se disponibili.&lt;br /&gt;
Cambiamo la priorità del backup mettendo avanti il Server MIA-CLUST3&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcZVC6vsxehQyJ7YFUCZGYCvkwFzwkdG81koKKuFAws-GbvliFEimDZj8L5utHULNil-akJd3sWFzooh_iHyxpGdICKj4s3wtbBDduYmjINDnnyJLtv8w3B0azg88AnCuAniONaO60agk/s1600/AlwaysON_29.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcZVC6vsxehQyJ7YFUCZGYCvkwFzwkdG81koKKuFAws-GbvliFEimDZj8L5utHULNil-akJd3sWFzooh_iHyxpGdICKj4s3wtbBDduYmjINDnnyJLtv8w3B0azg88AnCuAniONaO60agk/s400/AlwaysON_29.jpg&quot; height=&quot;300&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I risultati delle nostre impostazioni sono anche visibili dalla Dashboard dell&#39; AG&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcQJ-_x-iw5cG6dAEOwpRqIQGA0JMFeChKl55J2ghv4jx1L8BGTkiL5-vQo7LtZcHefo973ILBUNWBNPxTbSDYzbq6VNll1quZM3Al2nT39L2BUeuGiDsUJlx2SHGOlBX184iPmVINa7w/s1600/AlwaysON_30.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcQJ-_x-iw5cG6dAEOwpRqIQGA0JMFeChKl55J2ghv4jx1L8BGTkiL5-vQo7LtZcHefo973ILBUNWBNPxTbSDYzbq6VNll1quZM3Al2nT39L2BUeuGiDsUJlx2SHGOlBX184iPmVINa7w/s400/AlwaysON_30.jpg&quot; height=&quot;321&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s1600/AlwaysON_31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s400/AlwaysON_31.jpg&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;READ-ONLY ROUTING&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Dopo aver reso le nostre repliche secondarie leggibili&amp;nbsp; già possible accedervi puntando direttamente al nome del Server.&lt;br /&gt;
Esempio di accesso al MIA-CLUST2&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibw-iunQCtVTboNFCKhuAb4yRI8J4kqEM7vp1ZaJDebcfME4oKiVp-wwC-JeHN0dPIqi-MIX40hiH0xP8L1Cf57OoWqx5UKRf67pHaKDE_KglUE5j0HxWdHdX0bOqgITxZQatZzBxGZ4c/s1600/AlwaysON_35.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibw-iunQCtVTboNFCKhuAb4yRI8J4kqEM7vp1ZaJDebcfME4oKiVp-wwC-JeHN0dPIqi-MIX40hiH0xP8L1Cf57OoWqx5UKRf67pHaKDE_KglUE5j0HxWdHdX0bOqgITxZQatZzBxGZ4c/s400/AlwaysON_35.jpg&quot; height=&quot;151&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Esempio di accesso a MIA-CLUST3 (impostato read-intent only, notare l&#39;errore nel primo tentativo)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGnyK1rQv0cd5Pk3sC7EIVkuey4KBneZSsrsa3qSj4y5wE-nox6hYfSzcRh957ztfjfuVdfwQTBPswXVEh9U64C0VdGL23bFcsPb0Js4N0x6sj_1H4Aes0FLLpm2gWQNymRqnIwEAe5zw/s1600/AlwaysON_36.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGnyK1rQv0cd5Pk3sC7EIVkuey4KBneZSsrsa3qSj4y5wE-nox6hYfSzcRh957ztfjfuVdfwQTBPswXVEh9U64C0VdGL23bFcsPb0Js4N0x6sj_1H4Aes0FLLpm2gWQNymRqnIwEAe5zw/s400/AlwaysON_36.jpg&quot; height=&quot;185&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Ma se vogliamo creare un meccanismo che indirizzi automaticamente le richieste di sola lettura verso le Repliche Secondarie dobbiamo implementare in Read-Only Routing.&lt;br /&gt;
&lt;br /&gt;
Per la configurazione potete fare riferimento a questo &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh710054.aspx&quot;&gt;articolo&lt;/a&gt; ma riassumendo:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Dobbiamo avere configurato un Listener e noi lo abbiamo fatto nel wizard:&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DNS: MIA-SQL-CLUSTER &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; IP: 10.10.0.40&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCP Port: 1433&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCU19v2DUEloFf6NyKsmk1IwcA9XN-5sWaxZoTPOmpQf7mMEkxdOVRSlVIbJWi4NDt-u-n4xBzxkZAmueGtQ9tyOUgAStvoXISequpBzvZm4kYbcLzUA3zjULFcWY532yTBXhuE_yePSA/s1600/AlwaysON_21.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCU19v2DUEloFf6NyKsmk1IwcA9XN-5sWaxZoTPOmpQf7mMEkxdOVRSlVIbJWi4NDt-u-n4xBzxkZAmueGtQ9tyOUgAStvoXISequpBzvZm4kYbcLzUA3zjULFcWY532yTBXhuE_yePSA/s400/AlwaysON_21.jpg&quot; height=&quot;316&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Identifichiamo la URL per connessione ad ogni Server membro del nostro AG&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nel nostro caso: TCP://MIA-CLUST1.AdventureWorks.msft:1433&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCP://MIA-CLUST2.AdventureWorks.msft:1433&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TCP://MIA-CLUST3.AdventureWorks.msft:1433&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Potete utilizzare questo &lt;a href=&quot;http://blogs.msdn.com/b/mattn/archive/2012/04/25/calculating-read-only-routing-url-for-alwayson.aspx&quot;&gt;script&lt;/a&gt;&amp;nbsp; realizzato da Matt Neerincx che fornisce un output del tipo&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYop-daLb_JmVCuMlgQt4r5aqOX5aDAAtJxFpkiIzyVHU8NbqXTmp-DOgZhGgV6l2jAHczOIfTBLiM4l6te1L8vqei0rX9kIBzlnA2wckAxbcqis-hUQXSnfPLcJB5XtxX5F8QnsC1phA/s1600/AlwaysON_37.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYop-daLb_JmVCuMlgQt4r5aqOX5aDAAtJxFpkiIzyVHU8NbqXTmp-DOgZhGgV6l2jAHczOIfTBLiM4l6te1L8vqei0rX9kIBzlnA2wckAxbcqis-hUQXSnfPLcJB5XtxX5F8QnsC1phA/s400/AlwaysON_37.jpg&quot; height=&quot;107&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Configuriamo i nostri Read_only_routing dando questi comandi sulla nostra Replica Primaria:&lt;/li&gt;
&lt;/ul&gt;
___________________ Start ____________________________ &lt;br /&gt;
-- Configure Read_Only_Routing &lt;br /&gt;
-- This script need to be paramatrized with your deployment data!&lt;br /&gt;
--&amp;nbsp; Ruggiero Lauria &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Enable Server as Readable when acting as Secondary Replica &amp;nbsp; &lt;br /&gt;
-- This command is not strictly necessary because we have already configured it&lt;br /&gt;
-- trough AG propriety. But for completeness I preferred to include it in the script&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&amp;nbsp;MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));&lt;br /&gt;
&lt;br /&gt;
-- Define Server Read_only_routing URL &lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&amp;nbsp;MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N&#39;TCP://MIA-CLUST1.AdventureWorks.msft:1433&#39;));&lt;br /&gt;
&lt;br /&gt;
-- Enable Server as Readable when acting as Secondary Replica &lt;br /&gt;
&lt;br /&gt;
-- This command is not strictly necessary because we have already configured it&lt;br /&gt;
-- trough AG propriety. But for completeness I preferred to include it in the script&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&amp;nbsp;MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST2&#39; WITH &lt;br /&gt;
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));&lt;br /&gt;
&lt;br /&gt;
-- Define Server Read_only_routing URL &lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&amp;nbsp;MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST2&#39; WITH &lt;br /&gt;
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N&#39;TCP://MIA-CLUST2.AdventureWorks.msft:1433&#39;));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Enable Server as Readable when acting as Secondary Replica &amp;nbsp;&amp;nbsp; &lt;br /&gt;
-- This command is not strictly necessary because we have already configured it&lt;br /&gt;
-- trough AG propriety. But for completeness I preferred to include it in the script&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&amp;nbsp;MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST3&#39; WITH &lt;br /&gt;
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));&lt;br /&gt;
&lt;br /&gt;
-- Define Server Read_only_routing URL&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
&amp;nbsp;MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST3&#39; WITH &lt;br /&gt;
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N&#39;TCP://MIA-CLUST3.AdventureWorks.msft:1433&#39;));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Read Routing List when Server is acting as Primary Replica &lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST2&#39;,&#39;MIA-CLUST3&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Define Read Routing List when Server is acting as Primary Replica&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST2&#39; WITH &lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST1&#39;,&#39;MIA-CLUST3&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;-- Define Read Routing List when Server is acting as Primary Replica &lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST3&#39; WITH &lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST1&#39;,&#39;MIA-CLUST2&#39;)));&lt;br /&gt;
GO &lt;br /&gt;
_________________End ________________________ &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Nota: I Server indicati nella routing list verranno usati in sequenza in base alla disponibilità, non esiste alcuna forma di Load Balancing o round robin.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Test di connettività &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Di seguito il processo utilizzato dal Read Only Routing:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Il client si connettono al &lt;b&gt;Listener &lt;/b&gt;del nostro Availability Group &lt;/li&gt;
&lt;li&gt;Il client viene reindirizzato (sempre!) verso la&lt;b&gt; Primary Replica&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Il client ha specificato nella stringa di connessione &lt;b&gt;ApplicationIntent=ReadOnly&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Il sever controlla che il database di destinazione faccia parte di un Availability Group&lt;/li&gt;
&lt;li&gt;Se è vero il punto 4, il server controlla se è impostata una read_only_routing_list sulla Primary Replica&lt;/li&gt;
&lt;li&gt;Se è vero il punto 5 il server controlla in ordine che i server elencati nella Routing_List stiano sincronizzando ed accettino connessioni (allow_connections=read_only or all)&lt;/li&gt;
&lt;li&gt;Il server legge la read_only_routing_url della prima replica secondaria pronta ad accettare connessioni e la passa al client&lt;/li&gt;
&lt;li&gt;Il client legge la URL e si ridireziona verso l&#39;istanza secondaria leggibile&lt;/li&gt;
&lt;/ol&gt;
Per eseguire un test di connettività si possono utilizzare i Reporting Services, quindi nel nostro esempio farò un semplice report (l&#39;esempio è banale!) sulla tabella sales.dbo.orders includendo il nome del server che sta rispondendo con la seguente query:&lt;br /&gt;
&lt;br /&gt;
Select OrderDate, OrderTotal, @@ServerName as Server from Orders&lt;br /&gt;
&lt;br /&gt;
Primo Test: accediamo con ApplicationIntent=ReadWrite&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvikwEJBqw3Z_Mhlzb8QDmzSUs5DgWkDgBHWVzGMMOodZxzP4abub6IAGuAL2kjBQeXjGpT60cLVBY2R8ArnTjErL-b-TI-FCsZ247DJBF_C1Z1aX7-gFdob_v7f7qRSMIIrqTud_pFM/s1600/AlwaysON_38.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvikwEJBqw3Z_Mhlzb8QDmzSUs5DgWkDgBHWVzGMMOodZxzP4abub6IAGuAL2kjBQeXjGpT60cLVBY2R8ArnTjErL-b-TI-FCsZ247DJBF_C1Z1aX7-gFdob_v7f7qRSMIIrqTud_pFM/s400/AlwaysON_38.jpg&quot; height=&quot;288&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;E riceviamo risposta dalla Primary Replica&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLF9_GhcjZsNzK7fylT6onsOi5x2jVbinLCosnxoLcbwbTxC1nmLN0_sx95Y8PFoyvKbayhQkqJC1azsGEVnz4wIZeNI_zPIFck6ZsNJnw7W_TxQ_Q29KU0B9MWJnFmFmEU4Nch1wk6ho/s1600/AlwaysON_39.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLF9_GhcjZsNzK7fylT6onsOi5x2jVbinLCosnxoLcbwbTxC1nmLN0_sx95Y8PFoyvKbayhQkqJC1azsGEVnz4wIZeNI_zPIFck6ZsNJnw7W_TxQ_Q29KU0B9MWJnFmFmEU4Nch1wk6ho/s400/AlwaysON_39.jpg&quot; height=&quot;180&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Adesso cambiamo il tipo di connessione in  ApplicationIntent=ReadOnly&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrPLk0TjsQooZa7tZ63ym3PJjsoGMxAi9EeOELO0hpnVk3x-lJNU08g0LabZtu-m5V3-dBji6PPmXMLAfohC-2r3n8J4oyr1lUpFzTU7Uy5kmJUGkkDxRAoXDXaTfveQJvM6VyKxEs93s/s1600/AlwaysON_40.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrPLk0TjsQooZa7tZ63ym3PJjsoGMxAi9EeOELO0hpnVk3x-lJNU08g0LabZtu-m5V3-dBji6PPmXMLAfohC-2r3n8J4oyr1lUpFzTU7Uy5kmJUGkkDxRAoXDXaTfveQJvM6VyKxEs93s/s400/AlwaysON_40.jpg&quot; height=&quot;291&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;E rilanciando il report&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyjtP3-8qyd7v5TYPNnJNdhpecDfDPsou4ehTfuoZ4bUnKgVU7hGOKEGGpP5AtVn4cYeVQVryJa9drf1dA8sZqIysFC8rVflBBvWS8ZtLmoH2UfZ8niJ7c9690sZdrXf7OzWvcHsfIqbE/s1600/AlwaysON_41.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyjtP3-8qyd7v5TYPNnJNdhpecDfDPsou4ehTfuoZ4bUnKgVU7hGOKEGGpP5AtVn4cYeVQVryJa9drf1dA8sZqIysFC8rVflBBvWS8ZtLmoH2UfZ8niJ7c9690sZdrXf7OzWvcHsfIqbE/s400/AlwaysON_41.jpg&quot; height=&quot;182&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Siamo stati reindirizzati verso il primo server della routing list definita per Primary Replica:&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG]&lt;br /&gt;
MODIFY REPLICA ON&lt;br /&gt;
N&#39;MIA-CLUST1&#39; WITH &lt;br /&gt;
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=(&#39;MIA-CLUST2&#39;,&#39;MIA-CLUST3&#39;)));&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Comandi Utili &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Esempio di stringa di connessione:&lt;br /&gt;
&lt;br /&gt;
Server=tcp:MIA-SQL-CLUST,1433;Database=Sales;IntegratedSecurity=SSPI;ApplicationIntent=ReadOnly;MultiSubnetFailover=True&lt;br /&gt;
&lt;br /&gt;
Restart del listener&lt;br /&gt;
&lt;br /&gt;
ALTER AVAILABILITY GROUP [MIA-SQL-AG] RESTART LISTENER &#39;MIA-SQL-CLUST&#39;; &lt;br /&gt;
&lt;br /&gt;
Related&amp;nbsp; System Views&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
SELECT * FROM sys.dm_tcp_listener_states&lt;br /&gt;
&lt;br /&gt;
SELECT * from sys.availability_replicas&lt;br /&gt;
&lt;br /&gt;
SELECT * from sys.availability_read_only_routing_lists&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Conclusione&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Spero che questa guida passo passo possa esservi di aiuto per sfruttare appieno questa opportunità che ci viene offerta da SQL Server 2012.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Tutte le correzioni ed i commenti sono i benvenuti&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Buon divertimento! &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s1600/AlwaysON_31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s1600/AlwaysON_31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s1600/AlwaysON_31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqxbVRrnXj5CfJoMvQNObsBJDJ_R8buAO8ANftxDAPet1EsIWEuD1-cKruNNMda5gVOW2OnJ0XyZ7eIoKErp5NmvxslLpFC5sZcj86unDlk36VTTREH3aYsxojDSARnrJ94JEshfEZzcg/s1600/AlwaysON_31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/7714441238132225131/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/02/sql-server-2012-alwayson.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7714441238132225131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7714441238132225131'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/02/sql-server-2012-alwayson.html' title='SQL Server 2012 AlwaysOn'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqcRD0yNE7pL8AudY_2irzL7C3OsjXYrLMZkyrRt2BBzKRkZd7GXB81u5ARMhfXXIuk399U9cme6iJdloEo9v-IfGxigB0VnpOTTC_CK5s4HenwR3IdItTe2Bqg7gIkix3rNTJSlonDJs/s72-c/AlwaysOn_1.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-6415126857166988223</id><published>2013-02-05T19:01:00.000+01:00</published><updated>2013-02-14T16:20:56.782+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hyper-V"/><category scheme="http://www.blogger.com/atom/ns#" term="Power Shell"/><title type='text'>Gestione Hyper-V tramite Power Shell</title><content type='html'>Ottimo componente per la gestione dell&#39; Hyper-V e della macchine virtuali tramite la Power Shell:&lt;br /&gt;
&lt;a href=&quot;http://pshyperv.codeplex.com/&quot;&gt;Codeplex&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/6415126857166988223/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2013/02/gestione-hyper-v-tramite-power-shell.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6415126857166988223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6415126857166988223'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2013/02/gestione-hyper-v-tramite-power-shell.html' title='Gestione Hyper-V tramite Power Shell'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-2766808197919469229</id><published>2012-12-19T14:53:00.000+01:00</published><updated>2012-12-20T16:48:11.551+01:00</updated><title type='text'>CoreConfig Security Warning</title><content type='html'>Launching: &quot;cscript Start_CoreConfig.wsf&quot; &lt;br /&gt;
&lt;br /&gt;
You&#39;ll be asked to confirm every operation&lt;br /&gt;
&lt;br /&gt;
Security Warning&lt;br /&gt;
Run only scripts that you trust. While scripts from the Internet can be useful,
 this script can potentially harm your computer. Do you want to run
C:\Utility\CoreConfig\CoreConfig.ps1?&lt;br /&gt;
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is &quot;D&quot;):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To solve this go to CoreConfig installation folder,edit &lt;b&gt;Start_CoreConfig.wsf&lt;/b&gt; and substitute:&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ2WPQMHOUk4097b3fSARhb28XC2GrAYoxqs-Lbc64-2au1TpcQozOAPaCtj1sfXlTql13e0JDIzd1i1ByU62MgWZNLjkPTLCH5pSXZvTH3s6Vpac5RmA1LOS-nFjF7s1Xsp28QWKpm1E/s1600/CoreConfig_1.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ2WPQMHOUk4097b3fSARhb28XC2GrAYoxqs-Lbc64-2au1TpcQozOAPaCtj1sfXlTql13e0JDIzd1i1ByU62MgWZNLjkPTLCH5pSXZvTH3s6Vpac5RmA1LOS-nFjF7s1Xsp28QWKpm1E/s320/CoreConfig_1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;




&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function LaunchCoreConfig()&lt;br /&gt;
&#39;========================&lt;br /&gt;
Dim iRetCode&lt;br /&gt;
Dim Temp&lt;br /&gt;
&#39;&lt;br /&gt;
LaunchCoreConfig = False&lt;br /&gt;
&#39;&lt;br /&gt;
On Error Resume Next&lt;br /&gt;
WshShell.RegWrite&quot;HKLM\Software\Microsoft\Powershell\1\ShellIds&lt;br /&gt;
\Microsoft.PowerShell\ExecutionPolicy&quot;, &quot;Unrestricted&quot;, &quot;REG_SZ&quot;&lt;br /&gt;
On Error goto 0&lt;br /&gt;
&#39;&lt;br /&gt;
WshShell.CurrentDirectory = GlobalFolderPath&lt;br /&gt;
iRetCode = WshShell.Run (&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Minimized -Sta -file CoreConfig.ps1&quot;, 1, True)&lt;br /&gt;
If iRetCode &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
Call Debug(&quot;Error: During launch of CoreConfig! ReturnCode:&quot;  &amp;amp; iRetCode)&lt;br /&gt;
Call WshShell.Popup(&quot;Error: During launch of CoreConfig! ReturnCode:&quot; &amp;amp; iRetCode &amp;amp; Vbcrlf &amp;amp; &quot; Please copy source to local drive and try again!&quot; ,0,&quot;Error&quot;, 16)&lt;br /&gt;
Else&lt;br /&gt;
&#39;Okay&lt;br /&gt;
LaunchCoreConfig = True&lt;br /&gt;
End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function LaunchCoreConfig()&lt;br /&gt;
&#39;========================&lt;br /&gt;
Dim iRetCode&lt;br /&gt;
Dim Temp&lt;br /&gt;
&#39;&lt;br /&gt;
LaunchCoreConfig = False&lt;br /&gt;
&#39;&lt;br /&gt;
&lt;br /&gt;
On Error goto 0&lt;br /&gt;
&#39;&lt;br /&gt;
WshShell.CurrentDirectory = GlobalFolderPath&lt;br /&gt;
iRetCode = WshShell.Run (&quot;%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -WindowStyle Minimized -Sta -file CoreConfig.ps1&quot;, 1, True)&lt;br /&gt;
If iRetCode &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
Call Debug(&quot;Error: During launch of CoreConfig! ReturnCode:&quot;  &amp;amp; iRetCode)&lt;br /&gt;
Call WshShell.Popup(&quot;Error: During launch of CoreConfig! ReturnCode:&quot; &amp;amp; iRetCode &amp;amp; Vbcrlf &amp;amp; &quot; Please copy source to local drive and try again!&quot; ,0,&quot;Error&quot;, 16)&lt;br /&gt;
Else&lt;br /&gt;
&#39;Okay&lt;br /&gt;
LaunchCoreConfig = True&lt;br /&gt;
End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
First of all is not a good solution to set execution policy to unrestricted for all Powershell scripts changing Reg Key:&lt;br /&gt;
WshShell.RegWrite&quot;HKLM\Software\Microsoft\Powershell\1\ShellIds\Microsoft.PowerShell\ExecutionPolicy&quot;, &quot;Unrestricted&quot;, &quot;REG_SZ&quot;&lt;br /&gt;
Second this doesn&#39;t solve the problem.&lt;br /&gt;
The idea is to Bypass execution policy for this script... if we trust it, of course.&lt;br /&gt;
I do! &lt;br /&gt;
Now you can enjoy your CoreConfig</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/2766808197919469229/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/12/coreconfig-security-warning-confirmation.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/2766808197919469229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/2766808197919469229'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/12/coreconfig-security-warning-confirmation.html' title='CoreConfig Security Warning'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ2WPQMHOUk4097b3fSARhb28XC2GrAYoxqs-Lbc64-2au1TpcQozOAPaCtj1sfXlTql13e0JDIzd1i1ByU62MgWZNLjkPTLCH5pSXZvTH3s6Vpac5RmA1LOS-nFjF7s1Xsp28QWKpm1E/s72-c/CoreConfig_1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-6196447750553263736</id><published>2012-03-26T12:05:00.000+02:00</published><updated>2012-03-26T12:05:07.933+02:00</updated><title type='text'>Abilitare un alias per un Fileserver Windows 2008 R2</title><content type='html'>Problema (tipico delle operazioni di consolidamento):&lt;br /&gt;
abbiamo un server con nome &lt;b&gt;Server1&lt;/b&gt; che deve rispondere anche alle richieste con il nome &lt;b&gt;Server2&lt;/b&gt;, quindi sia come &lt;b&gt;\\Server1&lt;/b&gt; che&lt;b&gt; \\Server2&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Da Windows 2008 in avanti i computer oltre a supportare SMB 1.0 supportano anche &lt;b&gt;SMB 2.0&lt;/b&gt;. SMB è il protocollo che che supporta sia lato client che lato server la &quot;&lt;b&gt;Condivisione File e stampanti&lt;/b&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
Quindi per abilitare l&#39;alias SERVER2 dobbiamo:&lt;br /&gt;
1) Creare un &lt;b&gt;CNAME&lt;/b&gt; (Alias) nel &lt;b&gt;DNS&lt;/b&gt; &lt;b&gt;server2.miodominio.local&lt;/b&gt; che punti a server1.miodominio.local &lt;br /&gt;
2) Abilitare il supporto per l&#39;aliasing per il protocollo SMB 1.0:&lt;br /&gt;
  Apriamo l&#39;Editor di Registro (&lt;b&gt;regedit&lt;/b&gt;) ed posizioniamoci su &lt;br /&gt;
 &lt;b&gt; HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;
  Aggiungiamo una nuova REG_DWORD: &lt;br /&gt;
&lt;br /&gt;
      Nome Valore: &lt;b&gt;DisableStrictNameChecking&lt;/b&gt;&lt;br /&gt;
      Tipo di dati : REG_DWORD&lt;br /&gt;
      Base : &lt;b&gt;Decimale&lt;/b&gt;&lt;br /&gt;
      Valore : &lt;b&gt;1&lt;/b&gt;&lt;br /&gt;
3) Facciamo un reboot del server per fargli prendere le modifiche&lt;br /&gt;
4) Creaiamo un Alias per l&#39; SMB 2.0:&lt;br /&gt;
   Apriamo un prompt dei comandi con privilegi amministrativi:&lt;br /&gt;
  &lt;b&gt; setspn -a host/server2 server1&lt;/b&gt; &lt;br /&gt;
&lt;i&gt;(dove server2 è l&#39;alias netbios e server1 è il  nome netbios originale  del nostro server)&lt;/i&gt;&lt;br /&gt;
  &lt;b&gt; setspn -a host/server2.miodomino.local server1&lt;/b&gt; &lt;br /&gt;
&lt;i&gt;(dove server2.miodomino.local è il FQDN dell&#39;alias che vogliamo creare e server1 è il  nome netbios originale  del nostro server)    &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Adesso provate ad aprire \\server2 e dovreste accedere alle condivisioni</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/6196447750553263736/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/03/abilitare-un-alias-per-un-fileserver.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6196447750553263736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6196447750553263736'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/03/abilitare-un-alias-per-un-fileserver.html' title='Abilitare un alias per un Fileserver Windows 2008 R2'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-2451648637570581099</id><published>2012-02-20T12:35:00.001+01:00</published><updated>2012-07-01T00:21:01.334+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IIS Apache errore WEB 80 IP"/><title type='text'>Coesistenza di IIS ed Apache sulla porta 80</title><content type='html'>La risposta più ovvia è che affiché i due servizi possano utlizzare la stessa porta bisogna metterli in ascolto su due IP diversi. &lt;br /&gt;
Quindi diciamo che vogliamo creare due endpoint:&lt;br /&gt;
1) APACHE: 192.168.1.1:80&lt;br /&gt;
2) IIS:    192.168.1.2:80&lt;br /&gt;
&lt;br /&gt;
Per quanto riguarda Apache basta andare nell&#39; httpd.conf e modificare la sezione:&lt;br /&gt;
LISTEN 80&lt;br /&gt;
in &lt;br /&gt;
LISTEN 192.168.1.1:80&lt;br /&gt;
(ovviamente controllando anche eventuali configurazioni al livello di singoli siti)&lt;br /&gt;
Si riavviano i servizi ed è tutto pronto.&lt;br /&gt;
&lt;br /&gt;
Su IIS si va sui bindigs dei siti ed invece di selezionare tutti gli ip disponibili ossia 0.0.0.0 si seleziona esplicitamente l&#39;IP 192.168.1.2.&lt;br /&gt;
&lt;br /&gt;
E non va! :)&lt;br /&gt;
&lt;br /&gt;
In effetti il nostro IIS si mette comunque in ascolto su 0.0.0.0:80 e quindi è in conflitto con l&#39;incolpevole Apache.&lt;br /&gt;
&lt;br /&gt;
Bisogna cambiare esplicitamente il listener HTTP.&lt;br /&gt;
&lt;br /&gt;
Windows 2003 IIS6:&lt;br /&gt;
1) Scaricare httpcfg.exe dai support tool dal CD di installazione o da internet&lt;br /&gt;
2) Fermiamo i servizi IIS tramite il comando: net stop http /y&lt;br /&gt;
3) Fermare i servizi di Apache&lt;br /&gt;
4) Modifichiamo il listener: httpcfg set iplisten -i 192.168.1.2&lt;br /&gt;
5) Facciamo ripartire IIS: net start w3svc&lt;br /&gt;
6) Riavviamo Apache&lt;br /&gt;
&lt;br /&gt;
Windows 2008 IIS7&lt;br /&gt;
Qui l&#39;evoluzione del NETSH ci semplifica la vita&lt;br /&gt;
1) Apriamo un prompt dei comandi con privilegi amministrativi e diamo i seguenti comandi:&lt;br /&gt;
2) NETSH&lt;br /&gt;
3) HTTP&lt;br /&gt;
4) add iplisten ipaddress=192.168.0.2&lt;br /&gt;
5) EXIT&lt;br /&gt;
&lt;br /&gt;
In ambedue i casi potete verificare tramite il comando:&lt;br /&gt;
NETSTAT -an&lt;br /&gt;
che il server è in ascolto correttamente su &lt;br /&gt;
&lt;br /&gt;
192.168.1.1:80&lt;br /&gt;
192.168.1.2:80&lt;br /&gt;
&lt;br /&gt;
Se trovate ancora 0.0.0.0:80&lt;br /&gt;
date il comando: &lt;br /&gt;
ISSRESET</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/2451648637570581099/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/02/coesistenza-di-iis-ed-apache-sulla.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/2451648637570581099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/2451648637570581099'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/02/coesistenza-di-iis-ed-apache-sulla.html' title='Coesistenza di IIS ed Apache sulla porta 80'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-6209589724529314849</id><published>2012-01-31T11:33:00.001+01:00</published><updated>2012-10-03T18:21:26.093+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Backup Windows 2008 R2 Server Core"/><title type='text'>Come fare: Backup Windows 2008 R2 Server Core</title><content type='html'>Come fare un backup di un Server Core Windows 2008 R2 senza usare strumenti di terze parti, ma sfruttando il backup integrato di Windows?&lt;br /&gt;
1) Installiamo la funzionalità di backup:&lt;br /&gt;
start /w ocsetup WindowsServerBackup&lt;br /&gt;
2) Eseguiamo il backup da riga di comando:&lt;br /&gt;
wbadmin start backup -allCritical -backupTarget:&quot;\\Nome_Server\Backup_Folder&quot;&lt;br /&gt;
&lt;br /&gt;
Per approfondimenti sul comando &lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc754015%28WS.10%29.aspx&quot;&gt;WBADMIN&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/6209589724529314849/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/backup-windows-2008-r2-server-core.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6209589724529314849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6209589724529314849'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/backup-windows-2008-r2-server-core.html' title='Come fare: Backup Windows 2008 R2 Server Core'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-7980071456628622704</id><published>2012-01-23T01:05:00.004+01:00</published><updated>2012-01-30T15:29:02.919+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server microsoft performance tuning data collector"/><title type='text'>SQL Server 2008 Data Collector</title><content type='html'>&lt;a href=&quot;http://ruggierolauria.blogspot.com/2012/01/il-data-collector-di-sql-server-2008.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Versione in italiano&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://ruggierolauria.blogspot.com/2012/01/il-data-collector-di-sql-server-2008.html&quot;&gt; &lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Introduction&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The typical problems of any DBA is to monitor the installation of its DB in terms of performance and server loads.&lt;br /&gt;
The process of preparing data collectors in order to do an analysis usually is a time-consuming and tricky task.&lt;br /&gt;
But if we are Database SQL Server 2008 lucky DBA, Microsoft has developed a tool that does the work for us: SQL data collector (not to be confused with Windows performace monitor&amp;nbsp; Data Collector).&lt;br /&gt;
In this way, the data collectors become a powerful ally of all DBAs, especially those less experienced.&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Architecture&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Although the architecture is quite complex&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6K_8ZgTwAD9dFNxlKiXdXufWtIlVtSXCyVWNTNbNcaEYDXfPFv_KH5jVjoDrOWhUPiCS71AJMIoEsNHTIifA6LDLVojYgprRA0rYzowugub6o6vzlqPfiqpcrVgGeRrmwcYO3E9Q4E3Q/s1600/IC169768.gif&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6K_8ZgTwAD9dFNxlKiXdXufWtIlVtSXCyVWNTNbNcaEYDXfPFv_KH5jVjoDrOWhUPiCS71AJMIoEsNHTIifA6LDLVojYgprRA0rYzowugub6o6vzlqPfiqpcrVgGeRrmwcYO3E9Q4E3Q/s640/IC169768.gif&quot; width=&quot;419&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Data Collector Architecture: source MSDN&lt;/span&gt;&lt;/i&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Installation is very simple because the configuration and parameterization is minimal, however, the data collector was designed to have extremely low overhead on the system when collecting and analyzing data.&lt;br /&gt;
It creates SSIS Package (SQL Server Integration Service)&amp;nbsp; launched by SQL Server Agent Jobs working to collect and store data in a Management Data WareHouse&amp;nbsp; (from henceforth MDW ) and finally the information is shown through a series of dynamic reports linked to each other that allow us to analyze in detail our SQL Server instances activities and trends.&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Installation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Open SSMS and go to the section of Management, right-click and select a data collector configuration data collectors&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicK9-37gSs6pToisAqybhyphenhyphen-hgRw-2bJmRXWOpGT8xZ4Pl1S4y8FZjl-gKv-0izo4x2bNIYCyN-GZFZaVLgMNhj7YbWVSj-N0LkhY-4zNDG1LgKM584WorDRTf6SzvGtHd9Y6ZqeS2ElOk/s1600/DC1.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicK9-37gSs6pToisAqybhyphenhyphen-hgRw-2bJmRXWOpGT8xZ4Pl1S4y8FZjl-gKv-0izo4x2bNIYCyN-GZFZaVLgMNhj7YbWVSj-N0LkhY-4zNDG1LgKM584WorDRTf6SzvGtHd9Y6ZqeS2ElOk/s640/DC1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Then proceed with the MDW configuration&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOKFOCv7FkOJwZu1zX7m98XObNRKq45B_6RH-UvZA7BDwjwACWsIlG7xCmCNyf32bKkztJhhI3yTKGfuRM6OEyqwLLhGDGSAX3DJr8feKBavueTIYI7yTPVuuu2FdKxwfuWK4oBSoxvxY/s1600/DC2.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;576&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOKFOCv7FkOJwZu1zX7m98XObNRKq45B_6RH-UvZA7BDwjwACWsIlG7xCmCNyf32bKkztJhhI3yTKGfuRM6OEyqwLLhGDGSAX3DJr8feKBavueTIYI7yTPVuuu2FdKxwfuWK4oBSoxvxY/s640/DC2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Choose where you want to create it and how to call it (I&#39;ve imaginatively called it DataCollector).&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: red; text-align: justify;&quot;&gt;CAUTION: The data warehouse DB can come to occupy up to 10GB of disk space!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;text-align: justify;&quot;&gt;So be careful where you position it and its initial and maximum size (if you want to set it)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin_T3zPeJNQWFdJpo-obfs4is8j99Va4UYYR-dG8HhjFKMX0gQ3FeGKi4URdt6_TVXupOGvb5QL48j7oayNNKpecEKmF3RT8GJYLps0ZnXDzBoFVN7FFFIyhpvOEpxZufJVUaqq4Ytst8/s1600/DC3.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin_T3zPeJNQWFdJpo-obfs4is8j99Va4UYYR-dG8HhjFKMX0gQ3FeGKi4URdt6_TVXupOGvb5QL48j7oayNNKpecEKmF3RT8GJYLps0ZnXDzBoFVN7FFFIyhpvOEpxZufJVUaqq4Ytst8/s640/DC3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Going forward we are asked to configure roles and permissions, but if you don&#39;t have any special need you can proceed without selecting anything. So&amp;nbsp; you complete this first configuration phase&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjceGZFAdYBT_5SgBzLRIEYOAio-Xm-RixPXWiKMOdy8He0SpFQ-dwKrxfsj-bibx-QS1OMR2Iz5t9k0IDmX0clDQj5zuiJlWpuaSgXARiBh33IOUyO0Q109ceiXPm30Ljwzy0PkMNWw0Q/s1600/DC4.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;570&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjceGZFAdYBT_5SgBzLRIEYOAio-Xm-RixPXWiKMOdy8He0SpFQ-dwKrxfsj-bibx-QS1OMR2Iz5t9k0IDmX0clDQj5zuiJlWpuaSgXARiBh33IOUyO0Q109ceiXPm30Ljwzy0PkMNWw0Q/s640/DC4.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Again we return to the Configuration&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBwf3ORp8QcEiB32aVJKC6Rz5qEbgGakPgSft-jdsd6Un5ViHRkWkAY3ckA0g_rmwrDbIaWR-c9O3tX-whq2orYRSRMcq8SXRkool0Gj1MIbfri9TqIMU-on61T5rnlcyGGH9sF6ti-50/s1600/mdw10.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBwf3ORp8QcEiB32aVJKC6Rz5qEbgGakPgSft-jdsd6Un5ViHRkWkAY3ckA0g_rmwrDbIaWR-c9O3tX-whq2orYRSRMcq8SXRkool0Gj1MIbfri9TqIMU-on61T5rnlcyGGH9sF6ti-50/s640/mdw10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
And this time we choose to set the data collection&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41KPcdmlgRoB4jVvL0M5U3vomWXVBfQMCb-sfAGF9FaWR8uhRbNeZTnkYdImKDu3qIQBO42IcivYQ9UsFJ5mDh3_PqtH6ec0B-5RW91U-ljwA_QnFTrgVPeLa29fsJZ4EJMxL4Z9GmoA/s1600/DC5.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41KPcdmlgRoB4jVvL0M5U3vomWXVBfQMCb-sfAGF9FaWR8uhRbNeZTnkYdImKDu3qIQBO42IcivYQ9UsFJ5mDh3_PqtH6ec0B-5RW91U-ljwA_QnFTrgVPeLa29fsJZ4EJMxL4Z9GmoA/s640/DC5.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
and simply select the previous data warehouse and choose a directory in which park the data collected before they are placed in the MDW (see below: Query and System collectors collect data with a high frequency, but uploading to the Data Wharehouse is deferred in ways to avoid too much overhead due a nearly continuous data entry)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW5gb7pMk9Pgy3A9ZxeNAOKbdTDeo_iMtRFX4D0T5aT-gQCtxXgZ0KXG3hvPWOM-onh4Ze2WrpHvaUDNuY1mRx9NzwJIbZijGevEeY60RPn3QzIa1kMj1hyphenhyphenBrK6aY9zX17GzC6jngje_0/s1600/DC6.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW5gb7pMk9Pgy3A9ZxeNAOKbdTDeo_iMtRFX4D0T5aT-gQCtxXgZ0KXG3hvPWOM-onh4Ze2WrpHvaUDNuY1mRx9NzwJIbZijGevEeY60RPn3QzIa1kMj1hyphenhyphenBrK6aY9zX17GzC6jngje_0/s640/DC6.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Even here we can proceed and complete the configuration&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGm_mex-blAE7DGRITqlACIDcZ0xJRmbs-ndpeouCoY9pTV3UIblaD05ZZ9aBDr6iHKUWkXbsrFwSdU9lop2mihe7rxzx_2fxdC-YOa531-NeFlo5YQEPqv4Wx7mymK9OcPcYSc18b-A/s1600/DC7.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;568&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGm_mex-blAE7DGRITqlACIDcZ0xJRmbs-ndpeouCoY9pTV3UIblaD05ZZ9aBDr6iHKUWkXbsrFwSdU9lop2mihe7rxzx_2fxdC-YOa531-NeFlo5YQEPqv4Wx7mymK9OcPcYSc18b-A/s640/DC7.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
At this time our collectors are finally activated and slowly begin to populate our MDW&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg54FZTa51YFXXZda1QxXFQ9hH9kT8zX-auGIQ0ihRryxEmFipgyupxJVUPISEBzzJKyFp7AQDNLsvMD0xcGCE6PdRqiNmwzMjWes3GSzH1GZl7-LDhLe4Dl7ZjjkQ25G-PBN-Sozu_muY/s1600/mdw17.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;620&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg54FZTa51YFXXZda1QxXFQ9hH9kT8zX-auGIQ0ihRryxEmFipgyupxJVUPISEBzzJKyFp7AQDNLsvMD0xcGCE6PdRqiNmwzMjWes3GSzH1GZl7-LDhLe4Dl7ZjjkQ25G-PBN-Sozu_muY/s640/mdw17.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Data Collectors&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
After configuring our SSIS packages and their jobs are ready and running, you&#39;ll see the collectors&amp;nbsp; properties below that are shown only for explanatory purposes, those who were not interested in learning more can safely skip this paragraph.&lt;br /&gt;
&lt;br /&gt;
How we can inferred in the previous images we have three types of collectors (4 in SQL 2008 R2):&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Disk Usage&lt;/li&gt;
&lt;li&gt;Query Statistics&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Server Activity&lt;/li&gt;
&lt;/ol&gt;&lt;b&gt;&amp;nbsp;Disk Usage&lt;/b&gt;&lt;b&gt;: &lt;/b&gt;keeps track of&amp;nbsp; Database and Log files growth collecting information from a series of  system tables and views.&lt;br /&gt;
Sampling is done every 6 hours and is loaded simultaneously on the MDW (given the low frequency). The data is kept for 730 days so as to allow adequate delineation of the growth trends.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzfATT2ZxJgDEih0pgjpw1genfxBRsjjOU1W323otRGDNU7dJIZbGpd_t10_dMJ3ptrmdSXGDshGcrQ6niXAfAwyCJARP6gAYf-Nbky40XJwvmWu89wdCCnUjxLT1-70KxQy7c9vMW9gI/s1600/DC8.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;448&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzfATT2ZxJgDEih0pgjpw1genfxBRsjjOU1W323otRGDNU7dJIZbGpd_t10_dMJ3ptrmdSXGDshGcrQ6niXAfAwyCJARP6gAYf-Nbky40XJwvmWu89wdCCnUjxLT1-70KxQy7c9vMW9gI/s640/DC8.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Query statistics:&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;collects data on SQL statements and their execution plans sampling every 10 seconds some &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Dynamic Management Views&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; ( from now&amp;nbsp; DMV). MDW loading in this case is delayed and occurs every 15 minutes.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Collected&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; data is stored in the MDW for 14 days.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaeXgLMfHR0_Sd3DxkhWR81_mNrIMtkY5zaqQ2M_elNSNZFJChnQotbDzsuhxEYlMH4is8rN6ml7y61DHr-MBuS41QKAYrIW8_AbmM-ec8UuQ3trXlHqaK8wdJVMUF3EZ3tqNINc3h1_8/s1600/DC10.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;532&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaeXgLMfHR0_Sd3DxkhWR81_mNrIMtkY5zaqQ2M_elNSNZFJChnQotbDzsuhxEYlMH4is8rN6ml7y61DHr-MBuS41QKAYrIW8_AbmM-ec8UuQ3trXlHqaK8wdJVMUF3EZ3tqNINc3h1_8/s640/DC10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Server Activity: &lt;/b&gt;provides a view on the SQL Server activity, resources use and competition over resources, and also collects data on overall System resources allowing to identify any bottlenecks external respect than DB engine. In this case the data are collected by querying DMVs and SQL Sever and system performance counters.&lt;br /&gt;
Sampling occurs every 60 seconds and the data is uploaded every 15 minutes in&amp;nbsp; the MDW where they are kept for 14 days.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4iIztUUu9ZcxFscj4rEcB3tNb-kHFw0ovTkdSpPluxyk29LO-gouI_y_MPNbskYtooIxjjmGxeqsxGfNVKjCOch22Z19nt8W-1G6CkUUAzX3CCHtpO5W7OGRguukAaf4lXPYrsbViUKE/s1600/DC11.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;534&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4iIztUUu9ZcxFscj4rEcB3tNb-kHFw0ovTkdSpPluxyk29LO-gouI_y_MPNbskYtooIxjjmGxeqsxGfNVKjCOch22Z19nt8W-1G6CkUUAzX3CCHtpO5W7OGRguukAaf4lXPYrsbViUKE/s640/DC11.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
As can be seen from the images is possible, but absolutely&amp;nbsp; not necessary, change any parameter, such as data retention period in the MDW.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Reports&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want to wait for the default schedules at any time you can force data collection and loading .&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgupJHHk0PjMFqBTAzH247Mpz4j4dS-QDkaLgHCvnH2euKyfgdUI5I00idc_5FowQ0rOXwSYmDpXbBR9V0tMqcT3x0QDB9g2eyroALHxYUdRfvrbXK_r1p0tAgBpCIFeBrwjD2QvLOtFpU/s1600/mdw18.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;514&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgupJHHk0PjMFqBTAzH247Mpz4j4dS-QDkaLgHCvnH2euKyfgdUI5I00idc_5FowQ0rOXwSYmDpXbBR9V0tMqcT3x0QDB9g2eyroALHxYUdRfvrbXK_r1p0tAgBpCIFeBrwjD2QvLOtFpU/s640/mdw18.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Collected data&amp;nbsp; analysis will put a strain on even a very experienced DBA, and for this reason that the second, and perhaps the greatest, advantage of the Data Collector are available reports.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRMVZ5r_KS5S6ZNH_ZyWu-5xvUjGVru1mKJrGwdmLqmlLR3nnfopf01OC3TNWjXLZmu0seaMtZS71gF-Tnv9gwlI1-ZZGbnHWgBFmpUcIah_yQPiQR3aXlhjZXHktA2Mb9UDvY4oUKog/s1600/mdw19.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRMVZ5r_KS5S6ZNH_ZyWu-5xvUjGVru1mKJrGwdmLqmlLR3nnfopf01OC3TNWjXLZmu0seaMtZS71gF-Tnv9gwlI1-ZZGbnHWgBFmpUcIah_yQPiQR3aXlhjZXHktA2Mb9UDvY4oUKog/s640/mdw19.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
As you can see reports are related one to one with collectors.&lt;br /&gt;
So let&#39;s see how our data are available and their graphical representation.&lt;br /&gt;
I apologize for the fact that all pictures are taken from a test environment virtually stationary, where the only load is the Data Collector, but this must not lead to the error of thinking that the tool creates a strong overhead on monitored systems.&lt;br /&gt;
&lt;b&gt;&amp;nbsp;Disk Usage&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwFXD3wrrXScmSijY-zBx74QxXnYafgqzjX-YWybueqA-Mnl88DjWHbjBLwy1JYFe03iYh_bQU_TTOOzEWVP50pybLAq_HgPC5EB3c0zQzmbHUCVbQaft8emH8gmxwPCkdJ8iC7Ot6_2E/s1600/DC9.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;418&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwFXD3wrrXScmSijY-zBx74QxXnYafgqzjX-YWybueqA-Mnl88DjWHbjBLwy1JYFe03iYh_bQU_TTOOzEWVP50pybLAq_HgPC5EB3c0zQzmbHUCVbQaft8emH8gmxwPCkdJ8iC7Ot6_2E/s640/DC9.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Show all of our instance databases data and log files in terms of size and growth. Clicking on the name of the individual DB we can see free space and a list of all events related to their growth.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI4AKBgLpa3wmndfNdiZjzjvYqVBNT2UlVmtpXxGNjJxALjQxwKojnroJ2qMUqk1oj_f231cupdcjyBzkOYtuQyFsEUvA6ugXv1_Smz04YgRrzDspSF4d8coJzDo2JLO1KfmepCzlDveU/s1600/mdw25.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;374&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI4AKBgLpa3wmndfNdiZjzjvYqVBNT2UlVmtpXxGNjJxALjQxwKojnroJ2qMUqk1oj_f231cupdcjyBzkOYtuQyFsEUvA6ugXv1_Smz04YgRrzDspSF4d8coJzDo2JLO1KfmepCzlDveU/s640/mdw25.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Query Statistics&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First displays Queries Top 10 in relation to their resource consumption (default CPU) in a graphical format&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK2XfaK3HwbDwNgW1DhUi14BAyQJP7_4KreZPIvJuD12AaW9Kqc1YsvPGv3s5BPLi-DKaPY0VYj-h2SDQ9eOhQjDpGwKgpufWTOIiruXWVLXFUMmFHtkW9B1RcR9ejG_5ZTmpXEnSemYs/s1600/DC14.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;408&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK2XfaK3HwbDwNgW1DhUi14BAyQJP7_4KreZPIvJuD12AaW9Kqc1YsvPGv3s5BPLi-DKaPY0VYj-h2SDQ9eOhQjDpGwKgpufWTOIiruXWVLXFUMmFHtkW9B1RcR9ejG_5ZTmpXEnSemYs/s640/DC14.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
and in textual form&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinnk_v_75d8KvNuP8Nj0JR2Mn2dZwg7eZTVD3PCpZUuGsgYOaquCsPg_RVt2QRHuqn413q3jcRIBQfB_YecpUdHdswZ-465V9op5f44Tq9qkoKkqdzGLCShyxo_sv2qWPycoGi8F375Gc/s1600/DC15.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinnk_v_75d8KvNuP8Nj0JR2Mn2dZwg7eZTVD3PCpZUuGsgYOaquCsPg_RVt2QRHuqn413q3jcRIBQfB_YecpUdHdswZ-465V9op5f44Tq9qkoKkqdzGLCShyxo_sv2qWPycoGi8F375Gc/s640/DC15.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Clicking on a single statement you can display details with valuable informations about resources use and the possibility of going into Waits details. &lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8Kdo7DMi_KYccUpg_Udt7FPFUcoysRej5BeWrBO9-W3OAdjqBvaodqbKf1IRs2A7fXUMiPPm_V6d8qpqJyK7EVaLWvm50Byu01QY_h5UO6cFsqmy5ftTL-JUbAaRbxLi6Tk4DLqW9R4/s1600/DC16.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8Kdo7DMi_KYccUpg_Udt7FPFUcoysRej5BeWrBO9-W3OAdjqBvaodqbKf1IRs2A7fXUMiPPm_V6d8qpqJyK7EVaLWvm50Byu01QY_h5UO6cFsqmy5ftTL-JUbAaRbxLi6Tk4DLqW9R4/s640/DC16.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Server Activity:&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;This report displays the graphs for the four SQL tuning key resources. Very interesting is the fact that allows us to separate SQL Server from System activity.&lt;br /&gt;
It also puts in a graphical format, with the ability to go into detail with a single click, SQL Server Waits and the most significant activities in terms of SQL Server monitoring.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ldEQ8kCZ8EASYBORZ8xcnW2EwG-ScAOZDZCCD6f6blcbC-JrprvEXq562O_2uD473JFZZMaFdOsgipSzd7_FKQYkP2g79D3lWW4dB0PP1_zyIyEvzA5BY4D2NxP5issqTlekzoqpvIE/s1600/mdw.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ldEQ8kCZ8EASYBORZ8xcnW2EwG-ScAOZDZCCD6f6blcbC-JrprvEXq562O_2uD473JFZZMaFdOsgipSzd7_FKQYkP2g79D3lWW4dB0PP1_zyIyEvzA5BY4D2NxP5issqTlekzoqpvIE/s640/mdw.jpg&quot; width=&quot;576&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Conclusions and final notes&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
As we have seen this tool combines two great qualities: ease of configuration and power of analisys, so I&#39;m sure that it will soon become part of almost all of your SQL Server installations.&lt;br /&gt;
Unfortunately, SQL Server 2005 does not support data collectors but&lt;b&gt; &lt;a href=&quot;http://mssqldude.wordpress.com/2010/12/14/sql-server-2008-mdw-data-collectors-for-sql-server-2005/&quot; target=&quot;_blank&quot;&gt;MSSQLDUDE&lt;/a&gt;&amp;nbsp;&lt;/b&gt;suggests us a technique to remedy the problem (to be honest I have never tried it)&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
Also remember that you can always export charts to PDF or Excel format.&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjESp3cpGp2ghMprgnLkimbz6hHHCDv0sEebxFb4tmwZ-jNEaurjlGQToEjbZ5ihueY2M7LA8a4CRB-A5bb-T5yUzhUI5Q5lz8njXJoW0OCN919pdXV-bYn-cw8bIaDkdglerF2k4LxeMg/s1600/mdw21.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;376&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjESp3cpGp2ghMprgnLkimbz6hHHCDv0sEebxFb4tmwZ-jNEaurjlGQToEjbZ5ihueY2M7LA8a4CRB-A5bb-T5yUzhUI5Q5lz8njXJoW0OCN919pdXV-bYn-cw8bIaDkdglerF2k4LxeMg/s640/mdw21.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Link:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb677179.aspx&quot; target=&quot;_blank&quot;&gt;Data Collector on MSDN&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://blog.sqlauthority.com/2010/04/13/sql-server-configure-management-data-collection-in-quick-steps-t-sql-tuesday-005/&quot; target=&quot;_blank&quot;&gt;SQL Authority&lt;/a&gt; &lt;/b&gt;(where I stole some pictures)&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/7980071456628622704/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/sql-server-2008-data-collector.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7980071456628622704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7980071456628622704'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/sql-server-2008-data-collector.html' title='SQL Server 2008 Data Collector'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6K_8ZgTwAD9dFNxlKiXdXufWtIlVtSXCyVWNTNbNcaEYDXfPFv_KH5jVjoDrOWhUPiCS71AJMIoEsNHTIifA6LDLVojYgprRA0rYzowugub6o6vzlqPfiqpcrVgGeRrmwcYO3E9Q4E3Q/s72-c/IC169768.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-5181530404250321629</id><published>2012-01-22T19:03:00.009+01:00</published><updated>2012-01-30T15:33:30.336+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server microsoft performance tuning data collector"/><title type='text'>Il Data Collector di SQL Server 2008</title><content type='html'>&lt;a href=&quot;http://ruggierolauria.blogspot.com/2012/01/sql-server-2008-data-collector.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;English Version &lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Introduzione&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Il tipico problema di ogni DBA è tenere sotto controllo le installazioni dei propri DB in termini di performance e carichi del server.&lt;br /&gt;
Il processo di preparazione di collettori di dati per poter fare analisi è normalmente un task laborioso e spinoso.&lt;br /&gt;
Ma se siamo dei fortunati DBA di Database SQL Server 2008, Microsoft ha predisposto uno strumento che fa il lavoro al nostro posto: i &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb677179.aspx&quot; target=&quot;_blank&quot;&gt;data collector&lt;/a&gt; per SQL (da non confondere con gli omonimi del performace monitor di Windows).&lt;br /&gt;
In questo modo i data collector diventano un potentissimo alleato di tutti i DBA, soprattutto di quelli meno esperti.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Architettura&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Nonostante l&#39;architettura sia abbastanza complessa&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6K_8ZgTwAD9dFNxlKiXdXufWtIlVtSXCyVWNTNbNcaEYDXfPFv_KH5jVjoDrOWhUPiCS71AJMIoEsNHTIifA6LDLVojYgprRA0rYzowugub6o6vzlqPfiqpcrVgGeRrmwcYO3E9Q4E3Q/s1600/IC169768.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6K_8ZgTwAD9dFNxlKiXdXufWtIlVtSXCyVWNTNbNcaEYDXfPFv_KH5jVjoDrOWhUPiCS71AJMIoEsNHTIifA6LDLVojYgprRA0rYzowugub6o6vzlqPfiqpcrVgGeRrmwcYO3E9Q4E3Q/s640/IC169768.gif&quot; width=&quot;419&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Architettura dei DATA Collector: fonte MSDN&lt;/span&gt;&lt;/i&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;l&#39;installazione risulta essere molto semplice in quanto la configurazione e la parametrizzazione è minima, peraltro il data collector è  stato disegnato per avere un overhead molto basso sul sistema in fase di  raccolta ed analisi dei dati.&lt;br /&gt;
Crea dei pacchetti SSIS (SQL Server  Integration Service),&amp;nbsp; lanciati tramite dei JOB&amp;nbsp; e quindi&amp;nbsp; l&#39;Agent di SQL Server, che si occupano di raccogliere e memorizzare i dati all&#39;interno di un Data Ware House di gestione (Managemet Data WhareHouse da ora in poi MDW) ; infine rappresenta le informazioni raccolte tramite una serie di Report dinamici linkati tra di loro che ci  consentono di analizzare a fondo l&#39;attività ed i trend delle nostre  istanze di SQL Server.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Installazione&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Apriamo SSMS ed andiamo nella sezione di Gestione, tasto destro su data collector e selzioniamo configura data collector&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicK9-37gSs6pToisAqybhyphenhyphen-hgRw-2bJmRXWOpGT8xZ4Pl1S4y8FZjl-gKv-0izo4x2bNIYCyN-GZFZaVLgMNhj7YbWVSj-N0LkhY-4zNDG1LgKM584WorDRTf6SzvGtHd9Y6ZqeS2ElOk/s1600/DC1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicK9-37gSs6pToisAqybhyphenhyphen-hgRw-2bJmRXWOpGT8xZ4Pl1S4y8FZjl-gKv-0izo4x2bNIYCyN-GZFZaVLgMNhj7YbWVSj-N0LkhY-4zNDG1LgKM584WorDRTf6SzvGtHd9Y6ZqeS2ElOk/s640/DC1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
poi procediamo con la configurazione del MDW:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOKFOCv7FkOJwZu1zX7m98XObNRKq45B_6RH-UvZA7BDwjwACWsIlG7xCmCNyf32bKkztJhhI3yTKGfuRM6OEyqwLLhGDGSAX3DJr8feKBavueTIYI7yTPVuuu2FdKxwfuWK4oBSoxvxY/s1600/DC2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;576&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOKFOCv7FkOJwZu1zX7m98XObNRKq45B_6RH-UvZA7BDwjwACWsIlG7xCmCNyf32bKkztJhhI3yTKGfuRM6OEyqwLLhGDGSAX3DJr8feKBavueTIYI7yTPVuuu2FdKxwfuWK4oBSoxvxY/s640/DC2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&amp;nbsp;Scegliamo dove crearlo e come chiamarlo (io con molta fantasia l&#39;ho chiamato DataCollector).&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: red; text-align: justify;&quot;&gt;ATTENZIONE: a regime il Data WhareHouse può arrivare ad occupare fino a 10GB di spazio disco!&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;text-align: justify;&quot;&gt;Quindi fate attenzione a dove lo posizionate ed alle dimensioni iniziali, incrementiali e massime (se proprio dovete impostarle)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin_T3zPeJNQWFdJpo-obfs4is8j99Va4UYYR-dG8HhjFKMX0gQ3FeGKi4URdt6_TVXupOGvb5QL48j7oayNNKpecEKmF3RT8GJYLps0ZnXDzBoFVN7FFFIyhpvOEpxZufJVUaqq4Ytst8/s1600/DC3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin_T3zPeJNQWFdJpo-obfs4is8j99Va4UYYR-dG8HhjFKMX0gQ3FeGKi4URdt6_TVXupOGvb5QL48j7oayNNKpecEKmF3RT8GJYLps0ZnXDzBoFVN7FFFIyhpvOEpxZufJVUaqq4Ytst8/s640/DC3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Andando avanti ci viene chiesto di configurare i ruoli e le autorizzazioni, ma se non avete esigenze particolari potete semplicemnte procedere senza selezionare nulla andando completare la prima fase di configurazione&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjceGZFAdYBT_5SgBzLRIEYOAio-Xm-RixPXWiKMOdy8He0SpFQ-dwKrxfsj-bibx-QS1OMR2Iz5t9k0IDmX0clDQj5zuiJlWpuaSgXARiBh33IOUyO0Q109ceiXPm30Ljwzy0PkMNWw0Q/s1600/DC4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;570&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjceGZFAdYBT_5SgBzLRIEYOAio-Xm-RixPXWiKMOdy8He0SpFQ-dwKrxfsj-bibx-QS1OMR2Iz5t9k0IDmX0clDQj5zuiJlWpuaSgXARiBh33IOUyO0Q109ceiXPm30Ljwzy0PkMNWw0Q/s640/DC4.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Nuovamente torniamo sulla configurazione&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBwf3ORp8QcEiB32aVJKC6Rz5qEbgGakPgSft-jdsd6Un5ViHRkWkAY3ckA0g_rmwrDbIaWR-c9O3tX-whq2orYRSRMcq8SXRkool0Gj1MIbfri9TqIMU-on61T5rnlcyGGH9sF6ti-50/s1600/mdw10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBwf3ORp8QcEiB32aVJKC6Rz5qEbgGakPgSft-jdsd6Un5ViHRkWkAY3ckA0g_rmwrDbIaWR-c9O3tX-whq2orYRSRMcq8SXRkool0Gj1MIbfri9TqIMU-on61T5rnlcyGGH9sF6ti-50/s640/mdw10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
E questa volta scegliamo di impostare la collezione dei dati&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41KPcdmlgRoB4jVvL0M5U3vomWXVBfQMCb-sfAGF9FaWR8uhRbNeZTnkYdImKDu3qIQBO42IcivYQ9UsFJ5mDh3_PqtH6ec0B-5RW91U-ljwA_QnFTrgVPeLa29fsJZ4EJMxL4Z9GmoA/s1600/DC5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj41KPcdmlgRoB4jVvL0M5U3vomWXVBfQMCb-sfAGF9FaWR8uhRbNeZTnkYdImKDu3qIQBO42IcivYQ9UsFJ5mDh3_PqtH6ec0B-5RW91U-ljwA_QnFTrgVPeLa29fsJZ4EJMxL4Z9GmoA/s640/DC5.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
e semplicemente selezioniamo il Data Wharehouse creato precendentemente ed una directory in cui parcheggiare i dati raccolti prima che vengano inseriti nel MDW (come vedremo più avanti&amp;nbsp; i collettori delle query e di sistema raccolgono dati con un&#39;elevata frequenza, ma il caricamento nel DB di Data Wharehouse avviene in maniere differita per evitare un eccessivo overhead dovuto ad un quasi continuo inserimento di dati)&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW5gb7pMk9Pgy3A9ZxeNAOKbdTDeo_iMtRFX4D0T5aT-gQCtxXgZ0KXG3hvPWOM-onh4Ze2WrpHvaUDNuY1mRx9NzwJIbZijGevEeY60RPn3QzIa1kMj1hyphenhyphenBrK6aY9zX17GzC6jngje_0/s1600/DC6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW5gb7pMk9Pgy3A9ZxeNAOKbdTDeo_iMtRFX4D0T5aT-gQCtxXgZ0KXG3hvPWOM-onh4Ze2WrpHvaUDNuY1mRx9NzwJIbZijGevEeY60RPn3QzIa1kMj1hyphenhyphenBrK6aY9zX17GzC6jngje_0/s640/DC6.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp;Anche qui possiamo procedere e completare la configurazione&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGm_mex-blAE7DGRITqlACIDcZ0xJRmbs-ndpeouCoY9pTV3UIblaD05ZZ9aBDr6iHKUWkXbsrFwSdU9lop2mihe7rxzx_2fxdC-YOa531-NeFlo5YQEPqv4Wx7mymK9OcPcYSc18b-A/s1600/DC7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;568&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGm_mex-blAE7DGRITqlACIDcZ0xJRmbs-ndpeouCoY9pTV3UIblaD05ZZ9aBDr6iHKUWkXbsrFwSdU9lop2mihe7rxzx_2fxdC-YOa531-NeFlo5YQEPqv4Wx7mymK9OcPcYSc18b-A/s640/DC7.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
A questo i nostri collettori sono finalmente attivati e pian piano il nostro MDW comincerà a popolarsi&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg54FZTa51YFXXZda1QxXFQ9hH9kT8zX-auGIQ0ihRryxEmFipgyupxJVUPISEBzzJKyFp7AQDNLsvMD0xcGCE6PdRqiNmwzMjWes3GSzH1GZl7-LDhLe4Dl7ZjjkQ25G-PBN-Sozu_muY/s1600/mdw17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;620&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg54FZTa51YFXXZda1QxXFQ9hH9kT8zX-auGIQ0ihRryxEmFipgyupxJVUPISEBzzJKyFp7AQDNLsvMD0xcGCE6PdRqiNmwzMjWes3GSzH1GZl7-LDhLe4Dl7ZjjkQ25G-PBN-Sozu_muY/s640/mdw17.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;I Data Collector&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Finita la configurazione i nostri pacchetti SSIS ed i loro Job sono pronti e funzionanti; le proprietà dei collettori che vedrete di seguito sono visualizzate solo a scopo esplicativo, chi non fosse interessato ad approfondire può tranquillamente saltare questo paragrafo.&lt;br /&gt;
&lt;br /&gt;
Come possiamo evincere nell&#39;immagine precedente abbiamo tre tipologie di collettori &lt;i&gt;(4 su SQL 2008 R2)&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Utilizzo del disco&lt;/li&gt;
&lt;li&gt;Statistiche sulle Query&lt;/li&gt;
&lt;li&gt;Attività del Server&lt;/li&gt;
&lt;/ol&gt;&lt;b&gt;&amp;nbsp;Utilizzo del disco: &lt;/b&gt;mantiene traccia della crescita dei file di Database e di Log raccogliendo informazioni da una serie di tabelle e viste di sistema.&lt;br /&gt;
Il campionamento avviene ogni 6 ore e viene simultaneamente caricato sul MDW (vista la bassa frequenza). I dati vengono mantenuti per 730 giorni in maniera da consentire un adeguato delineamento dei trend di crescita.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzfATT2ZxJgDEih0pgjpw1genfxBRsjjOU1W323otRGDNU7dJIZbGpd_t10_dMJ3ptrmdSXGDshGcrQ6niXAfAwyCJARP6gAYf-Nbky40XJwvmWu89wdCCnUjxLT1-70KxQy7c9vMW9gI/s1600/DC8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;448&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzfATT2ZxJgDEih0pgjpw1genfxBRsjjOU1W323otRGDNU7dJIZbGpd_t10_dMJ3ptrmdSXGDshGcrQ6niXAfAwyCJARP6gAYf-Nbky40XJwvmWu89wdCCnUjxLT1-70KxQy7c9vMW9gI/s640/DC8.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Statistiche sulle Query: &lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;raccoglie dati sugli statement SQL ed i relativi piani di esecuzione campionando alla frequenza di 10 secondi alcune viste di gestione dinamica ( Dynamic Management Views, da ora in poi DMV). Il caricamento in questo caso è differito ed avviene ogni 15 minuti. I dati vengono conservati nel MDW per 14 giorni. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaeXgLMfHR0_Sd3DxkhWR81_mNrIMtkY5zaqQ2M_elNSNZFJChnQotbDzsuhxEYlMH4is8rN6ml7y61DHr-MBuS41QKAYrIW8_AbmM-ec8UuQ3trXlHqaK8wdJVMUF3EZ3tqNINc3h1_8/s1600/DC10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;532&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaeXgLMfHR0_Sd3DxkhWR81_mNrIMtkY5zaqQ2M_elNSNZFJChnQotbDzsuhxEYlMH4is8rN6ml7y61DHr-MBuS41QKAYrIW8_AbmM-ec8UuQ3trXlHqaK8wdJVMUF3EZ3tqNINc3h1_8/s640/DC10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Attività del Server: &lt;/b&gt;fornisce una visualizzazione sull&#39;attività, l&#39;utilizzo di risorse e la competizione sulle risorse di SQL Server, raccoglie&amp;nbsp; inoltre dati generali sulle risorse di sistema per consetire l&#39;identificazione di eventuali colli di bottiglia&lt;b&gt; &lt;/b&gt;esterni rispetto al motore di DB.&amp;nbsp; In questo caso i dati vengono raccolti sia dalle DMV che da molti contatori di performance di SQL Sever e di sistema. &lt;br /&gt;
Il campionamento avviene ogni 60 secondi ed i dati vengono caricati sul MDW ogni 15 minuti dove vengono conservati per 14 giorni.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4iIztUUu9ZcxFscj4rEcB3tNb-kHFw0ovTkdSpPluxyk29LO-gouI_y_MPNbskYtooIxjjmGxeqsxGfNVKjCOch22Z19nt8W-1G6CkUUAzX3CCHtpO5W7OGRguukAaf4lXPYrsbViUKE/s1600/DC11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;534&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4iIztUUu9ZcxFscj4rEcB3tNb-kHFw0ovTkdSpPluxyk29LO-gouI_y_MPNbskYtooIxjjmGxeqsxGfNVKjCOch22Z19nt8W-1G6CkUUAzX3CCHtpO5W7OGRguukAaf4lXPYrsbViUKE/s640/DC11.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Come si evince dalle immagini è possibile, ma assolutamente non necessario, modificare alcuni parametri, come ad esempio il periodo di di ritenzione dei dati nel MDW.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;I Report&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Se non avete voglia di aspettare le schedulazioni predefinite potete in qualsiasi momento forzare la raccolta ed il caricamento dei dati.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgupJHHk0PjMFqBTAzH247Mpz4j4dS-QDkaLgHCvnH2euKyfgdUI5I00idc_5FowQ0rOXwSYmDpXbBR9V0tMqcT3x0QDB9g2eyroALHxYUdRfvrbXK_r1p0tAgBpCIFeBrwjD2QvLOtFpU/s1600/mdw18.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;514&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgupJHHk0PjMFqBTAzH247Mpz4j4dS-QDkaLgHCvnH2euKyfgdUI5I00idc_5FowQ0rOXwSYmDpXbBR9V0tMqcT3x0QDB9g2eyroALHxYUdRfvrbXK_r1p0tAgBpCIFeBrwjD2QvLOtFpU/s640/mdw18.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
L&#39;analisi dei dati raccolti mettere a dura prova anche un DBA di grande esperienza, e per questo motivo che il secondo, e forse anche il più grande, vantaggio del Data Collector sono i report che mette a disposizione.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRMVZ5r_KS5S6ZNH_ZyWu-5xvUjGVru1mKJrGwdmLqmlLR3nnfopf01OC3TNWjXLZmu0seaMtZS71gF-Tnv9gwlI1-ZZGbnHWgBFmpUcIah_yQPiQR3aXlhjZXHktA2Mb9UDvY4oUKog/s1600/mdw19.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRMVZ5r_KS5S6ZNH_ZyWu-5xvUjGVru1mKJrGwdmLqmlLR3nnfopf01OC3TNWjXLZmu0seaMtZS71gF-Tnv9gwlI1-ZZGbnHWgBFmpUcIah_yQPiQR3aXlhjZXHktA2Mb9UDvY4oUKog/s640/mdw19.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Come vedete i report sono in rapporto uno ad uno con i collettori.&lt;br /&gt;
Vediamo quindi i dati che ci vengono messi a disposizione e la loro rappresentazione grafica.&lt;br /&gt;
Mi scuso per il fatto che tutte le immagini sono prese da un ambiente di test praticamente fermo, in cui l&#39;unico carico è quello del Data Collector, ma questo non deve assolutamente indurre nell&#39;errore di pensare che lo strumento crei un forte overhead sul sistema monitorato.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;Utilizzo del disco&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwFXD3wrrXScmSijY-zBx74QxXnYafgqzjX-YWybueqA-Mnl88DjWHbjBLwy1JYFe03iYh_bQU_TTOOzEWVP50pybLAq_HgPC5EB3c0zQzmbHUCVbQaft8emH8gmxwPCkdJ8iC7Ot6_2E/s1600/DC9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;418&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwFXD3wrrXScmSijY-zBx74QxXnYafgqzjX-YWybueqA-Mnl88DjWHbjBLwy1JYFe03iYh_bQU_TTOOzEWVP50pybLAq_HgPC5EB3c0zQzmbHUCVbQaft8emH8gmxwPCkdJ8iC7Ot6_2E/s640/DC9.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Visualizza tutti i file di Dati e Log dei Database della nostra istanza in termini di grandezza e crescita. Cliccando sul nome del singolo DB possiamo vedere lo spazio libero e l&#39;elenco di tutti gli eventi correlati alla loro crescita.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI4AKBgLpa3wmndfNdiZjzjvYqVBNT2UlVmtpXxGNjJxALjQxwKojnroJ2qMUqk1oj_f231cupdcjyBzkOYtuQyFsEUvA6ugXv1_Smz04YgRrzDspSF4d8coJzDo2JLO1KfmepCzlDveU/s1600/mdw25.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;374&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI4AKBgLpa3wmndfNdiZjzjvYqVBNT2UlVmtpXxGNjJxALjQxwKojnroJ2qMUqk1oj_f231cupdcjyBzkOYtuQyFsEUvA6ugXv1_Smz04YgRrzDspSF4d8coJzDo2JLO1KfmepCzlDveU/s640/mdw25.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Statistiche sulle Query&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Innanzitutto visualizza la TOP 10 delle Query relativamente al consumo di risorse (di default la CPU)  in formato grafico&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK2XfaK3HwbDwNgW1DhUi14BAyQJP7_4KreZPIvJuD12AaW9Kqc1YsvPGv3s5BPLi-DKaPY0VYj-h2SDQ9eOhQjDpGwKgpufWTOIiruXWVLXFUMmFHtkW9B1RcR9ejG_5ZTmpXEnSemYs/s1600/DC14.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;408&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK2XfaK3HwbDwNgW1DhUi14BAyQJP7_4KreZPIvJuD12AaW9Kqc1YsvPGv3s5BPLi-DKaPY0VYj-h2SDQ9eOhQjDpGwKgpufWTOIiruXWVLXFUMmFHtkW9B1RcR9ejG_5ZTmpXEnSemYs/s640/DC14.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
ed in forma testuale&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinnk_v_75d8KvNuP8Nj0JR2Mn2dZwg7eZTVD3PCpZUuGsgYOaquCsPg_RVt2QRHuqn413q3jcRIBQfB_YecpUdHdswZ-465V9op5f44Tq9qkoKkqdzGLCShyxo_sv2qWPycoGi8F375Gc/s1600/DC15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinnk_v_75d8KvNuP8Nj0JR2Mn2dZwg7eZTVD3PCpZUuGsgYOaquCsPg_RVt2QRHuqn413q3jcRIBQfB_YecpUdHdswZ-465V9op5f44Tq9qkoKkqdzGLCShyxo_sv2qWPycoGi8F375Gc/s640/DC15.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Cliccando poi sul singolo statement si entra in una visualizzazione di dettaglio con preziosissime informazioni inerenti le risorse utilizzate e la possbilità di entrare nel dettaglio dei waits&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8Kdo7DMi_KYccUpg_Udt7FPFUcoysRej5BeWrBO9-W3OAdjqBvaodqbKf1IRs2A7fXUMiPPm_V6d8qpqJyK7EVaLWvm50Byu01QY_h5UO6cFsqmy5ftTL-JUbAaRbxLi6Tk4DLqW9R4/s1600/DC16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8Kdo7DMi_KYccUpg_Udt7FPFUcoysRej5BeWrBO9-W3OAdjqBvaodqbKf1IRs2A7fXUMiPPm_V6d8qpqJyK7EVaLWvm50Byu01QY_h5UO6cFsqmy5ftTL-JUbAaRbxLi6Tk4DLqW9R4/s640/DC16.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Attività del Server:&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;questo report&amp;nbsp; consente di visualizzare dei grafici relativi alle quattro risorse fondamentali in fase di tuning di SQL&lt;b&gt;. &lt;/b&gt;Molto interessante è il fatto che ci consente di separare l&#39;attività SQL Server da quella di Sistema.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Inoltre mette in formato grafico, con la possibilità di entrare nel dettaglio tramite un semplice click sia i Wait che le attività più significative in termini di performance tuning del server SQL.&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw4Ua2g_w-okFbVkNA0vHf199pkCgkfdR8JBUBwHyxdyXo9_aahPV6pfDFw_sI7QVpE-xhfsVoLvxtL8q-3vEbJy5nuSLCdbO9w0V1fEdkD7MK3giR3D6kQS1-zsYY3ytbRADyU3mAenU/s1600/DC13.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt; &lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ldEQ8kCZ8EASYBORZ8xcnW2EwG-ScAOZDZCCD6f6blcbC-JrprvEXq562O_2uD473JFZZMaFdOsgipSzd7_FKQYkP2g79D3lWW4dB0PP1_zyIyEvzA5BY4D2NxP5issqTlekzoqpvIE/s1600/mdw.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ldEQ8kCZ8EASYBORZ8xcnW2EwG-ScAOZDZCCD6f6blcbC-JrprvEXq562O_2uD473JFZZMaFdOsgipSzd7_FKQYkP2g79D3lWW4dB0PP1_zyIyEvzA5BY4D2NxP5issqTlekzoqpvIE/s640/mdw.jpg&quot; width=&quot;576&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKntEJskV1IUB7lZfP6-xY0sihDuhm8i3QkHofIvAwG1L6gWrJfOc3KDKTAL2A_D9SNS2o4_HlZgrDC2lv13lhBatr8lLrHcNWUqae1FvIc2pP5ksAlgffDwWIgT7tpG824TTr0V3t6Kg/s1600/mdw22.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw4Ua2g_w-okFbVkNA0vHf199pkCgkfdR8JBUBwHyxdyXo9_aahPV6pfDFw_sI7QVpE-xhfsVoLvxtL8q-3vEbJy5nuSLCdbO9w0V1fEdkD7MK3giR3D6kQS1-zsYY3ytbRADyU3mAenU/s1600/DC13.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Conclusioni&amp;nbsp; e note finali&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Come abbiamo visto questo strumento coniuga due grandi qualità: semplicità di configurazione e potenza di analisi, quindi sono certo che diventerà presto parte di quasi tutte le vostre installazioni di SQL Server.&lt;br /&gt;
Purtroppo SQL Server 2005 non supporta&lt;b&gt; &lt;/b&gt;i data collector&lt;b&gt; &lt;/b&gt;ma&lt;b&gt; &lt;a href=&quot;http://mssqldude.wordpress.com/2010/12/14/sql-server-2008-mdw-data-collectors-for-sql-server-2005/&quot; target=&quot;_blank&quot;&gt;MSSQLDUDE&lt;/a&gt;&amp;nbsp;&lt;/b&gt; suggerisce una tecnica per ovviare al problema&lt;b&gt; &lt;/b&gt;(ad onor del vero non l&#39;ho mai provata)&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
Inoltre ricordate che potete sempre esportare i grafici in formato PDF o Excel&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjESp3cpGp2ghMprgnLkimbz6hHHCDv0sEebxFb4tmwZ-jNEaurjlGQToEjbZ5ihueY2M7LA8a4CRB-A5bb-T5yUzhUI5Q5lz8njXJoW0OCN919pdXV-bYn-cw8bIaDkdglerF2k4LxeMg/s1600/mdw21.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;376&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjESp3cpGp2ghMprgnLkimbz6hHHCDv0sEebxFb4tmwZ-jNEaurjlGQToEjbZ5ihueY2M7LA8a4CRB-A5bb-T5yUzhUI5Q5lz8njXJoW0OCN919pdXV-bYn-cw8bIaDkdglerF2k4LxeMg/s640/mdw21.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Link:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb677179.aspx&quot; target=&quot;_blank&quot;&gt;Data Collector su MSDN&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://blog.sqlauthority.com/2010/04/13/sql-server-configure-management-data-collection-in-quick-steps-t-sql-tuesday-005/&quot; target=&quot;_blank&quot;&gt;SQL Authority&lt;/a&gt; &lt;/b&gt;(a cui ho rubato un pò di immagini)&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/5181530404250321629/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/il-data-collector-di-sql-server-2008.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/5181530404250321629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/5181530404250321629'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/il-data-collector-di-sql-server-2008.html' title='Il Data Collector di SQL Server 2008'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6K_8ZgTwAD9dFNxlKiXdXufWtIlVtSXCyVWNTNbNcaEYDXfPFv_KH5jVjoDrOWhUPiCS71AJMIoEsNHTIifA6LDLVojYgprRA0rYzowugub6o6vzlqPfiqpcrVgGeRrmwcYO3E9Q4E3Q/s72-c/IC169768.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-7209249732226604337</id><published>2012-01-17T15:35:00.000+01:00</published><updated>2012-01-17T15:35:17.276+01:00</updated><title type='text'>Trucco: CmdKey</title><content type='html'>Le connessioni verso un client o server che richiedono autenticazione hanno necessità di creare un contesto di autorizzazione.&lt;br /&gt;
Tipicamente ci viene richiesto di inserire Utente e Password, le credenziali immesse vengono memorizzate sul computer locale e riutilizzate automaticamente quando ci si connette nuovamente al compuer remoto.&lt;br /&gt;
Come gestire questo archivio?&lt;br /&gt;
Tramite l&#39;utility a riga di comando cmdkey.exe.&lt;br /&gt;
Esempi:&lt;br /&gt;
cmdkey /list&amp;nbsp; -- fa una lista delle credenziali memorizzate&lt;br /&gt;
&lt;br /&gt;
cmdkey /add:server01 /user:mikedan&amp;nbsp; -- usa l&#39;utente mikedan per connetersi al server01&lt;br /&gt;
&lt;br /&gt;
cmdkey /delete:server01&amp;nbsp; -- elimina le credenziali per connettersi al server01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://technet.microsoft.com/en-us/library/cc754243(WS.10).aspx</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/7209249732226604337/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/trucco-cmdkey.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7209249732226604337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7209249732226604337'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2012/01/trucco-cmdkey.html' title='Trucco: CmdKey'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-8428458132820486253</id><published>2011-11-02T20:23:00.001+01:00</published><updated>2011-11-09T08:54:48.066+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ReadyBoost Windows 7 XP vista RAM"/><title type='text'>Trucco: ReadyBoost</title><content type='html'>Hai poca RAM e sul computer rallenta tutto?&lt;br /&gt;
Window Vista e Windows 7 offrono un&#39;interessante funzionalità. ReadyBoost, che consente di espandere la RAM su di una memoria Flash.&lt;br /&gt;
La maggior parte dei dispositivi di Flash, quindi le varie schedine SD ed i pennini USB sono compatibili. Nonostante il transfer rate di questi dispositivi sono normalmente inferiori a quelli degli HD, i tempi di accesso sono enormemente inferiori. Quindi per le letture non sequenziali di dati brevi il sistema cerca di usare l&#39;unità flash, nell&#39;altro caso preferisce utilizzare l&#39;HD che è più performante.&lt;br /&gt;
&amp;nbsp;L&#39;attivazione di può avvenire o tramite il menù dell&#39;autoplay o tramite proprietà del dispositivo rimovibile.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8vjH63rbUp7wW53gAWYFXPIujISzu80tSdyIuVcpB4ree6-eCA5lAk-PSaqZfwfB7FGZ292DFq8ObHIvpCJk9mWNYzTk5fKBZrG-3CdWVrJWxc0Tkr5BgYzkP7ZfHUmptJWuRPygD5s/s1600/readyboost.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8vjH63rbUp7wW53gAWYFXPIujISzu80tSdyIuVcpB4ree6-eCA5lAk-PSaqZfwfB7FGZ292DFq8ObHIvpCJk9mWNYzTk5fKBZrG-3CdWVrJWxc0Tkr5BgYzkP7ZfHUmptJWuRPygD5s/s320/readyboost.jpg&quot; width=&quot;274&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Il sistema non utilizzerà banalmente l&#39;unità per il file di swap, ma ci sposterà files frequentemente acceduti e file di boot.&lt;br /&gt;
Nei computer portatili questa funzionalità di caching può fare diminuire gli accessi all&#39;HD permettendo ai dischi di andare in standby ed aumentando quindi la durata della carica delle batterie.&amp;nbsp; &lt;br /&gt;
Con sistemi dotati di 512mb di RAM le performaces possono migliore incredibilmente, all&#39;aumentare della quantità di RAM&amp;nbsp; i benefici tendono a scomparire.&lt;br /&gt;
&lt;br /&gt;
Su Windows XP nativamente non è disponibile questa funzionalità, ma la società russa Moscow Development Office ha sviluppato il programma&lt;a href=&quot;http://www.eboostr.com/en/&quot;&gt; eBoostr&lt;/a&gt; in grado di emulare il sistema Readyboost, rendendolo compatibile anche con dispositivi Firewire e eSata.</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/8428458132820486253/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2011/11/trucco-readyboost.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/8428458132820486253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/8428458132820486253'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2011/11/trucco-readyboost.html' title='Trucco: ReadyBoost'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8vjH63rbUp7wW53gAWYFXPIujISzu80tSdyIuVcpB4ree6-eCA5lAk-PSaqZfwfB7FGZ292DFq8ObHIvpCJk9mWNYzTk5fKBZrG-3CdWVrJWxc0Tkr5BgYzkP7ZfHUmptJWuRPygD5s/s72-c/readyboost.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-4263025061433907796</id><published>2011-10-19T20:47:00.004+02:00</published><updated>2011-11-02T12:48:37.580+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft Events Virtual Lab"/><title type='text'>Microsoft Events</title><content type='html'>In cerca di documentazione e possibilità di provare tecnologie Microsoft?&lt;br /&gt;
Magari senza perdere tempo a scaricare ed installare Software? &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNAWYfVBDv_oqzXFgEWlYaTAcs_mgfsxxOJwHKm4PWe3O5BzosVZc6GmR0UiFCuNZ_qNVJtolSm5_JS3P_7KMIKfkoJe_x3jJoL0mFOqpcl8_wxQRDcPWV_zZDBISuil87e5bTRZbKL5Q/s1600/MS+virtual+labs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNAWYfVBDv_oqzXFgEWlYaTAcs_mgfsxxOJwHKm4PWe3O5BzosVZc6GmR0UiFCuNZ_qNVJtolSm5_JS3P_7KMIKfkoJe_x3jJoL0mFOqpcl8_wxQRDcPWV_zZDBISuil87e5bTRZbKL5Q/s320/MS+virtual+labs.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Su&amp;nbsp; &lt;a href=&quot;https://msevents.microsoft.com/&quot;&gt;Microsoft Word Wide Events&lt;/a&gt; avete la possbilità di trovare webcast su le principali teconlogie e, cosa molto interessante, fruire gratuitamente di Virtual Labs, ossia ambienti virtuali corredati di istruzioni per provare ed imparare.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Come potete vedere basta selezionare come tipo di evento Virtual Labs e nel mio caso ho filtrato per Technet (c&#39;è anche parecchio materiale relativo ad MSDN), ma è ovviamente possibile fare ricerche per tecnologie specifiche.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVt6DbrwLMulkagIRlPYmhk4Qq2Otv4hSfkYxeROQDF-glgHnsOC4gQLnFbr1IS332uH8RdPW0c0pP5zde4wMKnmb9wgxw2P9emowgR0b3rm-S0suZ0gkrPAZswyAnDaYDw6IriS1rpVU/s1600/MS+virtual+labs_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVt6DbrwLMulkagIRlPYmhk4Qq2Otv4hSfkYxeROQDF-glgHnsOC4gQLnFbr1IS332uH8RdPW0c0pP5zde4wMKnmb9wgxw2P9emowgR0b3rm-S0suZ0gkrPAZswyAnDaYDw6IriS1rpVU/s320/MS+virtual+labs_1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Una volta trovato il laboratario virtuale che vi interessa seguite le istruzioni.&lt;br /&gt;
E&#39; necessario un LiveID per poter accedere al laboratorio, ma se non lo avete potete traquillamente crearlo in fase di accesso.&lt;br /&gt;
&lt;br /&gt;
Buon divertimento!</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/4263025061433907796/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2011/10/microsoft-events.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/4263025061433907796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/4263025061433907796'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2011/10/microsoft-events.html' title='Microsoft Events'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNAWYfVBDv_oqzXFgEWlYaTAcs_mgfsxxOJwHKm4PWe3O5BzosVZc6GmR0UiFCuNZ_qNVJtolSm5_JS3P_7KMIKfkoJe_x3jJoL0mFOqpcl8_wxQRDcPWV_zZDBISuil87e5bTRZbKL5Q/s72-c/MS+virtual+labs.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-248798222086115496</id><published>2011-10-06T11:47:00.000+02:00</published><updated>2011-10-06T11:47:03.926+02:00</updated><title type='text'>Steve Jobs</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBlDt4b_eWuF4pbYugbE5wwbN_PDUvcDqCJ_-EiyVfZ02ByV6uISDiunZpGQHR-xQsiNmDmfsEyZOI7oDL6QKKsvnW24B2x313f_7krQzeGznXn4TWb0tK9GBOtzsXxDp_ntP-4hTNTCo/s1600/steve-jobs-dieu-el-pere.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBlDt4b_eWuF4pbYugbE5wwbN_PDUvcDqCJ_-EiyVfZ02ByV6uISDiunZpGQHR-xQsiNmDmfsEyZOI7oDL6QKKsvnW24B2x313f_7krQzeGznXn4TWb0tK9GBOtzsXxDp_ntP-4hTNTCo/s320/steve-jobs-dieu-el-pere.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&quot;Il tuo tempo è limitato, perciò non sprecarlo vivendo la vita di qualcun altro. Non lasciarti intrappolare dai dogmi - che significa vivere i risultati del pensiero di altre persone. Non lasciare che il rumore delle opinioni altrui offuschi la tua voce interiore.&lt;br /&gt;
E, cosa più importante, abbi il coraggio di seguire il tuo cuore ed il tuo intuito. Loro in qualche modo già sanno cosa vuoi davvero diventare. Tutto il resto è secondario&quot; Steve Jobs&lt;br /&gt;
&lt;br /&gt;
A prescindere da simpatie e preferenze personali è morto uno dei più grandi innovatori dell&#39; era informatica.</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/248798222086115496/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2011/10/steve-jobs.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/248798222086115496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/248798222086115496'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2011/10/steve-jobs.html' title='Steve Jobs'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBlDt4b_eWuF4pbYugbE5wwbN_PDUvcDqCJ_-EiyVfZ02ByV6uISDiunZpGQHR-xQsiNmDmfsEyZOI7oDL6QKKsvnW24B2x313f_7krQzeGznXn4TWb0tK9GBOtzsXxDp_ntP-4hTNTCo/s72-c/steve-jobs-dieu-el-pere.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-3795637148048450719</id><published>2011-06-28T12:25:00.001+02:00</published><updated>2011-06-29T14:25:13.290+02:00</updated><title type='text'>Trucco: Windows 7 GodMode</title><content type='html'>Vuoi il controllo totale sul tuo PC Windows 7?&lt;br /&gt;
Attiva la modalità &quot;divina&quot; ed accedi al menù segreto.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEjFqkfsyWbavB5Mf5x07yByy0ufUwegZmsl2wePKb85EWc3OrqlKpXGzO_7bV-OXX064H3qmoZGtwIeNwFd5cqHdoFZlhEzU2txWr_O-y5rh915klFQgg1U-w8aBLBH0DcpktDTB3zWM/s1600/godmode1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEjFqkfsyWbavB5Mf5x07yByy0ufUwegZmsl2wePKb85EWc3OrqlKpXGzO_7bV-OXX064H3qmoZGtwIeNwFd5cqHdoFZlhEzU2txWr_O-y5rh915klFQgg1U-w8aBLBH0DcpktDTB3zWM/s320/godmode1.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;Crea una nuova cartella sul desktop e chiamala:&lt;br /&gt;
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apri la cartella ed eccoti tutte le opzioni di configurazione di Windows 7!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjctOXhA6-0XRIItbyOYCQx5FJAS7A05yXLdm0NCbi95oNAhCluFYdeNBA14kzjLpuVsSAPMVctnLKj3P5R7r2bdqtas02dpPohPYxalzuAV6kOxfo4VpCGlVHKmwCU8FrwIYPqZHAnhjA/s1600/godmode.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjctOXhA6-0XRIItbyOYCQx5FJAS7A05yXLdm0NCbi95oNAhCluFYdeNBA14kzjLpuVsSAPMVctnLKj3P5R7r2bdqtas02dpPohPYxalzuAV6kOxfo4VpCGlVHKmwCU8FrwIYPqZHAnhjA/s400/godmode.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Se non ti serve più basta cancellare la cartella.</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/3795637148048450719/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2011/06/trucco-windows-7-godmode.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/3795637148048450719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/3795637148048450719'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2011/06/trucco-windows-7-godmode.html' title='Trucco: Windows 7 GodMode'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEjFqkfsyWbavB5Mf5x07yByy0ufUwegZmsl2wePKb85EWc3OrqlKpXGzO_7bV-OXX064H3qmoZGtwIeNwFd5cqHdoFZlhEzU2txWr_O-y5rh915klFQgg1U-w8aBLBH0DcpktDTB3zWM/s72-c/godmode1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-7524684488992696362</id><published>2011-05-05T20:03:00.004+02:00</published><updated>2011-10-19T21:05:03.464+02:00</updated><title type='text'>TSQL: Funzione di Levenshtein per analizzare la similitudine fra stringhe</title><content type='html'>&lt;span style=&quot;font-size: small;&quot;&gt;La distanza tra due parole, secondo   &lt;a href=&quot;http://it.wikipedia.org/wiki/Distanza_di_Levenshtein&quot; target=&quot;_blank&quot;&gt;l&#39;algoritmo di Levenshtein&lt;/a&gt;  non è altro che il grado di similitudine tra queste due parole, viene di fatto calcolata la somiglianza tra parole.   A volte si ha a che fare con dati sporchi digitati non correttamente su diverse tabelle proveniente da diversi   ambiente ed è difficile riconciliare le informazioni usando solo query con la condizione &lt;b&gt;LIKE&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  La funzione che segue, scritta in TSQL per SQL server, ci viene incontro,   basandosi sull&#39;algoritmo di Levenshtein, restituisce un numero intero che   rappresenta la distanza, ovvero la differenza, tra le due parole. Più il risultato è basso più le parole sono simili,  nel caso di due parole uguali l&#39;algortimo restituisce 0.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  L&#39;algoritmo di Levenshtein di fatto restituisce il numero minimo di modifiche da applicare alla parola A  per trasformarla in un altra B, dove per modifica si intende: la cancellazione di un carattere,   la sostituzione di un carattere con un altro, o l&#39;inserimento di un carattere.  &lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;create function dbo.Levenshtein (@parola1 varchar(30), @parola2 varchar(30))
returns int
as
begin
 declare @distanza int -- La variabile che viene restituita
 declare @lenparola1 int -- La lunghezza della prima parola
 declare @lenparola2 int -- la lunghezza della seconda parola

 -- Calcolo la lunghezza delle due parole

 set @lenparola1 = len(@parola1)
 set @lenparola2 = len(@parola2)
 
 -- Se la lunghezza di una delle due parole è 0 allora viene restituita la lunghezza dell&#39;altra
 if @lenparola1 = 0
  set @distanza = @lenparola2
 else if @lenparola2 = 0
  set @distanza = @lenparola1
 else
  begin
  declare @array_temp table (riga int,colonna int,valore int)
  -- Creo una tabella temporanea per simulare un array bidimensionale
  declare @i int
  declare @j int
  
  -- inizializzo la cella (0,0) con il valore 0
  insert @array_temp values (0, 0, 0)

  -- importo i valori della prima riga e della prima colonna a 0
  set @i = 1
  while @i &amp;lt;= @lenparola1
   begin
   insert @array_temp values (@i, 0, @i)
   set @i = @i + 1
   end
  set @j = 1
  while @j &amp;lt;= @lenparola2
   begin
   insert @array_temp values (0, @j, @j)
   set @j = @j + 1
   end
 
  -- Ciclo sulle due parole calcolando la distanza
 
  declare @cost int
  declare @min1 int
  declare @min2 int
  declare @min3 int
 
  set @i = 1
  while @i &amp;lt;= @lenparola1
   begin
   set @j = 1
   while @j &amp;lt;= @lenparola2
    begin
    -- Compara i caratteri e determina il @cost
    -- Se sono uguali @cost = 0.&lt;/pre&gt;&lt;pre&gt;-- Se diversi @cost = 1
    
    if (substring(@parola1, @i, 1) = substring(@parola2, @j, 1))
     set @cost = 0
    else
     set @cost = 1
    
    -- Calcolo il minimo tra:
    -- La cella a sinistra
    -- Quella in alto
    -- E quella in alto a sinistra in diagonale
    
    select @min1 = [valore] + 1
    from @array_temp
    where riga = @i - 1 and colonna = @j
    
    select @min2 = [valore] + 1
    from @array_temp
    where riga = @i and colonna = @j - 1
    
    select @min3 = [valore] + @cost
    from @array_temp
    where riga = @i - 1 and colonna = @j - 1
    
    if @min2 &amp;lt; @min1
    set @min1 = @min2
    if @min3 &amp;lt; @min1
    set @min1 = @min3
    
    insert into @array_temp values (@i, @j, @min1)
    set @j = @j + 1
    end
   set @i = @i + 1
   end
  -- La distanza finale è la cella in basso a destra
  select @distanza = [valore]
  from @array_temp
  where riga = @lenparola1 and colonna = @lenparola2
  end
 -- Restituisco la distanza
 return @distanza
end&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Possiamo ad esempio utilizzarla:&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;select * 
from miatabella 
where dbo.Levenshtein (&#39;paroladaconfrontare&#39;, miatabella.miocampo) &amp;lt; 3&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;N.B.: Questa funzione è stata presa in rete e non scritta da me&amp;nbsp;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;P.S. la versione Enterprise di SQL Server 2008 R2 comprende i&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt; &lt;a href=&quot;http://www.microsoft.com/sqlserver/en/us/solutions-technologies/data-warehousing/master-data-services.aspx&quot;&gt;Master Data services&lt;/a&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;che includono questa ed altre funzioni di Fuzzy lookup. &amp;nbsp; &lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/7524684488992696362/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2011/05/tsql-funzione-di-levenshtein-per.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7524684488992696362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/7524684488992696362'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2011/05/tsql-funzione-di-levenshtein-per.html' title='TSQL: Funzione di Levenshtein per analizzare la similitudine fra stringhe'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5205277480698189450.post-6590379952632046168</id><published>2011-03-15T22:43:00.002+01:00</published><updated>2011-03-18T10:42:19.627+01:00</updated><title type='text'>Gli Snapshot in ambito Microsoft Windows Hyper-V</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj40Qf_kTi_Qa4tdW0y_h3oPOjwoy3wN-m6FwqVJ-DYpOWMOVY9pR73J67Ol9xXjMN24QsQ2ep4prks8jDrACvjDgAsC6WFZGXRc8BqcQ4Ew2fO7YfBtPPUCy5JudLBuYnGwxs-ObbE58g/s1600/windows-server-2008-hyper-v-logo-v_21.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj40Qf_kTi_Qa4tdW0y_h3oPOjwoy3wN-m6FwqVJ-DYpOWMOVY9pR73J67Ol9xXjMN24QsQ2ep4prks8jDrACvjDgAsC6WFZGXRc8BqcQ4Ew2fO7YfBtPPUCy5JudLBuYnGwxs-ObbE58g/s320/windows-server-2008-hyper-v-logo-v_21.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Una delle cose che affascina molto nei progetti di virtualizzazione è la possibilità di creare delle fotografie (snapshot) delle macchine virtuali.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Questa funzionalità, apparentemente semplice, nasconde non poche insidie e viene spesso fraintesa.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;Da questo nasce l&#39;idea di questo articolo il cui obiettivo è di fare maggiore chiarezza sull&#39;argomento.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Se vi annoiano i discorsi troppo tecnici e vi interessa solo il succo potete saltare direttamente alle conclusioni nel paragrafo finale:&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;b&gt;Avvertenze sugli snapshot.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Introduzione Terminologica&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://ruggierolauria.blogspot.com/2010/12/utilizzare-i-vhd.html&quot;&gt;&lt;b&gt;VHD&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
Un Disco Fisso Virtuale è un file fornisce spazio disco ad una macchina virtuale (e non solo).&lt;br /&gt;
All&#39;interno della macchina virtuale è visto e trattato come un normale disco fisico.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Disco Differenziale&lt;/b&gt;&lt;br /&gt;
Un disco differenziale virtuale è un un disco fisso virtuale associato ad un altro disco fisso virtuale in una realazione di titpo padre-figlio.&lt;br /&gt;
Il disco differenziale (figlio) memorizza tutte le modifiche fatte sul disco padre, consentendone quindi il salvataggio senza che alcuna modifica sia effettivamente eseguita sul disco padre. In altre parole, utilizzando i dischi differenziali, ci assicuriamo che le modifiche siano riportate sul disco differenziale e non sul disco vhd originale.&lt;br /&gt;
Successivamente è possibile, se lo desideriamo, unire il disco differenziale con il disco padre al fine di avere un solo VHD contenente tutte le modifiche.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Gli Snapshot&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Gli Snapshot sono una funzionalità dell&#39;&lt;b&gt; Hyper-V&lt;/b&gt; di &lt;b&gt;Windows Server 2008&lt;/b&gt;&amp;nbsp; &lt;b&gt;R2&lt;/b&gt; che ci consente di creare una versione ad un determinato momento della nostra macchina virtuale.&lt;br /&gt;
Il vantaggio dal punto di vista amministrativo e che ci consentono di create &lt;b&gt;gerarchie di modifiche&lt;/b&gt; e di poter tornare facilmente indietro.&lt;br /&gt;
Gli snapshot non apportano alcuna modifica allo stato delle macchine virtuali cui fanno riferimento.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Come Funzionano&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Hyper-V segue i seguenti passi per la creazione di uno snapshot:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Mette in &lt;b&gt;pausa&lt;/b&gt; la maccina virtuale&lt;/li&gt;
&lt;li&gt;Crea un &lt;b&gt;disco differenziale per ogni vhd&lt;/b&gt; configurato sulla macchina virtuale&lt;/li&gt;
&lt;li&gt;Fa una &lt;b&gt;copia del file di configurazione&lt;/b&gt; della macchina virtuale&lt;/li&gt;
&lt;li&gt;Fa&lt;b&gt; ripartire&lt;/b&gt; la macchina virtuale&lt;/li&gt;
&lt;li&gt;Se la macchina era in esecuzione viene&lt;b&gt; salvato il contenuto della memoria &lt;/b&gt;sui nuovi dischi differenziali&lt;/li&gt;
&lt;/ol&gt;Tutte queste operazioni si svolgono in maniera trasparente per gli utenti che non dovrebbero riscontrare alcun rallentamento o indisponibilità della macchina virtuale. In pratica la macchina durante la sua fase di pausa trattiene in memoria tutte le modifiche effettuate, per salvarle nel passo 5.&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;I file degli snapshot&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Uno snapshot consiste di diversi file che vengono memorizzati in una directory degli snapshot associata alla macchina virtuale.&lt;br /&gt;
Nel dettaglio avremmo:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Un file di&lt;b&gt; configurazione&lt;/b&gt; della macchina virtuale (&lt;b&gt;.xml&lt;/b&gt;)&lt;/li&gt;
&lt;li&gt;Dischi&lt;b&gt; differenziali&lt;/b&gt; dello snapshot (&lt;b&gt;.avhd&lt;/b&gt;)&lt;/li&gt;
&lt;/ul&gt;Nel caso in cui la macchina virtuale al momento dello snapshot era attiva o salvata:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; File di&lt;b&gt; salvataggio di stato&lt;/b&gt; della macchina virtuale (&lt;b&gt;.vsv&lt;/b&gt;)&lt;/li&gt;
&lt;li&gt;Contenuto della&lt;b&gt; memoria&lt;/b&gt; (&lt;b&gt;.bin&lt;/b&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Non operate mai direttamente sui file degli snapshot!&lt;/b&gt; ( a meno che non sappiate esattamente cosa state facendo)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Azioni possibili sugli snapshot&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Tramite lo snap-in di gestione di Hyper-V, ed in buona parte anche tramite&lt;b&gt; SCVMM&lt;/b&gt; (System Center Virtual Machine Manager) che li chiama però &lt;b&gt;Checkpoint&lt;/b&gt;, è possibile eseguire le seguenti azioni relaitve agli snapshot delle macchine virtuali:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Creare uno nuovo &lt;/li&gt;
&lt;li&gt;Rinominare&lt;/li&gt;
&lt;li&gt;Applicare (SCVMM:Ripristinare) uno snapshot, ossia riportare la macchina virtuale allo stato dello snapshot.&lt;/li&gt;
&lt;li&gt;Cancellare uno snapshot: se lo snapshot non è quello corrente viene semplicemente cancellato, se invece è quello attivo tutte le modifiche verranno riportate (merge) sul VHD originale al momento dello spegnimento della macchina virtuale. Attenzione questa operazione può portare via parecchio tempo in fase di riavvio! &lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4MLawmZ6IxY2S4KH1yqORftkzLya0ys5KVDBBZ8k9zvhfLtxMSOyAAk1JTlD0tuLWPXyO7R5XnEqClE_z7QwIqkoQtnzkY77AfxM-CnB3oFr7xeSUddAwAku5Jx-kj8Mk8GCTl2xsPcs/s1600/snapshot_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;127&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4MLawmZ6IxY2S4KH1yqORftkzLya0ys5KVDBBZ8k9zvhfLtxMSOyAAk1JTlD0tuLWPXyO7R5XnEqClE_z7QwIqkoQtnzkY77AfxM-CnB3oFr7xeSUddAwAku5Jx-kj8Mk8GCTl2xsPcs/s400/snapshot_1.jpg&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Gestione tramite Hyper-V&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7PIDK8a3IcTdm77B-OBLzyh5wXz_JKsnpgj-oTjETy4CW7uodAdeMzXhPoJM4rnnbSgWS8Rp1MZWWxTL6R3zX6Q1Vdspks83P7T0GgoqWS19G_MGYdq8o2vPXlrHt1JSTeaT10LMmFus/s1600/snapshot_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7PIDK8a3IcTdm77B-OBLzyh5wXz_JKsnpgj-oTjETy4CW7uodAdeMzXhPoJM4rnnbSgWS8Rp1MZWWxTL6R3zX6Q1Vdspks83P7T0GgoqWS19G_MGYdq8o2vPXlrHt1JSTeaT10LMmFus/s320/snapshot_2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Gestione tramite SCVMM&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Avvertenze sugli snapshot&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A questo punto possediamo elementi sufficienti per trarre alcune importantissime conclusioni:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;Evitate di usare gli Snapshot in ambienti di produzione. &lt;/b&gt;Si potrebbero&lt;b&gt; &lt;/b&gt;avere seri problemi con servizi ed applicazioni sensibili ai tempi di risposta, tipo l&#39;autenticazione di Active Directory&lt;b&gt;, &lt;/b&gt;o che usano meccanismi di replica tipo Exchange ed SQL Server&lt;b&gt;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Gli snapshot possono &lt;b&gt;consumare molto velocemente lo spazio disco&lt;/b&gt;, soprattuto se abbiamo più snapshot della stessa macchina virtuale.&lt;/li&gt;
&lt;li&gt;Fate attenzione alle&lt;b&gt; conseguenze della cancellazione degli snapshot.&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Non&lt;/b&gt; considerate assolutamente gli snapshot un&#39;&lt;b&gt;alternativa al backup.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;L&#39;utilizzo degli snapshot che la Microsoft consiglia è per ambienti di test o di&lt;b&gt; &lt;/b&gt;formazione.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruggierolauria.blogspot.com/feeds/6590379952632046168/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ruggierolauria.blogspot.com/2011/03/gli-snapshot-in-ambito-microsoft.html#comment-form' title='17 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6590379952632046168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5205277480698189450/posts/default/6590379952632046168'/><link rel='alternate' type='text/html' href='http://ruggierolauria.blogspot.com/2011/03/gli-snapshot-in-ambito-microsoft.html' title='Gli Snapshot in ambito Microsoft Windows Hyper-V'/><author><name>Ruggiero</name><uri>http://www.blogger.com/profile/15008636257533764945</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Do8V29BRVBjcVkzRLTp-Wks0phtjqaDBQmUioAHSaEE7nP6-CiH2pyfQSXwDBxpMbRFP9MYGXou9wVGDIuAe6RH95OpCxb-AQdbLSAoGYxSywKZgF_2FqdOEKLYCoYc/s220/Rux201110.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj40Qf_kTi_Qa4tdW0y_h3oPOjwoy3wN-m6FwqVJ-DYpOWMOVY9pR73J67Ol9xXjMN24QsQ2ep4prks8jDrACvjDgAsC6WFZGXRc8BqcQ4Ew2fO7YfBtPPUCy5JudLBuYnGwxs-ObbE58g/s72-c/windows-server-2008-hyper-v-logo-v_21.png" height="72" width="72"/><thr:total>17</thr:total></entry></feed>