<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Neerajchourishiya on Medium]]></title>
        <description><![CDATA[Stories by Neerajchourishiya on Medium]]></description>
        <link>https://medium.com/@neerajchourishiya126?source=rss-b012162d0bc8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tVJKfgk_tghxaihc</url>
            <title>Stories by Neerajchourishiya on Medium</title>
            <link>https://medium.com/@neerajchourishiya126?source=rss-b012162d0bc8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:13:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@neerajchourishiya126/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Designing Secure Outbound and Inbound Traffic Control with AWS Network Firewall]]></title>
            <link>https://medium.com/@neerajchourishiya126/designing-secure-outbound-and-inbound-traffic-control-with-aws-network-firewall-294ca9533fe1?source=rss-b012162d0bc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/294ca9533fe1</guid>
            <category><![CDATA[aws-networking]]></category>
            <category><![CDATA[statefulsets]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-network-firewall]]></category>
            <dc:creator><![CDATA[Neerajchourishiya]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 18:53:15 GMT</pubDate>
            <atom:updated>2026-09-08T18:53:15.741Z</atom:updated>
            <content:encoded><![CDATA[<p>Most teams reach for AWS Network Firewall the moment a customer or compliance team asks: <em>“Can we control exactly which domains our servers talk to?”</em> The answer is yes — but the way you wire it into your VPC determines whether it actually protects anything, or just adds latency and cost without closing the gap you set out to fix.</p><p>This article walks through a real multi-tier architecture — private application servers, a database tier, hybrid on-premises connectivity over Site-to-Site VPN, and a phased path to internet-facing access — built around AWS Network Firewall, along with the design mistakes that are easy to make along the way and the AWS-documented reasons to avoid them.</p><h3>The Scenario</h3><p>A private, work-critical application needs to run on EC2, reachable only by office users over VPN — no direct internet exposure. At the same time, the servers themselves need controlled outbound access: certain trusted hosts get full internet access for patching, while everything else is restricted to an explicit domain allow-list and a small set of blocked content categories (social media, file-sharing, gambling). Every connection — allowed or blocked — needs to be logged for audit.<br>That’s a common shape: hybrid connectivity in, filtered egress out, zero public exposure, full audit trail. Here’s how to build it correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Odh0swaZE2MyxfTqt7DXrA.png" /></figure><p>The design rests on three separated network tiers inside a single VPC, plus a hybrid connectivity layer:</p><ul><li><strong>Application tier</strong> — private subnets across two Availability Zones, fronted by a ALB</li><li><strong>Database tier</strong> — Amazon RDS in Multi-AZ configuration, in its own dedicated subnets</li><li><strong>Firewall tier</strong> — a <em>dedicated</em> subnet per Availability Zone, existing only to host AWS Network Firewall endpoints</li><li><strong>Hybrid connectivity</strong> — a Site-to-Site VPN connecting office users, a PAM jump host, Active Directory, and a SOC server to the AWS environment</li></ul><p>The public tier (Internet Gateway, NAT Gateway, Public ALB) is deliberately shown as a <em>future phase</em> — it isn’t needed for VPN-only access, and standing it up prematurely just adds cost and attack surface without a corresponding requirement.</p><h3>Why the Firewall Subnet Has to Be Its Own Tier</h3><p>This is the single most common mistake in early AWS Network Firewall deployments, and it’s worth explaining precisely why it happens.</p><p>A Network Firewall endpoint is a VPC endpoint — it lives in a subnet, and that subnet’s route table decides where its traffic goes next. If you place that endpoint in the <em>same</em> subnet as your EC2 workloads, you immediately hit a routing contradiction: the subnet’s 0.0.0.0/0 route can only point to one target. It can&#39;t simultaneously send workload traffic <em>to</em> the firewall and send the firewall&#39;s own outbound traffic <em>through itself</em> — that&#39;s a loop, not a chain of inspection.</p><p>The fix is structural, not a configuration tweak: <strong>the firewall subnet must be dedicated</strong>, holding nothing but the firewall’s ENI, with its own route table pointing to NAT Gateway. Workload subnets get a <em>separate</em> route table whose 0.0.0.0/0 route points at the firewall endpoint — never at NAT Gateway directly, and never at the internet gateway. If a workload route table ever points straight to NAT, you&#39;ve silently uninstalled every rule you configured; the traffic simply stops passing through inspection.</p><p>This has to be repeated <strong>per Availability Zone</strong>. A firewall endpoint in ap-south-1a cannot serve a workload subnet in ap-south-1b — cross-AZ firewall routing isn&#39;t the supported pattern, and even where it can be made to work, it adds a needless cross-AZ data transfer charge for every packet.</p><h3>The Routing Chain, End to End</h3><pre>EC2 (Workload Subnet)<br>   |  0.0.0.0/0 -&gt; Network Firewall VPC Endpoint (same AZ)<br>Network Firewall (Dedicated Firewall Subnet)<br>   |  0.0.0.0/0 -&gt; NAT Gateway<br>NAT Gateway (Public Subnet)<br>   |  0.0.0.0/0 -&gt; Internet Gateway<br>Internet Gateway<br>   |<br>Internet</pre><p>The route that gets missed almost every time is the <strong>return path</strong>. NAT Gateway’s own subnet route table needs an explicit route sending replies destined for the workload CIDR back <em>through the firewall endpoint</em> — not straight back to the workload subnet via local routing. Skip this, and the outbound leg of a connection passes through inspection while the inbound reply takes a shortcut around it. AWS Network Firewall’s stateful engine tracks sessions in both directions; if it only ever sees one side of the conversation, the session table breaks and connections hang or reset even when your rules are technically correct.</p><p>This is also where <strong>AWS’s explicit prohibition on asymmetric routing</strong> matters. AWS does not support routing configurations where request and response traffic take different logical paths through VPN gateways, Network Firewall, or NAT Gateway. Every route table in the chain — workload subnet, firewall subnet, NAT/public subnet, and the VPN return path back to on-premises — has to be configured so traffic is symmetric in both directions. This isn’t a best practice suggestion; asymmetric paths will break stateful inspection and connection tracking outright.</p><h3>Layered Filtering: Whitelist First, Category Rules Second</h3><p>The scenario calls for two different policies applying to different hosts in the same subnet — a small set of trusted IPs get full internet access, everyone else gets restricted, filtered access. AWS Network Firewall handles this with <strong>rule group priority and strict ordering</strong>, not with a single flat rule set.</p><p><strong>Rule group 1 — full access for trusted hosts (evaluated first):</strong></p><pre>PASS IP 10.0.1.50/32 any -&gt; any any (msg:&quot;Full internet access - whitelisted host&quot;; sid:1; rev:1;)</pre><p><strong>Rule group 2 — domain allow-list and category blocking for everyone else:</strong></p><ul><li>Domain-list rule type, matching the TLS SNI field or HTTP Host header — this works <em>without decrypting traffic</em>, since the SNI is sent in cleartext during the TLS handshake even over HTTPS</li><li>Explicit allows for required domains (e.g., .github.com, .ubuntu.com, .microsoft.com)</li><li>Category-based blocks (Social Networking, File Sharing/Streaming, Gambling) using AWS Network Firewall’s web-category filtering, which requires <strong>TLS inspection</strong> to be enabled for full URL-path visibility</li></ul><p><strong>Firewall policy configuration:</strong></p><ul><li>Rule evaluation order: <strong>Strict order</strong> — this makes priority meaningful; without it, AWS evaluates rules by an internal default order that won’t guarantee the whitelist takes precedence</li><li>Default stateful action: <strong>Drop established</strong> — lets the initial TCP/TLS handshake through so SNI matching can occur, then silently drops the session if nothing matched. This produces a clean, predictable failure mode: a blocked connection times out at the TLS ClientHello stage rather than being actively reset, which is exactly the behavior to expect and validate for in testing</li></ul><p>One honest caveat worth stating plainly, because it changes what a customer should expect from this design:</p><blockquote><strong><em>AWS Network Firewall provides stateful network inspection and domain/FQDN-based filtering — but it is not a substitute for a dedicated Secure Web Gateway or URL-filtering product when the requirement is broad, granular internet category classification.</em></strong><em> Network Firewall’s category filtering covers common categories well, but it doesn’t carry the continuously-updated, fine-grained URL reputation database that a purpose-built SWG product maintains. If a customer’s compliance requirement demands that level of granularity, plan for a complementary SWG rather than treating Network Firewall as a full replacement.</em></blockquote><h3>Hybrid Connectivity: VPN, PAM, and Symmetric Return Routing</h3><p>Office users, a PAM jump host, Active Directory, and a SOC server all need reachability into the private subnets over a Site-to-Site VPN. A few points that are easy to underspecify and expensive to fix after the fact:</p><ul><li><strong>VGW vs. TGW</strong> — for a single VPC, a Virtual Private Gateway is the right, simpler choice. Transit Gateway earns its complexity when multiple VPCs need shared hub-and-spoke routing; don’t reach for it prematurely.</li><li><strong>Route propagation</strong> — rather than hand-writing static routes for every on-premises CIDR, enable route propagation from the VGW onto the workload subnet’s route table. The on-premises CIDR block(s) then populate automatically once the tunnel is established.</li><li><strong>Confirm CIDRs and ports before writing security group rules</strong> — “PAM to EC2 private subnets” isn’t precise enough for least-privilege design. Nail down the exact on-premises CIDR ranges, the specific ports each integration needs (LDAP/389, LDAPS/636, and Kerberos/88 and DNS/53 for Active Directory; whatever port the PAM proxy and SOC agent use), and scope security group rules to those ports and the narrowest possible source — ideally specific host IPs or security groups, not a blanket subnet CIDR.</li><li><strong>Redundant tunnels, dynamic routing</strong> — every AWS Site-to-Site VPN connection provisions two tunnels for redundancy by default. Confirm the on-premises side is actually configured to use both, and prefer BGP (dynamic routing) over static routes so failover between tunnels happens automatically rather than requiring manual intervention during an outage.</li></ul><h3>Validating the Setup</h3><p>Configuration without validation is a plan, not a working system. From an EC2 instance with no public IP (accessed via Systems Manager Session Manager, itself reached through private VPC interface endpoints so it never depends on the firewall’s own allow-list):</p><p>bash</p><pre># Expect: TLS handshake completes, HTTP response received<br>curl -v --max-time 10 https://www.google.com</pre><pre># Expect: ClientHello sent, then silent timeout — no server response<br>curl -v --max-time 10 <a href="https://www.bing.com/">https://www.bing.com</a></pre><p>A clean pass looks like a completed TLS 1.3 handshake and a real HTTP response for the allowed domain, and a connection that hangs at the ClientHello stage before timing out for anything not on the allow-list — consistent with the “drop established” default action described earlier. Enable Flow and Alert logging on the stateful rule group to CloudWatch Logs (or S3 for longer retention) so every allow and drop decision is captured with the matching rule and SNI/domain — this is the evidence a compliance or SOC team will actually want to see, not just “it worked when I tested it.”</p><h3>Common Pitfalls, Summarized</h3><p>PitfallWhy it breaks thingsFixFirewall endpoint shares a subnet with workloadsRoute table can’t send traffic both <em>to</em> and <em>through</em> the same subnetDedicate a firewall-only subnet per AZWorkload route table points straight to NATBypasses the firewall entirely — silentlyWorkload 0.0.0.0/0 must target the firewall endpoint, never NAT directlyMissing return-path route on NAT&#39;s subnetBreaks stateful session tracking (asymmetric routing)Add an explicit route for the workload CIDR back through the firewall endpointSSM/agent traffic routed through a domain-restricted firewall policyManagement traffic gets silently dropped, agent can&#39;t registerUse private VPC interface endpoints (ssm, ssmmessages, ec2messages) so management traffic bypasses the internet path entirelyTreating Network Firewall as a full SWG replacementCategory coverage isn&#39;t as granular as a dedicated URL-filtering productScope expectations correctly; add a complementary SWG if compliance demands itPublic ALB placed <em>behind</em> Network Firewall, chained to a second private ALBExtra latency and cost with no real security gain over inspecting at the IGW boundaryPublic ALB → target groups directly; Network Firewall protects the IGW ingress path; add AWS WAF on the ALB for L7 protection</p><h3>Closing Thought</h3><p>AWS Network Firewall is a genuinely capable tool for exactly the kind of layered, domain-aware, IP-differentiated filtering this scenario calls for — but its guarantees are only as strong as the subnet and routing design underneath it. Get the three-tier separation and symmetric routing right first; the rule groups and policies are the easy part once the plumbing is correct.</p><p><em>This architecture and its validation steps were built and tested against a live AWS environment in ap-south-1 (Mumbai), covering both the initial single-AZ proof-of-concept and the path to a full multi-AZ, hybrid-connected production design.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=294ca9533fe1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“A Complete Guide to Configuring Transactional Replication SQL Server on Windows”]]></title>
            <link>https://medium.com/@neerajchourishiya126/a-complete-guide-to-configuring-transactional-replication-sql-server-on-windows-22973746ad76?source=rss-b012162d0bc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/22973746ad76</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[windows-server]]></category>
            <category><![CDATA[replication]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[transactional-replication]]></category>
            <dc:creator><![CDATA[Neerajchourishiya]]></dc:creator>
            <pubDate>Mon, 11 Aug 2025 13:41:07 GMT</pubDate>
            <atom:updated>2025-08-11T13:41:07.158Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Transactional replication</strong> is used to move data between continuously connected servers easily and administer a replication topology. It is used to replicate changes between two databases.</p><p>In this replication, we will Configure Distribution, Publisher, and Subscription for replication of DB from one machine to another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A8vnR5XZkZVYVIvEz-plLw.png" /></figure><p><strong>Prerequisites</strong>: -</p><p>To complete this Configuration, you need Windows SQL Server, SQL Server Management Studio (SSMS), and a database and DB Table should have columns with Primary Key. (For enhanced security, the sample database or Client database should not be installed by default)</p><p>• Windows Server with MSSQL standard Version Installed.<br>• On-premises Window server with MSSQL standard version Installed.<br>• TCP/IP enabled.<br>• Named pipes Enabled.<br>• This PC name should be the same as server Instance.<br>• Go to Configuration manager of each server and Start SQL server agent and SQL server browser.<br>• The database role should be DB_owner.<br>• Login of server should have sysadmin role.<br>• Start SQL Server Agent<br>• The publisher and distributor share the same instance of SQL Server.</p><p><strong>Step –1</strong>: — Connect to Windows EC2 Instance using RDP (Remote Desktop Protocol) or Putty. Once logged in to the Windows Instance, Click on Start Button and create Windows account for replication.</p><p><strong>Prepare SQL Servers for replication (Publisher, Distributor, Subscriber)<br>Create local Windows account for replication</strong></p><p>Create Windows accounts to run replication agents at the Publisher. You create a separate Windows account on the local server for the following agents:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPVVE0Y9pv-_GAI39xSnWw.png" /></figure><p>1.At the publisher, open <strong>Computer Management</strong> from <strong>Administrative Tools</strong> in <strong>Control Panel</strong>.<br>2. In <strong>System Tools</strong>, expand <strong>Local Users and Groups</strong>.<br>3. Right-click on <strong>Users</strong> and then select New User. <br>4.Enter <strong>repl_snapshot</strong> in the <strong>Username</strong> box, provide the password and other relevant information, and then select Create to create the <strong>repl_snapshot</strong> account:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZIlokv2U_GjQDuhaF0cJQ.png" /></figure><p>5. Repeat the previous step 3 and 4 to create the <strong>repl_logreader, repl_distribution, </strong>and<strong> repl_merge</strong> accounts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qh7RbPkX1LRnqLIkDyVTmQ.png" /></figure><p>6. Select Close after creating repl_snapshot, repl_distriibution, repl_logreader, repl_merge.</p><p><strong>Create local Windows accounts for replication agents at the subscriber</strong></p><p>1. At the subscriber, open <strong>Computer Management</strong> from <strong>Administrative Tools</strong> in <strong>Control Panel</strong>.<br>2. In <strong>System Tools</strong>, expand <strong>Local Users</strong> and <strong>Groups</strong>.<br>3. Right-click <strong>Users</strong> and then select New User.<br>4. Enter <strong>repl_distribution</strong> in the Username box, provide the password and other relevant information, and then select Create to create the <strong>repl_distribution</strong> account.<br>5. Repeat the previous step to create the <strong>repl_merge</strong> account.<br>6. Select <strong>Close</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFPz0GNvnw7TjzvrAjWjnA.png" /></figure><p><strong>Prepare the snapshot folder<br>Create a share for the snapshot folder and assign permissions</strong></p><p>1. In File Explorer, browse to the SQL Server data folder. The default location is<br><strong>C:\Program Files\Microsoft SQL Server\MSSQL.X\MSSQL\Data</strong>.<br>2. Create a new folder named <strong>repldata</strong>.<br>3. Right-click this folder and select <strong>Properties</strong>.<br>a. On the Sharing tab in the repldata Properties dialog box, select <strong>Advanced Sharing</strong>.<br>b. In the Advanced Sharing dialog box, select Share this Folder, and then select <strong>Permissions</strong>.<br>4. In the <strong>Permissions</strong> for <strong>repldata</strong> dialog box, select Add. In the Select User, Computers, Service Account, or Groups box, type the name of the Snapshot Agent account that you created previously, as<br><strong>&lt;Publisher_Machine_Name&gt;\repl_snapshot</strong>. Select Check Names, and then select <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5npwPr2lk_RPHy-px-ei4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aB-_PAfH46PWJcCpxtYsqA.png" /></figure><p>5. Repeat step 4 to add the other two accounts that you created previously:<strong>&lt;Publisher_Machine_Name&gt;\repl_merge and<br>&lt;Publisher_Machine_Name&gt;\repl_distribution</strong>.<br>6. After you add the three accounts, assign the following permissions:<br>o repl_distribution: Read<br>o repl_merge: Read<br>o repl_snapshot: Full Control</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wfEOa9ImJCpp4qxDLGXEA.png" /></figure><p>7. After your share permissions are configured correctly, select <strong>OK</strong> to close the Permissions for <strong>repldata</strong> dialog box. Select <strong>OK</strong> to close the Advanced Sharing dialog box.<br>8. In the <strong>repldata</strong> Properties dialog box, select the Security tab and select Edit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fYhgoas_HR9KEJ5weOqJRw.png" /></figure><p>In the <strong>Permissions</strong> for <strong>repldata</strong> dialog box, select Add. In the Select <strong>Users</strong>, <strong>Computers</strong>, <strong>Service</strong> <strong>Accounts</strong>, or <strong>Groups</strong> box, type the name of the Snapshot Agent account that you created previously, as <strong>&lt;Publisher_Machine_Name&gt;\repl_snapshot</strong>. Select Check Names, and then select <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovqmE2VytuQzoMmqCLpqKw.png" /></figure><p>9. Repeat the previous step to add permissions for the Distribution Agent as<br><strong>&lt;Publisher_Machine_Name&gt;\repl_distribution</strong>, and for the Merge Agent as<br><strong>&lt;Publisher_Machine_Name&gt;\repl_merge</strong>.<br>10. Verify that the following permissions are allowed:<br>o repl_distribution: Read<br>o repl_merge: Read<br>o repl_snapshot: Full Control</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzWoT6CeadRExP0RJ7fWSQ.png" /></figure><p><strong>Configure Distribution at the Publisher</strong></p><p>1. Connect to the publisher in SQL Server Management Studio, and then expand the server node.<br>2. Right-click the <strong>Replication</strong> folder and select <strong>Configure</strong> <strong>Distribution</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwdF49vKd4bVEd9Yl1EPeA.png" /></figure><p>The distribution Configuration wizard Starts to configure distribution.<br>On the Distributor page, select &lt;’ServerName’&gt; will act as its own Distributor; SQL Server will create a distribution database and log. Then select <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N78MyAZW1XDIYsS40YdV7A.png" /></figure><p>If the SQL Server Agent is not running, on the SQL Server Agent Start page, select <strong>Yes</strong>, configure the SQL Server Agent service to start automatically. Select <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-cnfpNcWqOMoOS0ZCmgPw.png" /></figure><p>Enter the path <strong>\\&lt;Publisher_Machine_Name&gt;\repldata</strong> in the <strong>Snapshot</strong> folder box, and then select <strong>Next</strong>. This path should match what you saw previously under Network Path for your repldata properties folder after configuring your share properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhP6LOJh2rhsQTBF5cFPfA.png" /></figure><p>Accept the default values on the remaining pages of the wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MWemP9z4pGZwJ2RDIboEQ.png" /></figure><p>Select <strong>Finish</strong> to enable distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8plKJv3GMD1u4cp-gK93HA.png" /></figure><p>You might see the following error when configuring the distributor. It’s an indication that the account that was used to start the SQL Server Agent account is not an administrator on the system. You’ll either need to start the SQL Server Agent manually, grant those permissions to the existing account, or modify which account the SQL Server Agent is using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIUqQiRPcYW5mJ9Yzcbd7A.png" /></figure><p>If your SQL Server Management Studio instance is running with administrative rights, you can start the SQL Agent manually from within SSMS.</p><p><strong>Set Database permissions: -<br></strong>In SQL Server Management Studio, expand <strong>Security</strong>, right-click <strong>Logins</strong>, and then select <strong>New Login</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MMAEfmUM0O5upnzNjhL1wA.png" /></figure><p>On the <strong>General</strong> page, select <strong>Search</strong>. Enter <strong>&lt;Publisher_Machine_Name&gt;\repl_snapshot</strong> in the Enter the object name to select box, select Check Names, and then select <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FkAf0M65k6b-B0VrdYIxeA.png" /></figure><p>On the <strong>User Mapping</strong> page, in the <strong>Users</strong> mapped to this <strong>login</strong> list, select both the distribution and “neeraj” database. In the database role membership list, select the <strong>db_owner</strong> role for the login for both databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8uYY469HYkiseJhSK9rwQ.png" /></figure><p>Select <strong>OK</strong> to create the login.</p><p>Repeat steps 1–4 to create a login for the other local accounts (<strong>repl_distribution, repl_logreader, and repl_merge</strong>). These logins must also be mapped to users who are members of the <strong>db_owner</strong> fixed database role in the distribution and “<strong>neeraj</strong>” database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdMkU2ZhpAcH0auibN-ADg.png" /></figure><p><strong>Configure the Publisher for Transactional replication<br>Create a Publication<br></strong>1. Connect to the publisher in SQL Server Management Studio, and then expand the <strong>server node</strong>.<br>2. Right-click <strong>SQL Server Agent</strong> and select <strong>Start</strong>. The SQL Server Agent should be running before you create the publication. If this step does not start your agent, you’ll need to do so manually from SQL Server Configuration Manager.<br>3. Expand the <strong>Replication</strong> folder, right-click the <strong>Local Publications</strong> folder, and select <strong>New Publication</strong>. This step starts the New Publication Wizard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vpLwqK5UE-9VOPpCDQ-_CA.png" /></figure><p>4. On the <strong>Publication</strong> Database page, select <strong>database</strong> to replicate, and then select <strong>Next</strong>.<br>5. On the <strong>Publication</strong> Type page, select <strong>Transactional publication</strong>, and then select <strong>Next</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bef0lOVnEabT4mLRtUM_FQ.png" /></figure><p>On the <strong>Articles</strong> page, Select the Tables you want to replicate in another server . Select <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laR3bP0E9MSH2vkZwVtxEg.png" /></figure><p>Select the Create a snapshot immediately and keep the snapshot available to initialize subscriptions check box, and select <strong>Next</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TesnEUorcRZ5MjluOkGsjg.png" /></figure><p>On the <strong>Agent Security</strong> page, clear the Use the security settings from the Snapshot Agent check box. Select Security Settings for the Snapshot Agent. Enter <strong>&lt;Publisher_Machine_Name&gt;\repl_snapshot</strong> in the Process account box, supply the password for this account, and then select <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtsZxs-jMqJiRRHh06UkFA.png" /></figure><p>Repeat the previous step to set <strong>&lt;Publisher_Machine_Name&gt;\repl_logreader</strong> as the process account for the <strong>Log Reader</strong> Agent. Then select <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*moIj-3TFggS1v4ZYFACvcg.png" /></figure><p>On the Complete the Wizard page, type “<strong>Sample-publication</strong>” in the Publication name box, and select <strong>Finish</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KuhHG6BSilprIbkeEQA_zA.png" /></figure><p>After the publication is created, select <strong>Close</strong> to complete the wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UVTCfnXBOGN73oFKyw8dvQ.png" /></figure><p><strong>Add the Distribution Agent login to the PAL</strong></p><ol><li>Connect to the publisher in SQL Server Management Studio, expand the <strong>server node,</strong> and then expand the <strong>Replication</strong> folder.<br>2. In the <strong>Local Publications</strong> folder, right-click <strong>Sample-Publication</strong>, and then select <strong>Properties</strong>. The Publication Properties dialog box appears.<br>a. Select the Publication Access List page and select <strong>Add</strong>.<br>b. In the Add Publication Access dialog box, select<br><strong>&lt;Publisher_Machine_Name&gt;\repl_distribution</strong>, and select <strong>OK</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I7bzQTAmJCIrCamOy1IVTQ.png" /></figure><p><strong>Create a Subscription to the Transactional Replication<br></strong>1. Connect to the publisher in SQL Server Management Studio, expand the <strong>server node</strong>, and then expand the <strong>Replication</strong> folder.<br>2. In the <strong>Local Publications</strong> folder, right-click the Sample-Publication, and then select <strong>New Subscriptions</strong>. The New Subscription Wizard starts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cg0jCRiiHbeLnd_3KIcwFw.png" /></figure><p>3. On the <strong>Publication</strong> page, select <strong>Sample-Publication</strong>, and then select <strong>Next</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TINuHsFivbLeIn5rsRDjzQ.png" /></figure><p>On the Distribution Agent Location page, select Run all agents at the Distributor (Push subscriptions), and then select <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4CKjBdLWRTreu0i_qvWUsQ.png" /></figure><p>On the <strong>Subscribers</strong> page, if the name of the subscriber instance is not displayed, select <strong>Add Subscriber</strong>, and then select <strong>Add SQL Server Subscriber</strong> from the drop-down list. This step opens the Connect to Server dialog box. Enter the subscriber instance name and then select <strong>Connect</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MEUuvYRRbFnc0CzMm3fR8A.png" /></figure><p>After the subscriber has been added, select the check box next to the instance name of your subscriber. Then select New Database under Subscription Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WHpguElsL3ncsa_r1za0Jw.png" /></figure><p>The New Database dialog box appears. Enter Replication in the Database name box, select <strong>OK</strong>, and then select <strong>Next</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7tUY3-AqkjxEuR4uX74g3g.png" /></figure><p>On the Distribution Agent Security page, select the ellipsis (…) button. Enter <strong>&lt;Publisher_Machine_Name&gt;\repl_distribution</strong> in the Process account box, enter the password for this account, select <strong>OK</strong>, and then select <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Q5aHdrrU_z8kyfqQWoyUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BnTaLrulZJN39Z01MYgB6Q.png" /></figure><p>Select <strong>Finish</strong> to accept the default values on the remaining pages and complete the wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otAnfi4DSfRr5R1rxgxZag.png" /></figure><p><strong>Set database permissions at the subscriber</strong></p><p>11. Connect to the subscriber in SQL Server Management Studio. Expand <strong>Security</strong>, right-click <strong>Logins</strong>, and then select <strong>New Login</strong>.<br>a. On the <strong>General</strong> page, under <strong>Login</strong> Name, select <strong>Search</strong> and add the login for <strong>&lt;Subscriber_Machine_Name&gt;\repl_distribution</strong>.<br>b. On the <strong>User Mappings</strong> page, grant the login <strong>db_owner</strong> membership for the Replication database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQ6HVG1oDFvgYEQauOU4Mw.png" /></figure><p>Select <strong>OK</strong> to close the New Login dialog box.</p><p><strong>Note: — The Transactional Replication process has been done, now, check the database that is in Publication part should reflect in the Subscriber. Check and if it is showing any error, then, refer to the troubleshoot transactional replication Document.</strong></p><blockquote><strong>Thank You for reading the blog, I hope this guide helps you set up replication successfully.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22973746ad76" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>