{"id":29976,"date":"2017-03-30T07:15:40","date_gmt":"2017-03-30T14:15:40","guid":{"rendered":"https:\/\/virtual-dba.com\/?p=29976"},"modified":"2021-02-10T18:11:26","modified_gmt":"2021-02-11T01:11:26","slug":"replicating-indexed-views-as-tables","status":"publish","type":"post","link":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/","title":{"rendered":"SQL Server: Replicating Indexed Views as Tables"},"content":{"rendered":"<p>Replicating Indexed Views as tables, instead of replicating all base tables and then creating an indexed view against those base tables, allows for a smaller subset of data to be replicated over. If you replicate base tables and then create an indexed view, replication performance decreases. This is due to data needing to be inserted\\updated\\deleted on the indexed view, and replication performance will decrease to IO bottleneck. If base tables are replicated over, you should create a regular index instead of an Indexed View.<\/p>\n<p><strong>Assumption:<\/strong> The distribution database is set up, and you know how to create a publication\\subscription.<\/p>\n<p><span style=\"color: #000000;\"><strong>Limitation of Indexed views:<\/strong><\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Names must be in a two-part format, and an object cannot reference itself.<\/span><\/li>\n<li><span style=\"color: #000000;\">You cannot schema bind a view with a three-part name since it is invalid for schema binding (&#8216;DBName.dbo.tablename&#8217;). In other words, you can\u2019t reference a table in a database other than the indexed view was created in.<\/span><\/li>\n<li><span style=\"color: #000000;\">You cannot create an indexed view without the keyword \u201cWITH SCHEMABINDING.\u201d However, you can create a regular view that has three-part names, but the view has to be an \u201cINDEXED VIEW\u201d for replication.<\/span><\/li>\n<li><span style=\"color: #000000;\">As a best practice, try and avoid conditional joins. It can slow down performance due to bottlenecks in IO.<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>Setting up the prerequisites:<\/strong><\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Create an \u201cINDEXED VIEW\u201d while making sure the view has \u201cWITH SCHEMABINDING\u201d and a \u201cUNIQUE CLUSTERED INDEX\u201d created for it.<\/span>\n<ul>\n<li><span style=\"color: #000000;\">Since the view is created as \u201cWITH SCHEMABINDING,\u201d no modifications can be done to the underlying column(s) in the table(s) associated <\/span>to<span style=\"color: #000000;\"> the view.<\/span><\/li>\n<li><span style=\"color: #000000;\">The view itself cannot be altered since it is used as an article in a publication.<\/span><\/li>\n<li><span style=\"color: #000000;\">Columns can be added to the underlying table(s), but the column itself cannot be altered unless that view is deleted.<\/span><\/li>\n<li><span style=\"color: #000000;\">To modify a view that is being used as an article in a publication:<\/span>\n<ul>\n<li><span style=\"color: #000000;\">First, delete the publication and subscription.<\/span><\/li>\n<li><span style=\"color: #000000;\">Delete the view.<\/span><\/li>\n<li><span style=\"color: #000000;\">Modify the column.<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"color: #000000;\">Recreate the indexed view.<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"color: #000000;\">Create one publisher restricted to only replicating that one Indexed View. You can add other articles to that publication. You do not want to add other tables or Indexed Views to this publication since it has to be deleted\\recreated in order to add\\delete\\change columns to the view. A new snapshot will be created; you do not want to do that for all articles within the publication. Plus, you have to make modifications to the script before you can run it, otherwise, you will encounter the error, \u201cUnable to replicate a view or function because the referenced objects or columns are not present on the Subscriber.\u201d<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>Steps to Replicating Indexed Views as Tables<\/strong><\/span><br \/>\n<span style=\"color: #000000;\"> These steps can be followed to create the first publication\\subscription and add a new column to the indexed view. If you delete the publication\\subscriber and then delete rows from the original table(s), that is part of the view.<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Caution:<\/strong><\/span> <span style=\"color: #333333;\"><span style=\"color: #000000;\">On the subscriber, you cannot add extra columns to the table that is part of replication. Replication will fail and error out until you remove those new columns. However, you can create different or new Indexes on the table that do not exist on the publisher. If you kick off a reinitialize, all Indexes that were created against that table on the subscriber will have to be recreated manually if pre_creation_cmd has been set to drop which is the default. However, if you run the Snapshot Agent (as described below) the indexes you created on tables will not get dropped.<\/span><\/span><\/p>\n<ol>\n<li><span style=\"color: #000000;\">Start the <strong>View Snapshot Agent Status<\/strong><\/span><\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\"><span style=\"color: #000000;\">a. This step creates a new snapshot and pushes all changes to the subscriber. This will eliminate the need to delete the table, view, SP, etc. on the subscriber first after making a change.<\/span><br \/>\n<span style=\"color: #000000;\">b. OpenSQL Server Management Studio.<\/span><br \/>\n<span style=\"color: #000000;\">c. Right-click Replication, and then choose Launch Replication Monitor.<\/span><br \/>\n<span style=\"color: #000000;\">d. In Replication Monitor, expand My Publishers, expand the server, and then select the publication.<\/span><br \/>\n<span style=\"color: #000000;\">e. In the right pane, select the Agents tab to view the status of the Snapshot Agent.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">2. Connect to the Publisher in Microsoft SQL Server Management Studio, and then expand the server node.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">3. Expand the Replication folder, and then right-click the Local Publications folder.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">4. Click New Publication.&nbsp;<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">5. Using the Wizard, create the new publication but do not run it. You want it to be scripted out to a file so you can make changes to it.&nbsp;<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">6. Open the script.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">7. Make these modifications before running:<\/span><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #008000;\">&#8211;search for job_login and job_password. It is recommended that you use a domain account. When scripting out the code, the password is NEVER included. You must add that in with ticks around it, i.e. N&#8217;CorrectPassword&#8217;.<\/span><br \/>\n<span style=\"background-color: yellow;\"><span style=\"color: #000000;\">@job_login<\/span> = <span style=\"color: #ff0000;\">N&#8217;Domain\\ID&#8217;<\/span>,<\/span><br \/>\n<span style=\"background-color: yellow;\"><span style=\"color: #000000;\">@job_password<\/span> = null<\/span><br \/>\n<span style=\"color: #008000;\">&#8211;Adding the transactional articles<\/span><br \/>\n<span style=\"color: #008000;\">&#8211;change this to logbased<\/span><br \/>\n<span style=\"color: #000000;\">@type = <span style=\"background-color: yellow;\"><span style=\"color: #ff0000;\">N&#8217;indexed view logbased&#8217;<\/span>,<\/span><br \/>\n<span style=\"color: #008000;\">&#8211;Destination table can be a different name other than the view name.<\/span><br \/>\n<span style=\"color: #000000;\">@destination_table = <span style=\"background-color: yellow;\"><span style=\"color: #ff0000;\">N&#8217;IndexedViewName&#8217; or &#8216;NewTableName&#8217;<\/span>,<\/span><\/span><\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">8. After making the necessary modifications, run it. If it errors out, fix the error(s), but delete the publication before re-running it.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">9. Create the subscription.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">10. Once everything is created and running correctly, script out the creation of the publisher (this will also script out the subscription) and keep it somewhere\u2013or just remember to script it out if you need to drop and\/or recreate it.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">11. To make changes to the Indexed View (adding or removing columns), do the following:<\/span><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #000000;\">a. Script out the publisher\\subscriber (or open the script you created in step 6 as long as you know nothing has been modified since you scripted it out). If you re-script it out, make sure to add the password for @job_password (do a search and fix).<br \/>\nb. You should comment out <span style=\"color: #ff0000;\">exec sp_replicationdboption @dbname<\/span> (first execute statement) since the database was already set to allow replication. This is not required; it will just tell you it was already set to \u201cTrue\u201d.<br \/>\nc. You should comment out <span style=\"color: #ff0000;\">exec DBName.sys.sp_addlogreader_agent<\/span> (second execute statement) since that agent was already created the first time you created the publisher. If this is not done, it will error that the agent is already created. Not a big deal if you do not comment it out, just realize you will receive an error because it existed.<br \/>\nd. Drop the subscription (you want SQL to drop the subscription from the destination server) and then the publication for the indexed view only. Make sure the subscription is deleted on the destination server.<br \/>\ne. Script out the clustered index first, then script out the view and alter it. When you modify the view, the clustered index is deleted and it has to exist in order to recreate the publisher. Re-run the script to alter the view and run the script to recreate the clustered index.<br \/>\nf. Run the script to recreate the publisher\\subscriber.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">12. You do not need to drop the table on the subscriber. Just push the new changes to the subscriber.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #000000;\">13. Right click the Publication and click &#8220;<strong>View Snapshot Agent Status<\/strong>&#8220;. <\/span><\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-30007\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/View-Snapshot-Agent-Status-286x300.jpeg\" alt=\"view-snapshot-agent-status\" width=\"286\" height=\"300\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/View-Snapshot-Agent-Status-286x300.jpeg 286w, https:\/\/virtual-dba.com\/wp-content\/uploads\/View-Snapshot-Agent-Status.jpeg 331w\" sizes=\"(max-width: 286px) 100vw, 286px\" \/><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #000000;\">a. Click Start and just note the window will show this new article is now synced.<\/span><br \/>\n<span style=\"color: #000000;\">b. The new articles will be synced to the subscriber.<\/span><br \/>\n<span style=\"color: #000000;\">c. Refresh the table on the subscriber and the columns and data will be there.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Replicating Indexed Views as tables, instead of replicating all base tables and then creating an indexed view against those base tables, allows for a smaller subset of data to be replicated over. If you replicate base tables and then create an indexed view, replication performance decreases. This is due to data needing to be inserted\\updated\\deleted [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":30254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","content-type":"","footnotes":""},"categories":[4166,55],"tags":[4145],"class_list":["post-29976","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-sql-server","tag-sql-server-replication"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.1.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server: Replicating Indexed Views as Tables<\/title>\n<meta name=\"description\" content=\"Replicating Indexed Views as tables as opposed to replicating all base tables allows for a smaller subset of data to be replicated over. Here&#039;s how!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server: Replicating Indexed Views as Tables\" \/>\n<meta property=\"og:description\" content=\"Replicating Indexed Views as tables as opposed to replicating all base tables allows for a smaller subset of data to be replicated over. Here&#039;s how!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-30T14:15:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-11T01:11:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/virtual-dba.com\/media\/sql-server-replicating-indexed-views-tables-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"557\" \/>\n\t<meta property=\"og:image:height\" content=\"291\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"XTIVIA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:site\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"XTIVIA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\"},\"author\":{\"name\":\"XTIVIA\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\"},\"headline\":\"SQL Server: Replicating Indexed Views as Tables\",\"datePublished\":\"2017-03-30T14:15:40+00:00\",\"dateModified\":\"2021-02-11T01:11:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\"},\"wordCount\":1218,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg\",\"keywords\":[\"sql server replication\"],\"articleSection\":[\"Blog\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\",\"url\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\",\"name\":\"SQL Server: Replicating Indexed Views as Tables\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg\",\"datePublished\":\"2017-03-30T14:15:40+00:00\",\"dateModified\":\"2021-02-11T01:11:26+00:00\",\"description\":\"Replicating Indexed Views as tables as opposed to replicating all base tables allows for a smaller subset of data to be replicated over. Here's how!\",\"breadcrumb\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg\",\"width\":557,\"height\":291,\"caption\":\"sql-server-replicating-indexed-views-tables\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtual-dba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server: Replicating Indexed Views as Tables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtual-dba.com\/#website\",\"url\":\"https:\/\/virtual-dba.com\/\",\"name\":\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\",\"description\":\"Remote Database Administration\",\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtual-dba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/virtual-dba.com\/#organization\",\"name\":\"Virtual-DBA: Remote DBA | Remote Database Administration\",\"alternateName\":\"Virtual-DBA powered by XTIVIA\",\"url\":\"https:\/\/virtual-dba.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"width\":557,\"height\":291,\"caption\":\"Virtual-DBA: Remote DBA | Remote Database Administration\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/virtual_dba\",\"https:\/\/www.linkedin.com\/showcase\/36220649\/\",\"https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg\"],\"description\":\"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.\",\"email\":\"info@xtivia.com\",\"telephone\":\"8886853101\",\"legalName\":\"XTIVIA, Inc\",\"foundingDate\":\"1992-05-01\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"201\",\"maxValue\":\"500\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\",\"name\":\"XTIVIA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"caption\":\"XTIVIA\"},\"url\":\"https:\/\/virtual-dba.com\/author\/xtivia\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server: Replicating Indexed Views as Tables","description":"Replicating Indexed Views as tables as opposed to replicating all base tables allows for a smaller subset of data to be replicated over. Here's how!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server: Replicating Indexed Views as Tables","og_description":"Replicating Indexed Views as tables as opposed to replicating all base tables allows for a smaller subset of data to be replicated over. Here's how!","og_url":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/","og_site_name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","article_published_time":"2017-03-30T14:15:40+00:00","article_modified_time":"2021-02-11T01:11:26+00:00","og_image":[{"width":557,"height":291,"url":"https:\/\/virtual-dba.com\/media\/sql-server-replicating-indexed-views-tables-1.jpg","type":"image\/jpeg"}],"author":"XTIVIA","twitter_card":"summary_large_image","twitter_creator":"@virtual_dba","twitter_site":"@virtual_dba","twitter_misc":{"Written by":"XTIVIA","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#article","isPartOf":{"@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/"},"author":{"name":"XTIVIA","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1"},"headline":"SQL Server: Replicating Indexed Views as Tables","datePublished":"2017-03-30T14:15:40+00:00","dateModified":"2021-02-11T01:11:26+00:00","mainEntityOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/"},"wordCount":1218,"commentCount":0,"publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg","keywords":["sql server replication"],"articleSection":["Blog","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/","url":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/","name":"SQL Server: Replicating Indexed Views as Tables","isPartOf":{"@id":"https:\/\/virtual-dba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg","datePublished":"2017-03-30T14:15:40+00:00","dateModified":"2021-02-11T01:11:26+00:00","description":"Replicating Indexed Views as tables as opposed to replicating all base tables allows for a smaller subset of data to be replicated over. Here's how!","breadcrumb":{"@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#primaryimage","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/sql-server-replicating-indexed-views-tables-1.jpg","width":557,"height":291,"caption":"sql-server-replicating-indexed-views-tables"},{"@type":"BreadcrumbList","@id":"https:\/\/virtual-dba.com\/blog\/replicating-indexed-views-as-tables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtual-dba.com\/"},{"@type":"ListItem","position":2,"name":"SQL Server: Replicating Indexed Views as Tables"}]},{"@type":"WebSite","@id":"https:\/\/virtual-dba.com\/#website","url":"https:\/\/virtual-dba.com\/","name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","description":"Remote Database Administration","publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtual-dba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/virtual-dba.com\/#organization","name":"Virtual-DBA: Remote DBA | Remote Database Administration","alternateName":"Virtual-DBA powered by XTIVIA","url":"https:\/\/virtual-dba.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","width":557,"height":291,"caption":"Virtual-DBA: Remote DBA | Remote Database Administration"},"image":{"@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/virtual_dba","https:\/\/www.linkedin.com\/showcase\/36220649\/","https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg"],"description":"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.","email":"info@xtivia.com","telephone":"8886853101","legalName":"XTIVIA, Inc","foundingDate":"1992-05-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"201","maxValue":"500"}},{"@type":"Person","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1","name":"XTIVIA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","caption":"XTIVIA"},"url":"https:\/\/virtual-dba.com\/author\/xtivia\/"}]}},"_links":{"self":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/29976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/comments?post=29976"}],"version-history":[{"count":0,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/29976\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media\/30254"}],"wp:attachment":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media?parent=29976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/categories?post=29976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/tags?post=29976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}