.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

automatic adding new article to existing publication

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server


I have two servers with SQL Server 2005 Enterprise Edition. There are several databases on it. I implement snapshot replication (every hour) and everything works fine. But developers are creating new tables, views and etc every day. How i can automaticaly add it (tables, colums, views etc) in existing publication (i need to replicate all data in database). Or i need to use another solution like database mirroring?

Best regards

View Complete Post

More Related Resource Links

Issue while Adding article in existing publication Transactional Replication.


We are facing difficulties adding article to an existing publication.The replication was setup by restoring the backup on subscriber  from publisher and changed the setting Intilialize from Backup =True

Used the following steps but it almost bought down the system.




@publication = N'marcus8rpl',

add new article to existing publication

I have an existing publication with 10 articles configured for Transactional replication. The replication is running fine. Now I wish to add another table (article) to this publication. My requirement is to ensure that I don’t need to generate a snapshot of all the articles being published, if I add a single article only that particular article should be published.

Issue while adding article to existing subscription(Transactional Replication)


We are haing issues while adding article on existing subscription.

The replication is setup with Initialize from backup=true.

Below is the command I tired to use aftet transfering the rows thru export import wizard but the table on the subscriber isnt refreshing.

exec sp_addarticle @publication = N'marcus8rpl' , @article = N'appnames' , @source_owner = N'dbo' , @source_object = N'appnames' , @type = N'logbased' , @description = null , @creation_script = null , @pre_creation_cmd = N'NONE' , @identityrangemanagementoption = N'manual' , @destination_table = N'appnames' , @destination_owner = N'dbo' , @vertical_partition = N'false' , @ins_cmd = N'CALL sp_MSins_dboappnames' , @del_cmd = N'CALL sp_MSdel_dboappnames' , @upd_cmd = N'CALL sp_MSupd_dboappnames'

Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error

So I am using SQL Server 2008 Enterprise Edition (64Bit) and have run into a strange problem that is baffling me. I have two tables that I need to replicate.  They are identical in specification except the name (one is for monthly stats and one daily stats) CREATE TABLE [dbo].[statsDailyLite]( [EntryDate] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsDailyLite] PRIMARY KEY CLUSTERED ( [EntryDate] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO CREATE TABLE [dbo].[statsMonthlyLite]( [EntryMonth] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsMonthlyLite] PRIMARY KEY CLUSTERED ( [EntryMonth] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO They both conatin a thousand or so test rows of data, and they are both in a transactional publication going to another SQL 2008 box. Now when the tables are empty

web.config - adding css friendly adapters to existing website

Hi Forum,  Please help me with the major headache I've wasted hours trying to figure out!  I have done everything explained in the tuturial to add css friendly adaters to an existing site and still no luck.  I am thinking that it has to do with modifying my current web.config file to use the css adapters.  Problem is, I can't find any specific instructions as to what I have to do to the current web.config file to make the site compatible with the css adapters!  I tried to modify the config file based on what on the example, but nothing seems to work.  Any help would be greatly appreciated!  Thanks, D

Adding a footer to a pre-existing row group

Hi, I want to add a group footer to my report which includes the individual provider name for each page. I have already added a parent row group for details relating to each provider without specifying to include a footer to the row group. When I now add a footer using the insert footer path this places the footer below my row grouping, when I then add the provider field to the footer every page returns the first provider in the list. How do I include the footer to the grouping so ever footer relates to the individual provider type in the main body of the report? Thanks James

Adding a full node to an existing XML document on a by xpath specified location

I want to add a complete node to an existing XML document.So:1. get the XML document from the session2. create a new node3. pass the node and the session to a function, that adds the node on the location of the xpath4. return the new session, updated with the node in the specified locationBelow my code, which DOESNT work.I've had some other advices, but nothing seems to work. What am i doing wrong?!?!Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load    Dim doc As XmlDocument = New XmlDocument()    Dim xmldoc As XmlDocument = Session("XML") 'get XMLdocument from session    Dim locationNode As XmlNode = doc.CreateElement("location")    Dim locationAttribute As XmlAttribute = doc.CreateAttribute("id")    locationAttribute.Value = "3"    locationNode.Attributes.Append(locationAttribute)    Dim titleNode As XmlNode = doc.CreateElement("title")    titleNode.AppendChild(doc.CreateTextNode("Empire State Building"))    locationNode.AppendChild(titleNode)    doc.AppendChild(locationNode)    Dim newNode As XmlNode = doc.ImportNode(locationNode, True)    AddOrUpdateNodeInSession(Session, "//root/dat

Issue Adding a new Lookup Field to an existing List Instance

I have a code base that houses all of the column, content types, template, and list instance definitions. Am using the Update functionlaity a lot from version to version. Has been working well to this point. I just added two new columns (fields), one a Lookup and the other a Multi-Lookup. The fields are added fine on the update, columns look correct and the content type to which these were added also look fine. I can create a new List instance from the content type, and the new lookup columns are fine. The problem is this. Any existing list instances that were created from this same content type, now blow up when I try and access list items via the SP GUI. Something about a valid GUID, I dont't have the exect error anymore, but will repost it when I recreate the issue for the tenth time. I tried deleting the new lookup fields from this new list instance, thinking that I might be able to re-add them to fix the problem, but I get a new stack trace when I try and re-add them. Any hints on where I can start digging would be appreciated. I think I'll start with comparing the list instance schemas between an existing list and a newly created one.  

Adding New Column to XSD File Without Remapping existing Transformations

Hello, I am loading XML file using SQL 2005 SSIS and using XSD file for XML Schema defination. Now I have a requirement where I should add couple of new columns in XSD as the XML (MAY) have extra columns for few of its tables. Is it safe to add new columns to XSD and the Map only new columns in Data Flow and all will work? or after I add new columns I need to redesign all mappings as Column order will change. (I think SSIS refere a numeric value for each column, if Yes how can I add new column with less impact)? Thanks, Prabhat Nath

Adding existing user to existing group - Unknown error (0x80005000)


I am getting an unknown error 0x80005000.  Please help!

I am using impersonation of an admin account. Here's what I have in my web.config:

<identity impersonate="true" userName="mydomain\user" password="pwd"/>

<authentication mode="Windows" />


Here's my code:

Private Sub Page_Load(ByVal sender As System.Object, <

Adding .aspx page to existing web site



I have a running ASP.NET web site. There is following problem with one of the forms:

One part of submitted data is added to database after "submit" is clicked. (to "table1")

Another part is lost (not added to "table2", and no files uploaded)

I have no source code of that project.

So, because I cant edit existing page, I came to a decision to add new .aspx page to a running application with same functions as existing one.

How can I do that? Or maybe you can recommend some other solution.

Thanks, Alex. 

Adding triggers to a Merge Replicated published article in SQL Server 2008


Currently running merge replication on SQL Server 2008 10.0.1600 and I have a few questions around the correct procedures for adding and modifying triggers on published articles.  I've searched through the MSDN site and googled this but have not found any definitive information on correct procecdures.

1) When a new trigger is added to a published table do we just have to rerun the snapshot and then re-syncy the subscribers?  Just adding them does not seem to replicate them to subscribers.

2) When an existing trigger is modified should ALTER TRIGGER be used or should the trigger be dropped and then re-added?


Publication without specifying every article


I'm trying to create replication on an Great Plains Dynamics database. It's about 100 GB, however, there are thousands of Stored Procedures, hundreds of tables, views and UDFs. Using the New Publication Wizard, it locks up for about 15 minutes on the "Articles" page and when it does resume, takes a couple hours to create the publication. If I have it generate a script to create the publication, the script files is 27 megabytes large and has 230,000 lines, mostly just sp_addarticle statements.

Trying to create the subscription on a second server runs for about 10 hours and still never finishes. By that time, my nightly window has closed, so I have to stop it. And it hasn't even started inserting the BCP files. The MDF files are the same size as when they're first created.

I think restoring from a BAK file on the subscriber (rather than a snapshot) is the way to go. However, my question is, is it possible to create the initial publication without specifying each individual article it has to add.

The subscribing server will serve as both a disaster recovery and a SSRS database, to get the report queries off our production server. Because of the disaster recovery need, I must attach all tables, all prcos, all views, etc.

Can't I just say something like ADD ALL ARTICLES?

Adding Items to existing list using CAML

Does anyone know how to add list items (not files) to a SharePoint list using CAML?  I know how to do this in code but I was curious if it was possible in CAML. We can add files using the Module element quite easily and so I thought, why not list items?  It is possible to add list items to a new list using the Data element, but I am trying to add items to a list created earlier by another feature.

Adding XML doc template to existing code

Hi Everyone,
    I would like to know if there is any tool that can add XML documentation templates to a source code.  Basically, I want to add XML documents to new source code. The existing source does not have XML documentation for existing classes, so when I add XML documentation to new class, I get compilation error indicating no XML documentation for old classes.  Is there a tool that is available that can parse the source code and then add XML doc templates ?

For example,
If I have the following code:

class TypeByName




Adding Current Windows User to Database Encounters Existing User with Same Login


In VS2008 in debug mode, I am using SMO to programatically change the users and permissions on a database. Windows authentication alone is being used. I need to limit access to a administrators group and the current user for whom the database has been dynamically created during the first run of the application within their current Windows environment on the machine. I have no problems creating and assigning the administrators group, but when I try to create the user using the environment's UserDomainName and UserName variables (which would be my creditals) I encounter an inner exception "The login already has an account under a different user name". Before doing running the app, I manually have checked the local server for user and logins with my credentials and programatically looked at each login but have not found any matching credentials. 

Insights and suggestions appreciated.


Adding Ajax to Existing Running Wbsite


our company holds a dynamic website which is being hosted and config in IIS

now i wanna know is it possible to Add Ajax Controls or Ajax Control Toolkit to my website  or

if i have to make any updations and i want to do it with the help of update panel is it possible i can do with my existing website

let's say adding New Pages (no modifications on prev page's)

i already went through video of joe stagner how to add ajax to an existing project

is there any more changes do i have to make either in my IIS or on my Windows Server 2008 R2 to make the New Pages

Ajax Enabled

Please dont give me any links how to add ajax to an existing project,

as it will be a great help for me i wanna perform this thing exactly live on my production server so chances of any error should not be there

any help regarding this matter will be great help ful



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend