<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>SQL Server</title><link>https://azuresite.net:443/sql-server-2</link><description></description><item><title>SQL Server TSQL Get Last Identity Seed After Insert</title><link>https://azuresite.net:443/sql-server-2/sql-server-tsql-get-last-identity-seed-after-insert</link><description>&lt;p&gt;&lt;strong&gt;Use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;SCOPE_IDENTITY()&lt;/code&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;if you are inserting a single row and want to retrieve the ID that was generated.&lt;/p&gt;
&lt;pre class="lang-sql s-code-block"&gt;&lt;code class="hljs language-sql"&gt;&lt;span class="hljs-keyword"&gt;CREATE&lt;/span&gt; &lt;span class="hljs-keyword"&gt;TABLE&lt;/span&gt; #a(identity_column &lt;span class="hljs-type"&gt;INT&lt;/span&gt; &lt;span class="hljs-keyword"&gt;IDENTITY&lt;/span&gt;(&lt;span class="hljs-number"&gt;1&lt;/span&gt;,&lt;span class="hljs-number"&gt;1&lt;/span&gt;), x &lt;span class="hljs-type"&gt;CHAR&lt;/span&gt;(&lt;span class="hljs-number"&gt;1&lt;/span&gt;));

&lt;span class="hljs-keyword"&gt;INSERT&lt;/span&gt; #a(x) &lt;span class="hljs-keyword"&gt;VALUES&lt;/span&gt;(&lt;span class="hljs-string"&gt;'a'&lt;/span&gt;);

&lt;span class="hljs-keyword"&gt;SELECT&lt;/span&gt; SCOPE_IDENTITY();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre class="lang-sql s-code-block"&gt;&lt;code class="hljs language-sql"&gt;&lt;span class="hljs-comment"&gt;----&lt;/span&gt;
&lt;span class="hljs-number"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Use the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;OUTPUT&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;clause&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;if you are inserting multiple rows and need to retrieve the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;set&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;of IDs that were generated.&lt;/p&gt;
&lt;pre class="lang-sql s-code-block"&gt;&lt;code class="hljs language-sql"&gt;&lt;span class="hljs-keyword"&gt;INSERT&lt;/span&gt; #a(x) 
  OUTPUT inserted.identity_column 
  &lt;span class="hljs-keyword"&gt;VALUES&lt;/span&gt;(&lt;span class="hljs-string"&gt;'b'&lt;/span&gt;),(&lt;span class="hljs-string"&gt;'c'&lt;/span&gt;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre class="lang-sql s-code-block"&gt;&lt;code class="hljs language-sql"&gt;&lt;span class="hljs-comment"&gt;----&lt;/span&gt;
&lt;span class="hljs-number"&gt;2&lt;/span&gt;
&lt;span class="hljs-number"&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;source:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://dba.stackexchange.com/questions/124847/best-way-to-get-last-identity-inserted-in-a-table" target="_blank" rel="noopener"&gt;https://dba.stackexchange.com/questions/124847/best-way-to-get-last-identity-inserted-in-a-table&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description><pubDate>Wed, 09 Nov 2022 02:11:47 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/sql-server-tsql-get-last-identity-seed-after-insert</guid><category>TSQL</category><category>SQL Server</category><category>identity</category></item><item><title>Command Line equivalent of Generate Scripts Wizard in SQL Server Management Studio (SSMS)</title><link>https://azuresite.net:443/sql-server-2/command-line-equivalent-of-generate-scripts-wizard-in-sql-server-management-studio-ssms</link><description>&lt;p&gt;&lt;a href="https://github.com/microsoft/mssql-scripter" target="_blank" rel="noopener"&gt;https://github.com/microsoft/mssql-scripter&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 04 Oct 2022 06:55:26 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/command-line-equivalent-of-generate-scripts-wizard-in-sql-server-management-studio-ssms</guid><category>Generate Scripts Wizard</category><category>SQL Server</category><category>Management Studio</category><category>SSMS</category></item><item><title>Visual Studio 2022 Extensions Now Available for Reporting Services and Analysis Services</title><link>https://azuresite.net:443/sql-server-2/visual-studio-2022-extensions-now-available-for-reporting-services-and-analysis-services</link><description>&lt;p&gt;&lt;a href="https://devblogs.microsoft.com/visualstudio/analysis-services-and-reporting-services-extensions-for-visual-studio-2022-are-here/?ocid=AID3031635&amp;amp;utm_issue=August2022" target="_blank" rel="noopener"&gt;https://devblogs.microsoft.com/visualstudio/analysis-services-and-reporting-services-extensions-for-visual-studio-2022-are-here/?ocid=AID3031635&amp;amp;utm_issue=August2022&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 12 Aug 2022 07:32:39 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/visual-studio-2022-extensions-now-available-for-reporting-services-and-analysis-services</guid><category>Visual Studio 2022</category><category>Reporting Services</category><category>Analysis Services</category><category>SSRS</category><category>Report Designer</category></item><item><title>Steps for Installing SQL Server AlwaysOn Availability Groups</title><link>https://azuresite.net:443/sql-server-2/steps-for-installing-sql-server-alwayson-availability-groups</link><description>&lt;h2&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do not install AlwaysOn on a domain controller&lt;/li&gt;
&lt;li&gt;The operating system must be Windows 2012 or later&lt;/li&gt;
&lt;li&gt;Install all available Windows hotfixes on every server (replica)&lt;/li&gt;
&lt;li&gt;Windows Server Failover Cluster (WSFC) must be installed on every replica&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;SQL Server&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Each server (replica) must be a node in the WSFC&lt;/li&gt;
&lt;li&gt;No replica can run Active Directory services&lt;/li&gt;
&lt;li&gt;Each replica must run on comparable hardware that can handle identical workloads&lt;/li&gt;
&lt;li&gt;Each instance must run the same version of SQL Server, and have the same SQL Server collation&lt;/li&gt;
&lt;li&gt;The account that runs SQL Services should be a domain account&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Network&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is recommended to use the same network links for communication between WSFC nodes and AlwaysOn replicas&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Databases in the AG&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;user databases (no system databases)&lt;/li&gt;
&lt;li&gt;read/write&lt;/li&gt;
&lt;li&gt;multi-user&lt;/li&gt;
&lt;li&gt;AUTO_CLOSE disabled&lt;/li&gt;
&lt;li&gt;full recovery mode&lt;/li&gt;
&lt;li&gt;not configured for database mirroring&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;strong&gt;Steps&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The following steps need to be performed in this order:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp;Add Windows Failover Clustering (WSFC) to each replica (server)&lt;/li&gt;
&lt;li&gt;Configure WSFC on your primary replica&lt;/li&gt;
&lt;li&gt;Configure SQL Server on each replica&lt;/li&gt;
&lt;li&gt;Configure Logins &amp;amp; Replicas&lt;/li&gt;
&lt;li&gt;Install AlwaysOn&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sources:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sqlrx.com/steps-for-installing-sql-server-alwayson-availability-groups/" target="_blank" rel="noopener"&gt;https://www.sqlrx.com/steps-for-installing-sql-server-alwayson-availability-groups/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sqlservercentral.com/articles/steps-for-installing-alwayson-availability-groups-sql-2019" target="_blank" rel="noopener"&gt;https://www.sqlservercentral.com/articles/steps-for-installing-alwayson-availability-groups-sql-2019&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster#validate-the-configuration" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster#validate-the-configuration&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 15 Jun 2022 11:39:00 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/steps-for-installing-sql-server-alwayson-availability-groups</guid><category>SQL Server</category><category>AlwaysOn</category><category>Availability Groups</category><category>AG</category><category>steps</category></item><item><title>Restore an existing availability group database participating in SQL Server Always On Availability Groups</title><link>https://azuresite.net:443/sql-server-2/restore-an-existing-availability-group-database-participating-in-sql-server-always-on-availability-groups</link><description>&lt;p&gt;&lt;a href="https://www.sqlshack.com/restore-an-existing-availability-group-database-participating-in-sql-server-always-on-availability-groups/" target="_blank" rel="noopener"&gt;https://www.sqlshack.com/restore-an-existing-availability-group-database-participating-in-sql-server-always-on-availability-groups/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://mlichtenberg.wordpress.com/2016/02/02/how-to-restore-a-database-in-a-sql-server-alwayson-availability-group/" target="_blank" rel="noopener"&gt;https://mlichtenberg.wordpress.com/2016/02/02/how-to-restore-a-database-in-a-sql-server-alwayson-availability-group/&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 07 Jun 2022 10:16:43 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/restore-an-existing-availability-group-database-participating-in-sql-server-always-on-availability-groups</guid><category>SQL Server</category><category>restore</category><category>database</category><category>AG</category><category>Availability Group</category></item><item><title>Using the SQL Server Service Broker for Asynchronous Processing</title><link>https://azuresite.net:443/sql-server-2/using-the-sql-server-service-broker-for-asynchronous-processing</link><description>&lt;p&gt;&lt;a href="https://www.sqlshack.com/using-the-sql-server-service-broker-for-asynchronous-processing/" target="_blank" rel="noopener"&gt;https://www.sqlshack.com/using-the-sql-server-service-broker-for-asynchronous-processing/&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 21 May 2022 10:33:52 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/using-the-sql-server-service-broker-for-asynchronous-processing</guid><category>service broker</category></item><item><title>Connection to SQL Server using SSL encryption</title><link>https://azuresite.net:443/sql-server-2/connection-to-sql-server-using-ssl-encryption</link><description>&lt;p&gt;&lt;span&gt;SSL connection encryption can be initiated either from the client, which can be an IIS website or Desktop application, or can be enforced at the server side. Either way, a certificate needs to be installed and available to the user or process establishing the connection that the other system can validate. Client side encryption is configured using "encrypt=true" or selecting a checkbox option on SQL Server Management Studio. Server side encryption for SQL Server is configured by adding a certificate and private key to the certificate store of the service account running the database engine and using SQL Server Configuration Manager to specify the certificate to use for encryption and set the Force Encryption property to true. It is recommended to use a certificate generated by your domain certificate authority or one purchased from a public CA because a self signed certificate is vulnerable to a man in the middle attack.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Source:&amp;nbsp;&amp;nbsp;&lt;a href="https://stackoverflow.com/questions/37165653/connection-to-sql-server-using-ssl-encryption" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/37165653/connection-to-sql-server-using-ssl-encryption&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description><pubDate>Sun, 27 Feb 2022 05:28:00 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/connection-to-sql-server-using-ssl-encryption</guid><category>sql server</category><category>encryption</category><category>ssl</category><category>certificate</category><category>encrypt</category></item><item><title>Linked Tables from SQL Server to Microsoft Access</title><link>https://azuresite.net:443/sql-server-2/linked-tables-from-sql-server-to-microsoft-access</link><description>&lt;p&gt;1) use file DSN (can be deleted after linked tables are created).&lt;/p&gt;
&lt;p&gt;2) If using a trusted connection without a password being saved in Microsoft Access system tables, use the following template:&lt;/p&gt;
&lt;p&gt;DRIVER=SQL Server Native Client 11.0&lt;br /&gt;Regional=Yes&lt;br /&gt;Encrypt=Yes&lt;br /&gt;DATABASE=AdventureWorks&lt;br /&gt;WSID=MyWorkstationName&lt;br /&gt;APP=Microsoft Office&lt;br /&gt;Trusted_Connection=Yes&lt;br /&gt;SERVER=SQLServerHostName\SQLServerInstanceName&lt;br /&gt;Description=Whatever Description You Like&lt;br /&gt;TrustServerCertificate=Yes&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description><pubDate>Sat, 18 Sep 2021 10:56:46 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/linked-tables-from-sql-server-to-microsoft-access</guid><category>Microsoft Access</category><category>linked tables</category></item><item><title>Securing a Microsoft Access Database</title><link>https://azuresite.net:443/sql-server-2/securing-a-microsoft-access-database</link><description>&lt;p&gt;&lt;a href="https://www.techrepublic.com/blog/10-things/10-tips-for-securing-a-microsoft-access-database/" target="_blank"&gt;https://www.techrepublic.com/blog/10-things/10-tips-for-securing-a-microsoft-access-database/&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 05 Sep 2021 15:30:00 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/securing-a-microsoft-access-database</guid><category>Microsoft Access</category><category>secure</category><category>securing</category></item><item><title>Access Front End to SQL Server Back End</title><link>https://azuresite.net:443/sql-server-2/access-front-end-to-sql-server-back-end</link><description>&lt;p&gt;&lt;a href="https://social.msdn.microsoft.com/Forums/en-US/85757ab1-250e-460a-9e51-5a17516c5524/how-to-create-an-odbc-connection-for-runtime-access-to-sql-server-database-tables?forum=accessdev" target="_blank"&gt;https://social.msdn.microsoft.com/Forums/en-US/85757ab1-250e-460a-9e51-5a17516c5524/how-to-create-an-odbc-connection-for-runtime-access-to-sql-server-database-tables?forum=accessdev&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://support.microsoft.com/en-us/office/connect-access-to-sql-server-050d88f3-b2d6-4e76-b6f9-f3c556f139ea" target="_blank"&gt;https://support.microsoft.com/en-us/office/connect-access-to-sql-server-050d88f3-b2d6-4e76-b6f9-f3c556f139ea&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://support.microsoft.com/en-us/office/deploy-an-access-application-7bb4f2ba-30ee-458c-a673-102dc34bf14f" target="_blank"&gt;https://support.microsoft.com/en-us/office/deploy-an-access-application-7bb4f2ba-30ee-458c-a673-102dc34bf14f&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.accessmvp.com/DJSteele/DSNLessLinks.html" target="_blank"&gt;http://www.accessmvp.com/DJSteele/DSNLessLinks.html&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 05 Sep 2021 11:32:43 GMT</pubDate><guid isPermaLink="true">https://azuresite.net:443/sql-server-2/access-front-end-to-sql-server-back-end</guid><category>access</category><category>front end</category><category>sql server</category></item></channel></rss>