Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Saturday, February 25, 2012

articles default

hi all, I was trying to set the articles to "delete data in the existing table that matches the row filter" in the publications "article>articles>table articles>snapshot" of the publication but everytime i reopen that property tab the publication restore to the default setting of 
"drop exisiting table and recreate it" 
i"m using sql server 2000. snapshot replication
-- thanks, joey
You can make use of dynamic snapshot to filter out the data.

articles about data access using System.Data.SqlClient namespace?

Aaarrgghhhhhhh, still searchin' for a nice step-by-step article to learn data access (all insert delete update commands) with the SQL Server .NET Data Provider found in [System.Data.SqlClient] namespace...

Can anyone plz help me to find it?these might help?
http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/ADOPlusOverview.aspx
http://www.stylusinc.net/technology/microsoft/ado.shtml
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlConnectionClassTopic.asp?frame=true
http://msdn.microsoft.com/data/downloads/samples/default.aspx

Also
Check out the Data Access Application Block for .NET, it creates a wrapper around SqlClient class for somewhat easier use.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp

Friday, February 24, 2012

Article by Article

Is it good to maintain article by article in different
subscription?
The purpose for my action is to add and delete article
without affecting the other subscriptions?
Jesse,
sometimes I use sp_addsubscription to subscribe on a per article basis, but
I find this method not transparent enough from the maintenance point of
view. If you can drop articles without damaging the publication, then I
assume the articles are not related, so my 2ps worth is that it would be
easier to maintain if they were in different publications and then you can
drop the subscription if necessary.
Regards,
Paul Ibison

Article - delete all data property

Hi There

I think this is a pretty straight forward question , just want confirmation.
I am using snapshot replication to a subscriber, it is essentially a re-publisher, these same tables are replicated from the subcriber to another.

If i select the delete all data option on the snapshot articles will it truncate the table or delete all data , i am sure it is delete as it says so but i need to be 100% sure that it does not truncate, as the truncate command is not allowed on tables that are published for replication , as the ones on the re-publisher are.

ThanxOk i have subsequently found out it does truncate.

So i have a problem.

Server A has transactional replication to Server B.

I want to setup snapshot replication from Server C to Server A, some of the articles involved are also replicated from Server A to Server B.

So essentially i want it to snapshot new data from Server C to Server A, it must delete all data present , thereby the articles involved in transactional replication from Server A to Server B must be cleaned out and replicated with new data accordingly.

Hope this makes sense, and i really hope it is possible !

Thanx|||Ok it hink i have figured it out, i have choosen the article property to delete all data matching filtered rows, but i do not filter rows , so presume it simply does not have a where clause but it performs a delete obviously not a truncate.

If some one can just confirm this is he correct way to go about it i would appreciate it.

Thanx|||I havent tried this, but I would guess, you would be better off starting afresh.
First setup snapshot replication from C-->A.
The setup Tran replication from A-->B with only those articles that you need from A to B.

This would be cleaner and easy to troubleshoot. And since you want new data from A-->B anyways, I dont see any harm in removing replication between A-->B and setting it afresh after A is refreshed from C.|||This needs to be automated, and occur on a regular basis.
Deleting subscriptions and re-setting up is not an option needs to integrate into the entire replication structure, including production. So you suggestions are not an option for me unfortunately.

Thanx|||Hi Sean,

I tried your scenario and it seemed to work fine.

I setup Tran replication between A-->B with some data
Then I setup Snapshot replication C-->A and the article had delete all data matching filter criteria but there was no filter and everything seemed to work fine.

Any changes made at C did seem to propagate to A and then to B. However snapshot had to be run at C since it is a snapshot publication. And I had both push subscriptions from C to A and A to B.

Please do try out and let us know if you encounter any issues.|||Thanx Mahesh

I will be going ahead with this on 1 production environemnt today or tomorrow, will update you on the results.

Thank You