<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ganesh Bekkinkeri, Author at Techyaz.com</title>
	<atom:link href="https://techyaz.com/author/ganesh/feed/" rel="self" type="application/rss+xml" />
	<link>https://techyaz.com/author/ganesh/</link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Mon, 14 May 2018 11:06:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Ganesh Bekkinkeri, Author at Techyaz.com</title>
	<link>https://techyaz.com/author/ganesh/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Install SSMA for Oracle to Migrate Oracle Database to SQL Server</title>
		<link>https://techyaz.com/sql-server/migrations/how-to-install-ssma-for-oracle-to-migrate-oracle-database-to-sql-server/</link>
					<comments>https://techyaz.com/sql-server/migrations/how-to-install-ssma-for-oracle-to-migrate-oracle-database-to-sql-server/#comments</comments>
		
		<dc:creator><![CDATA[Ganesh Bekkinkeri]]></dc:creator>
		<pubDate>Sat, 12 May 2018 11:28:58 +0000</pubDate>
				<category><![CDATA[Migrations]]></category>
		<category><![CDATA[Oracle to SQL Server Migrations]]></category>
		<category><![CDATA[SSMA for Oracle]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2261</guid>

					<description><![CDATA[<p>Today, I am going to discuss about Oracle to SQL Server Database Migration. This article will give you step by step method to install Microsoft SQL Server Migration Assistant for Oracle. We also call it SSMA for Oracle. Microsoft has&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/migrations/how-to-install-ssma-for-oracle-to-migrate-oracle-database-to-sql-server/">How to Install SSMA for Oracle to Migrate Oracle Database to SQL Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today, I am going to discuss about Oracle to SQL Server Database Migration. This article will give you step by step method to install Microsoft SQL Server Migration Assistant for Oracle. We also call it SSMA for Oracle. Microsoft has designed this tool to automate data migration from Oracle to SQL Server or Azure SQL DB. SSMA for Oracle is very advanced tool that converts Oracle database schemas to SQL Server Schemas and then migrate the data from Oracle to SQL Server database.</p>
<p>The very first step to start the data migration is to setup and install Microsoft SQL Server Migration Assistant for Oracle on the system where you want to host your migrated database. Here, I will give you step by step process to proceed with the installation. First, we should check all the prerequisites for SSMA for Oracle.</p>
<h3><span style="color: #333399;">Prerequisites</span></h3>
<p>Make sure to validate all steps mentioned below before going to install Microsoft SQL Server Migration Assistant for Oracle.</p>
<ul>
<li>Make sure you have already installed SQL Server instance that will host the migrated database. Also keep in mind that you are not installing SQL Server Express edition to host the migrated database.</li>
<li>You must have sysadmin account to install SQL Server Migration Assistant for Oracle.</li>
<li>Make sure to install SSMA for Oracle on the server that will host newly migrated database on SQL Server.</li>
<li>It is recommended to install Oracle client software on your target system where SQL Server Instance is running.</li>
<li>Make sure your windows server has Microsoft Windows Installer 3.1 or a later version.</li>
<li>Port 1434 should be open.</li>
</ul>
<h3><span style="color: #333399;">Step by Step Process to Install SQL Server Migration Assistant for Oracle</span></h3>
<p>There are three steps you should go through if you want to install Oracle to SQL Server Migration Tool SSMA for Oracle.</p>
<ul>
<li>Oracle to SQL Server Migration Tool Download</li>
<li>Install SSMA for Oracle</li>
<li>Install SSMA for Oracle Extension Pack</li>
</ul>
<p>Let&#8217;s go one by one and complete the installation of Microsoft SQL Server Migration Assistant for Oracle tool.</p>
<h5><span style="color: #993300;">Oracle to SQL Server Migration Tool Download</span></h5>
<p>First step is Oracle to SQL Server migration tool download. We will first download its installation package from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=54258">Microsoft website</a> attached in the link. As of now latest version of Microsoft SQL Server Migration Assistant for Oracle is v7.8. Download the required packages from attached link. Microsoft SQL Server Migration Assistant for Oracle contains three packages as shown in below screenshot.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-2262" title="Download SSMA for Oracle" src="https://techyaz.com/wp-content/uploads/2018/05/0.5-download_SSMA4Oracle-min-1024x488.jpg" alt="Download SSMA for Oracle" width="749" height="357" srcset="https://techyaz.com/wp-content/uploads/2018/05/0.5-download_SSMA4Oracle-min-1024x488.jpg 1024w, https://techyaz.com/wp-content/uploads/2018/05/0.5-download_SSMA4Oracle-min-300x143.jpg 300w, https://techyaz.com/wp-content/uploads/2018/05/0.5-download_SSMA4Oracle-min-768x366.jpg 768w, https://techyaz.com/wp-content/uploads/2018/05/0.5-download_SSMA4Oracle-min.jpg 1315w" sizes="(max-width: 749px) 100vw, 749px" /></p>
<p>First two packages are same; one for 64 bit system and another one for 32 bit system. Third one is SSMA for Oracle extension pack. We need to download two packages (any one from first two based on your system architecture and one extension pack) for Oracle to SQL migration. The name of packages that i have downloaded are given below.</p>
<ul>
<li>SSMAforOracle_7.8.0.msi</li>
<li>SSMAforOracleExtensionPack_7.8.0.msi</li>
</ul>
<p>You can see both packages have been downloaded on my machine in below screenshot.</p>
<p><img decoding="async" class="alignnone size-full wp-image-2263" src="https://techyaz.com/wp-content/uploads/2018/05/0.7-download_SSMA4Oracle_MSI-min.jpg" alt="Download SSMA for oracle Packages" width="763" height="80" srcset="https://techyaz.com/wp-content/uploads/2018/05/0.7-download_SSMA4Oracle_MSI-min.jpg 763w, https://techyaz.com/wp-content/uploads/2018/05/0.7-download_SSMA4Oracle_MSI-min-300x31.jpg 300w" sizes="(max-width: 763px) 100vw, 763px" /></p>
<p>First package <em>SSMAforOracle</em> is mandatory to install for oracle to SQL migration. We will be installing both packages in sequence one after another. You cannot install extension pack if you have not installed SSMA for Oracle base package. Here, I will show you how to install Microsoft SQL Server Migration Assistant for Oracle and SSMA for Oracle Extension Pack.</p>
<h5><span style="color: #993300;">Install Microsoft SQL Server Migration Assistant for Oracle</span></h5>
<p>As we have downloaded both required packages for SSMA for Oracle in above section. Now we will start the installation. Right click on first package “SSMAforOracle_7.8.0” and click at “Run as Administrator” to launch the installation window. Installation of this package is very easy and smooth whereas installation of second package requires some configurational parameters that I will describe in next section of this article.</p>
<p>You will get below welcome page window to start the SSMA for Oracle installation. Click on Next button to go to next window.</p>
<p><img decoding="async" class="alignnone size-full wp-image-2264" src="https://techyaz.com/wp-content/uploads/2018/05/1-weclome-min.jpg" alt="SSMA for Oracle Welcome Page" width="495" height="391" srcset="https://techyaz.com/wp-content/uploads/2018/05/1-weclome-min.jpg 495w, https://techyaz.com/wp-content/uploads/2018/05/1-weclome-min-300x237.jpg 300w" sizes="(max-width: 495px) 100vw, 495px" /></p>
<p>Next window will ask you to validate whether you have installed Oracle client software or not as I have described in prerequisite section. You can also install it later post this installation. I would suggest you to first install Oracle client before going with this installation. You can also download the Oracle client package from this window by clicking at Download button. Click Next to go to next window.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2265" src="https://techyaz.com/wp-content/uploads/2018/05/2-Oracle-Client-min.jpg" alt="Oracle Client Download" width="491" height="393" srcset="https://techyaz.com/wp-content/uploads/2018/05/2-Oracle-Client-min.jpg 491w, https://techyaz.com/wp-content/uploads/2018/05/2-Oracle-Client-min-300x240.jpg 300w" sizes="auto, (max-width: 491px) 100vw, 491px" /></p>
<p>Here, accept the License agreement and click on Next button to proceed.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2266" src="https://techyaz.com/wp-content/uploads/2018/05/3-Accept-License-min.jpg" alt="Accept License Terms for SSMA for Oracle" width="493" height="389" srcset="https://techyaz.com/wp-content/uploads/2018/05/3-Accept-License-min.jpg 493w, https://techyaz.com/wp-content/uploads/2018/05/3-Accept-License-min-300x237.jpg 300w" sizes="auto, (max-width: 493px) 100vw, 493px" /></p>
<p>Here, we need to choose what type of setup we should install for SSMA for Oracle. I have chosen first option that is “Typical”.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2267" src="https://techyaz.com/wp-content/uploads/2018/05/4-Setup-type-min.jpg" alt="Choose Typical setup type " width="497" height="389" srcset="https://techyaz.com/wp-content/uploads/2018/05/4-Setup-type-min.jpg 497w, https://techyaz.com/wp-content/uploads/2018/05/4-Setup-type-min-300x235.jpg 300w" sizes="auto, (max-width: 497px) 100vw, 497px" /></p>
<p>When you click at Typical option to select it, the setup will move you to final window of this setup. Here, click at “Install” button to finish the SSMA for oracle installation.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2268" src="https://techyaz.com/wp-content/uploads/2018/05/5-Install-min.jpg" alt="Click on Install button to configure SSMA for Oracle" width="499" height="389" srcset="https://techyaz.com/wp-content/uploads/2018/05/5-Install-min.jpg 499w, https://techyaz.com/wp-content/uploads/2018/05/5-Install-min-300x234.jpg 300w" sizes="auto, (max-width: 499px) 100vw, 499px" /></p>
<p>Once Microsoft SQL Server Migration Assistant for Oracle will be installed, you will get below image. Click on Finish button to close this window.</p>
<p>Now SSMA for Oracle is installed, next we will configure Microsoft SQL Server Migration Assistant for Oracle Extension Pack to support server to server migration from Oracle to SQL Server migration.</p>
<h5><span style="color: #993300;">Install SSMA for Oracle Extension Pack</span></h5>
<p>Microsoft SQL Server Migration Assistant for Oracle Extension Pack creates two databases sysdb and ssmatesterdb on the target SQL Server Instance. The database sysdb contains the tables and stored procedures that are required to migrate data, and the user-defined functions that emulate Oracle system functions. The ssmatesterdb database contains the tables and procedures that are required by the Tester component.</p>
<p>Also, when you migrate data to SQL Server, SSMA creates SQL Server Agent jobs when server side data migration engine is used for migrating the data. Now let’s go ahead and start the installation of SSMA extension pack.</p>
<p>Installation of SSMA extension pack has two steps. First step is very much like the installation of first package that we did in above section so I am not going to attach the screenshots for this step because all are similar to the installation of first package. Second step of this installation is to configuration part where installation will install few SQL scripts that will support this migration. I will show the screenshots for this configuration part post installation of extension pack. Both Steps will come during running extension pack installation package.</p>
<p>Right click on second package SSMAforOracleExtensionPack_7.8.0 and click at “Run as Administration”. Again, you will get welcome page of installation.</p>
<p>Click Next button to proceed. If you have not installed Oracle client yet then you will get to notify oracle client is missing and you should install it before getting license agreement window. If you have already installed Oracle client then you will get next window to accept the license agreement. Accept the License agreement and click on Next button to proceed.</p>
<p>Now you will get next window to choose setup type. I have chosen Typical as I did in above section.</p>
<p>Once you click at typical option it will ask you to install the extension pack. Click on Install button to start the installation.</p>
<p>Once installation will be done you will get below window to configure the SSMA for Oracle tool. Now click on Next button to configure and install required SQL scripts.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2269" src="https://techyaz.com/wp-content/uploads/2018/05/6-Extension-Pack-min.jpg" alt="Click Next button to configure Extension Pack" width="485" height="352" srcset="https://techyaz.com/wp-content/uploads/2018/05/6-Extension-Pack-min.jpg 485w, https://techyaz.com/wp-content/uploads/2018/05/6-Extension-Pack-min-300x218.jpg 300w" sizes="auto, (max-width: 485px) 100vw, 485px" /></p>
<p>Here, you need to enter the SQL Server Instance name on which you want to host your migrated database. Remember, SSMA system databases sysdb and ssmatesterdb both databases will be created on this instance only.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2270" src="https://techyaz.com/wp-content/uploads/2018/05/7-Extension-Pack-min.jpg" alt="Enter SQL Server Instance Name" width="492" height="353" srcset="https://techyaz.com/wp-content/uploads/2018/05/7-Extension-Pack-min.jpg 492w, https://techyaz.com/wp-content/uploads/2018/05/7-Extension-Pack-min-300x215.jpg 300w" sizes="auto, (max-width: 492px) 100vw, 492px" /></p>
<p>Click Next button to enter connection parameters post entering the SQL Server instance name.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2271" src="https://techyaz.com/wp-content/uploads/2018/05/8-Extension-Pack-min.jpg" alt="Enter Connection Parameters" width="494" height="356" srcset="https://techyaz.com/wp-content/uploads/2018/05/8-Extension-Pack-min.jpg 494w, https://techyaz.com/wp-content/uploads/2018/05/8-Extension-Pack-min-300x216.jpg 300w" sizes="auto, (max-width: 494px) 100vw, 494px" /></p>
<p>Enter Connection details that you are using to connect to database instance in above screenshot. Click Next button now.</p>
<p>Enter password to protect the passwords stored in databases sysdb and ssmatesterdb. Again, click next now.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2272" src="https://techyaz.com/wp-content/uploads/2018/05/9-Extension-Pack-min.jpg" alt="Enter master key password" width="501" height="390" srcset="https://techyaz.com/wp-content/uploads/2018/05/9-Extension-Pack-min.jpg 501w, https://techyaz.com/wp-content/uploads/2018/05/9-Extension-Pack-min-300x234.jpg 300w" sizes="auto, (max-width: 501px) 100vw, 501px" /></p>
<p>Here, setup will ask you to create the system databases sysdb and ssmatesterdb on your given database instance. Choose options accordingly on below page and click on next button.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2273" src="https://techyaz.com/wp-content/uploads/2018/05/10-Extension-Pack-min.jpg" alt="Create system databases sysdb and ssmatesterdb" width="506" height="390" srcset="https://techyaz.com/wp-content/uploads/2018/05/10-Extension-Pack-min.jpg 506w, https://techyaz.com/wp-content/uploads/2018/05/10-Extension-Pack-min-300x231.jpg 300w" sizes="auto, (max-width: 506px) 100vw, 506px" /></p>
<p>A processing will happen just like below image once you click at next button.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2274" src="https://techyaz.com/wp-content/uploads/2018/05/11-Extension-Pack-min.jpg" alt="Processing to configure SSMA for Oracle Extension pack" width="360" height="166" srcset="https://techyaz.com/wp-content/uploads/2018/05/11-Extension-Pack-min.jpg 360w, https://techyaz.com/wp-content/uploads/2018/05/11-Extension-Pack-min-300x138.jpg 300w, https://techyaz.com/wp-content/uploads/2018/05/11-Extension-Pack-min-980x450.jpg 980w" sizes="auto, (max-width: 360px) 100vw, 360px" /></p>
<p>Once processing will be completed, SSMA for oracle extension pack will be installed. And a icon will be created on your server desktop.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2275" src="https://techyaz.com/wp-content/uploads/2018/05/12-Extension-Pack-min.jpg" alt="SSMA for Oracle Extension Pack Installed" width="439" height="172" srcset="https://techyaz.com/wp-content/uploads/2018/05/12-Extension-Pack-min.jpg 439w, https://techyaz.com/wp-content/uploads/2018/05/12-Extension-Pack-min-300x118.jpg 300w" sizes="auto, (max-width: 439px) 100vw, 439px" /></p>
<p>You can also validate it by connecting to database instance that you have given during configuration of extension pack. You will see both system databases sysdb and ssmatesterdb will be created there for this migration.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2276" src="https://techyaz.com/wp-content/uploads/2018/05/13-Extension-Pack-min.jpg" alt="SSMA databases in SSMS" width="270" height="225" /></p>
<p>&nbsp;</p>
<p>Once both packages will be installed, make sure to run below command to enable clr.</p>
<pre><strong><span style="color: #0000ff;">sp_configure 'clr enabled', 1 </span></strong>
<strong><span style="color: #0000ff;">GO </span></strong>
<strong><span style="color: #0000ff;">RECONFIGURE </span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p>If CLR is not enabled, you will receive the following error when SSMA connects to SQL Server:</p>
<p><em><span style="color: #ff0000;">SSMA could not retrieve the extension pack assembly version information. Reinstall the extension pack on the database server.</span></em></p>
<p>You will see many database objects created on system db sysdb. Such objects are <strong>ssma_oracle.bcp_migration_packages</strong>, <strong>ssma_oracle.db_storage</strong>, and <strong>ssma_oracle.db_error_list</strong> table along with many stored procedures and user-defined functions in the ssma_oracle schema.</p>
<p>Every time that you migrate data to SQL Server, SSMA creates a SQL Server Agent job. These jobs are named <strong>ssma_oracle data migration package {GUID}</strong>, and are visible in the SQL Server Agent node of SQL Server Management Studio in the Jobs folder.</p>
<p>Here we have installed Microsoft SQL Server Migration Assistant for Oracle and its Extension pack to migrate a database from Oracle to SQL Server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/change-batch-size-oracle-sql-server-migration-using-ssma/" target="_blank" rel="noopener">How to Change Batch Size for Oracle to SQL Server MIgration in SSMA for Oracle?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Transaction Log File during Data Load</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/migrations/how-to-install-ssma-for-oracle-to-migrate-oracle-database-to-sql-server/">How to Install SSMA for Oracle to Migrate Oracle Database to SQL Server</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/migrations/how-to-install-ssma-for-oracle-to-migrate-oracle-database-to-sql-server/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Add a New Database to Always On Availability Group?</title>
		<link>https://techyaz.com/sql-server/alwayson/add-database-availability-group/</link>
					<comments>https://techyaz.com/sql-server/alwayson/add-database-availability-group/#respond</comments>
		
		<dc:creator><![CDATA[Ganesh Bekkinkeri]]></dc:creator>
		<pubDate>Mon, 22 Jan 2018 11:33:16 +0000</pubDate>
				<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[availability group]]></category>
		<category><![CDATA[SQL Server 2017]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1624</guid>

					<description><![CDATA[<p>Adding or Removing databases from availability group is not day to day task but we need to perform such activities whenever it required. You can read attached article to learn how to remove database from availability group. Here, I will&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/add-database-availability-group/">How to Add a New Database to Always On Availability Group?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Adding or Removing databases from <a href="http://techyaz.com/sql-server/alwayson-availability-group/" target="_blank" rel="noopener">availability group</a> is not day to day task but we need to perform such activities whenever it required. You can read attached article to learn <a href="http://techyaz.com/sql-server/remove-database-always-availability-group/" target="_blank" rel="noopener">how to remove database from availability group</a>. Here, I will explain how to add database to an existing Always On availability group by using SSMS (SQL Server Management Studio) and Transact-SQL.</p>
<p>Before starting this exercise, make sure that primary and secondary replicas are accessible to each other and existing AOAG configuration is working fine and in healthy state. You must be connected to the server instance that hosts the primary replica to add a database to availability group.</p>
<h4><span style="color: #333399;">Add Database to Availability Group using GUI in SSMS</span></h4>
<p>First, we need to configure the corresponding secondary database on each server instance that hosts a secondary replica to save <em>add database wizard</em> processing time. You just need to run the full backup and immediate transaction log backup of the database on primary replica that has been identified to add to the availability group and then restore it to corresponding secondary replica.</p>
<p>Although it is not mandatory step to do it before adding the database to availability group as this can be done during adding database to availability group as well. But it is recommended to prepare your secondary databases on secondary replica before adding it to availability group. Let’s start with configuring secondary replicas followed by adding them to AOAG configuration.</p>
<ol>
<li>First run the full backup and immediate transaction log backup of the database that has been identified to add to the availability group on primary replica.</li>
<li>Once backups are completed on primary replica for to-be added database, copy these backups to your secondary replica and restore it with same name in no recovery mode if you want to keep your secondary database inaccessible.</li>
<li>Once database will be restored/ synced on secondary replicas, we will start adding this database to existing AOAG configuration using Add Database to Availability Group Wizard on primary replica.</li>
<li>Launch SQL Server Management Studio. Connect to the server instance that hosts the primary replica, and expand the server tree.</li>
<li>Expand the Always On High Availability folder followed by Availability Groups.</li>
<li>Right-click the availability group name, and select one of the following commands:
<ul>
<li>To launch the Add Database to Availability Group Wizard, select the <strong>Add Database.</strong></li>
<li>To add one or more databases by specifying them in the <strong>Availability Group Properties </strong>dialog box, select the <strong>Properties.<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1626" src="http://techyaz.com/wp-content/uploads/2018/01/1-Add-Database-to-AOAG-min.jpg" alt="Add Database" width="352" height="222" srcset="https://techyaz.com/wp-content/uploads/2018/01/1-Add-Database-to-AOAG-min.jpg 352w, https://techyaz.com/wp-content/uploads/2018/01/1-Add-Database-to-AOAG-min-300x189.jpg 300w" sizes="auto, (max-width: 352px) 100vw, 352px" /></strong></li>
</ul>
</li>
<li>Once you click on <strong>Add Database…</strong> option to add database to existing AOAG configuration, an Introduction wizard will appear that will very similar to the one you might have seen during creating AOAG on your SQL Server Instance.</li>
<li>Next screen will come to select databases to proceed with adding them in to AOAG configuration.</li>
<li>Third window will come to select initial data synchronization option. Here you should be careful as if you have already configured secondary databases as we did in step 1 and step 2 then you need to select second option that is “<strong>Join Only</strong>”. If you haven’t configured your secondary database you can go with either first option that will backup the primary database and restore it to secondary replica during this processing only or third option in which you can configure secondary database later. If your database is big in size it will take lot much time to complete the processing.<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1627" src="http://techyaz.com/wp-content/uploads/2018/01/2-join-only.jpg" alt="join only option in add database wizard" width="726" height="669" srcset="https://techyaz.com/wp-content/uploads/2018/01/2-join-only.jpg 726w, https://techyaz.com/wp-content/uploads/2018/01/2-join-only-300x276.jpg 300w" sizes="auto, (max-width: 726px) 100vw, 726px" /></li>
<li>Follow rest of all windows by clicking at next button and once you will click at finish button on last window, your database will be added to existing availability group. You can see the status of this newly added database in to dashboard report or in SSMS.</li>
</ol>
<h4><span style="color: #333399;">Add a Database to Availability Group using T-SQL</span></h4>
<p>As I have described n above section, first thing is to configure secondary database so we need to configure the corresponding secondary database on each server instance that hosts a secondary replica to save add database processing time. You just need to run the full backup and immediate transaction log backup of the database on primary replica that has been identified to add to the availability group and then restore it to corresponding secondary replica. Once restore will be completed then follow below steps to add this database to availability group.</p>
<ol>
<li style="list-style-type: none;">
<ol>
<li>Connect to the server instance that hosts the server instance that hosts the primary replica.</li>
<li>Use the ALTER AVAILABILITY GROUP statement, as follows:</li>
</ol>
</li>
</ol>
<pre><span style="color: #008000;"><strong>--<em>AG_name</em> is the name of the availability group.
--<em>database_name</em> is the name of a database to be added to the group.
<span style="color: #0000ff;">ALTER AVAILABILITY GROUP <em>AG_name</em> ADD DATABASE <em>database_name</em>
</span></strong></span></pre>
<p>The following example adds the <em>Techyaz</em> database to the <em>AG_Techyaz</em> availability group.</p>
<pre><span style="color: #0000ff;"><strong><span style="color: #008000;">-- Connect to the server instance that hosts the primary replica.
-- Add an existing database to the availability group.</span>
ALTER AVAILABILITY GROUP AG_Techyaz ADD DATABASE Techyaz;
GO
</strong></span></pre>
<ol start="3">
<li>If you haven’t configured your secondary database then you need to configure it on each server instance that hosts a secondary replica after adding database to an availability group. If you already added it then you are done with adding your database to existing AOAG configuration. Validate it by launching dashboard report or looking in to SSMS.</li>
</ol>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/remove-database-always-availability-group/" target="_blank" rel="noopener">How to Remove a Database from AOAG configuration?</a></strong></span></li>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/alwayson/fix-aoag-listener-error-19471-kerberos-status-showing-handle-invalid/" target="_blank" rel="noopener">Fix AOAG Listener Issue: Error 19471 The handle is Invalid</a></strong></span></li>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/troubleshooting/secondary-replica-not-coming-online-showing-resolving-state-automatic-failover-alwayson-availability-group-configuration/" target="_blank" rel="noopener">Secondary Replica Showing in Resolving State after AOAG Automatic Failover</a></strong></span></li>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/sql-server-administration/understanding-sql-server-backup-databases-availability-group/" target="_blank" rel="noopener">Understanding Backups in Alwayson Availability Group</a></strong></span></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/add-database-availability-group/">How to Add a New Database to Always On Availability Group?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/alwayson/add-database-availability-group/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Remove Database from Always On Availability Group?</title>
		<link>https://techyaz.com/sql-server/alwayson/remove-database-always-availability-group/</link>
					<comments>https://techyaz.com/sql-server/alwayson/remove-database-always-availability-group/#comments</comments>
		
		<dc:creator><![CDATA[Ganesh Bekkinkeri]]></dc:creator>
		<pubDate>Fri, 19 Jan 2018 11:45:20 +0000</pubDate>
				<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[availability group]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1618</guid>

					<description><![CDATA[<p>This article describes how to remove availability database(s) from an Always on Availability Group by using SQL Server Management Studio and Transact-SQL. Here, we will be removing primary database from availability group that will remove corresponding secondary database from AOAG&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/remove-database-always-availability-group/">How to Remove Database from Always On Availability Group?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This article describes how to remove availability database(s) from an <a href="http://techyaz.com/sql-server/alwayson-availability-group/" target="_blank" rel="noopener">Always on Availability Group</a> by using SQL Server Management Studio and Transact-SQL. Here, we will be removing primary database from availability group that will remove corresponding secondary database from AOAG configuration as well.</p>
<p>You must be connected to primary replica of AOAG configuration to perform this activity. If you connect to secondary replica to remove availability databases from AOAG configuration then only secondary database from AOAG configuration will be removed. If you remove availability database or say primary database from AOAG configuration on primary replica then it will remove availability databases from always on availability group from both replicas.</p>
<h4><span style="color: #333399;">Remove Availability Database from AOAG using SSMS</span></h4>
<ol>
<li>Launch SQL Server Management Studio. Connect to the SQL Server instance that hosts the primary replica of the database or databases to be removed, and expand the server tree.</li>
<li>Expand the <strong>Always On High Availability </strong>folder followed by <strong>Availability Groups</strong> folder showing in SSMS.</li>
<li>You can see your <strong>Availability Group Name</strong> post expanding <strong>Availability Group</strong> folder. Now expand this folder as well.</li>
<li>Now you can see <strong>Availability Databases</strong> folder. Expand this folder to see your availability databases.</li>
<li>Right-click the selected database or databases, and select <strong>Remove Database from Availability Group </strong>option as shown in below screenshot.<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1620" src="http://techyaz.com/wp-content/uploads/2018/01/1-Right-Click-AOAG-DB.jpg" alt="Right Click on Primary Database" width="455" height="244" srcset="https://techyaz.com/wp-content/uploads/2018/01/1-Right-Click-AOAG-DB.jpg 455w, https://techyaz.com/wp-content/uploads/2018/01/1-Right-Click-AOAG-DB-300x161.jpg 300w" sizes="auto, (max-width: 455px) 100vw, 455px" /></li>
<li>You will be getting below window to proceed with the database removal from AOAG configuration. In the <strong>Remove Databases from Availability Group </strong>dialog box, to remove all the listed databases, click <strong>OK</strong>.<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1621" src="http://techyaz.com/wp-content/uploads/2018/01/2-Remove-DB-AOAG.jpg" alt="Remove database from Availability Group window" width="781" height="589" srcset="https://techyaz.com/wp-content/uploads/2018/01/2-Remove-DB-AOAG.jpg 781w, https://techyaz.com/wp-content/uploads/2018/01/2-Remove-DB-AOAG-300x226.jpg 300w, https://techyaz.com/wp-content/uploads/2018/01/2-Remove-DB-AOAG-768x579.jpg 768w" sizes="auto, (max-width: 781px) 100vw, 781px" /></li>
<li>If you want to remove multiple databases from AOAG configuration, use the Object Explorer Details pane to view and select all the databases that you want to remove. You can also remove a single database either from the Object Explorer pane or the Object Explorer Details pane.</li>
</ol>
<p>This way you will remove primary database or say availability database from AOAG configuration. Data synchronization will be stopped for this database between both replicas the moment you remove it from availability group.</p>
<p>Later, you can decide whether you want to remove your secondary database or you want to use it by bringing it online. Make sure to change database name of secondary database to avoid any confusion because a copy of this database is already online with same name on primary replica.</p>
<h4><span style="color: #333399;">Remove Availability Database from AOAG using T-SQL</span></h4>
<p>Connect to SQL Server instance that are acting as primary replica of AOAG configuration.  Open New Query window to execute T-SQL query. Run below ALTER AVAILABILITY GROUP statement. Make sure to change the availability group name and availability database name that needs to be removed from AOAG configuration.</p>
<pre><span style="color: #0000ff;"><strong><span style="color: #008000;">--Availability_group_name is the name of the availability group
--Availability_db_name is the name of the database to be removed</span>
ALTER AVAILABILITY GROUP <em>Availibility_group_name</em> REMOVE DATABASE <em>Availability_db_name</em>
</strong></span></pre>
<p>I have executed below command to remove my availability database <strong>Techyaz</strong> from availability group name <strong>AG_Techyaz</strong> on primary replica.</p>
<pre><strong><span style="color: #0000ff;">ALTER AVAILABILITY GROUP AG_Techyaz REMOVE DATABASE Techyaz;
</span></strong></pre>
<p>You can see i have successfully execute this command in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1622" src="http://techyaz.com/wp-content/uploads/2018/01/3-Remove-DB-AOAG-TSQL.jpg" alt="Remove database from aoag using tsql" width="503" height="136" srcset="https://techyaz.com/wp-content/uploads/2018/01/3-Remove-DB-AOAG-TSQL.jpg 503w, https://techyaz.com/wp-content/uploads/2018/01/3-Remove-DB-AOAG-TSQL-300x81.jpg 300w" sizes="auto, (max-width: 503px) 100vw, 503px" /></p>
<p>Now, database will be removed from always on availability group and data synchronization will be stopped for this database between both replicas. Primary database will come online for read write and secondary database on secondary replica will be in restoring state. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/alwayson/fix-aoag-listener-error-19471-kerberos-status-showing-handle-invalid/" target="_blank" rel="noopener">Fix AOAG Listener Error 19471</a></strong></span></li>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/sql-server-administration/understanding-sql-server-backup-databases-availability-group/" target="_blank" rel="noopener">Understanding Backup Preferences for Availability Databases</a></strong></span></li>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/troubleshooting/fixing-sap-connectivity-issue-aoag-automatic-failover/" target="_blank" rel="noopener">Fixing Application Connectivity Issue after Automatic Failover</a></strong></span></li>
<li><span style="color: #0000ff;"><strong><a style="color: #0000ff;" href="http://techyaz.com/sql-server/troubleshooting/fix-alwayson-error-35250-joining-database-secondary-replica-resulted-error/" target="_blank" rel="noopener">Error 35250: Joining database on Secondary Replica resulted in an error</a></strong></span></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/alwayson/remove-database-always-availability-group/">How to Remove Database from Always On Availability Group?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/alwayson/remove-database-always-availability-group/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Manage Transaction Log File during Data Load</title>
		<link>https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/#respond</comments>
		
		<dc:creator><![CDATA[Ganesh Bekkinkeri]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 12:58:25 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk data load]]></category>
		<category><![CDATA[data load]]></category>
		<category><![CDATA[transaction log]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1487</guid>

					<description><![CDATA[<p>Have you even face that your transaction log file is growing exceptionally and you have to manage log file to make it in his size limit? Managing transaction log file is not an easy job if you have to run&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/">Manage Transaction Log File during Data Load</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Have you even face that your transaction log file is growing exceptionally and you have to manage log file to make it in his size limit? Managing transaction log file is not an easy job if you have to run huge data import. I was working on a migration project where we had to import huge set of data into SQL Server database. We had changed multiple configurational parameters to <a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">speed up data migration</a> and set appropriate data and log file size before starting the migration. We observed that the log file was growing extensively during data load. Log file was almost 80% full and data load was still in progress. This was a potential risk that could have caused this import to fail. We had to manage transaction log file during data load to avoid this risk and make this import successful without any issue. We had options to add log file to the database or extend the log drive. I used <a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">DBCC SQLPERF</a> command to get the log space usage statistics. Please have a look at the log space size of database <strong>TY1</strong> in last row.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1493" src="http://techyaz.com/wp-content/uploads/2018/01/1-Check-Logspace-min.jpg" alt="Check Log File Size" width="447" height="293" srcset="https://techyaz.com/wp-content/uploads/2018/01/1-Check-Logspace-min.jpg 447w, https://techyaz.com/wp-content/uploads/2018/01/1-Check-Logspace-min-300x197.jpg 300w" sizes="auto, (max-width: 447px) 100vw, 447px" /></p>
<p>We had few options to overcome this issue. As we were running this database in simple recovery mode, so we didn’t have an option to run the <a href="http://techyaz.com/sql-server/understanding-sql-server-backups/" target="_blank" rel="noopener">Transaction Log backup</a>. We tried to <a href="http://techyaz.com/sql-server/troubleshooting/fix-error-3023-error-3013-error-3041/" target="_blank" rel="noopener">shrink the log file to manage transaction log file</a> but it was not allowing us to do so. This might be due to the data load execution was in process and active transaction.</p>
<p>Finally, we left out with two options; either extend the log drive or add a log file to the database on a drive that has enough space to accumulate the logs. Extending the existing drive was not possible because data load was in progress and we need to fix this issue without stopping the import/data load. So, we decided to go with another option that was to add a database log file to a drive that has enough space. I have given you step by step method to add a log file to a database in below section.</p>
<h4><span style="color: #333399;">Add Log File to a Database</span></h4>
<p>I will show you how to add log file to a database using T-SQL statements and using GUI in SQL Server Management Studio to manage transaction log file during data load. This way you can manage if your transaction log file is growing faster.</p>
<p><span style="color: #ff6600;"><em><strong>Using T-SQL Statement</strong></em></span></p>
<p>Open new query window and run below T-SQL statement to add a log file <strong>TY1_Log3.ldf</strong> to database <strong>TY1</strong> on F drive. Have a look at below T-SQL code to get other details like sizing and growth details.</p>
<pre><strong><span style="color: #008000;">--Replace your Database Name and file details in below T-SQL Code.</span>
<span style="color: #0000ff;">ALTER DATABASE [TY1]
ADD LOG FILE (NAME = 'TY1_Log3', FILENAME = 'F:\TY1_Log3.ldf', SIZE = 20080 MB, FILEGROWTH = 5024 MB)
GO
</span></strong></pre>
<p>Once you execute above T-SQL statement, your log file <strong>TY1_Log3.ldf</strong> will be added on <strong>F drive</strong> to the database <strong>TY1</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1494 size-full" src="http://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min.jpg" alt="Add log file to database" width="781" height="172" srcset="https://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min.jpg 781w, https://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min-300x66.jpg 300w, https://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min-768x169.jpg 768w" sizes="auto, (max-width: 781px) 100vw, 781px" /></p>
<p>Remember, add the log file in a drive where you have enough space. If you will add log file to data file drive then you might face IO pressure because both data and log files will be on same drive so avoid to keep data and log file on same drive.</p>
<p><span style="color: #ff6600;"><em><strong>Using GUI in SSMS</strong></em></span></p>
<ol>
<li>Launch <strong>SQL Server Management Studio</strong> and connect to the instance of the <strong>SQL Server Database Engine</strong>. Expand <strong>Databases </strong>folder, right-click the database in which you have to add the log file, and then click <strong>Properties</strong>.</li>
<li>In the <strong>Database Properties </strong>dialog box, select the <strong>Files</strong> page from left side pane.</li>
<li>To add a transaction log file, click <strong>Add </strong>button from lower right side pane.</li>
<li>In the <strong>Database files </strong>grid, enter a logical name for the file. The file name must be unique within the database. Select the file type as <strong>log</strong>. Specify the initial size of the file. Set <strong>Autogrowth</strong> column as per your requirement.</li>
<li>Specify the path for the file location along with physical log file name. The specified path must exist before adding the file. Make sure that your drive has enough space to host this log file.</li>
<li>Click on OK button to create this add this log file to the database.</li>
</ol>
<p>Once you performed step 6, log file will be added to your database on your identified drive name. These exercises (adding log file to database) doesn&#8217;t require any downtime or it will not interrupt any existing transactions. This way you can manage transaction log file during data load if your transaction log file is growing faster.</p>
<p><span style="color: #800000;"><em><strong>Read More</strong></em></span></p>
<ul>
<li><a href="http://techyaz.com/sql-server/get-total-virtual-log-files/" target="_blank" rel="noopener">How to get Total no. of Virtual Log Files in a Transaction Log file?</a></li>
<li><a href="http://techyaz.com/sql-server/understanding-transaction-log-architecture/" target="_blank" rel="noopener">Understanding Transaction Log File Architecture</a></li>
<li><a href="http://techyaz.com/sql-server/always-turn-off-database-auto-shrink/" target="_blank" rel="noopener">Why Should You Always Turn Off Database Auto Shrink Property?</a></li>
<li><a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">What is the best value for database file autogrowth?</a></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/">Manage Transaction Log File during Data Load</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
