XML Merge

Jul 4, 2007

I have the following structure of 2 XML documents:




Code Snippet

<?xml version="1.0" encoding="UTF-8"?>

<Annonce xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">

<P Num="100" NumP="37" TypeP="NUM">

<E Num="XYZ" Date="22/06/2007" PE="15" >

<S Code="75">

<C Num="24">
<Q N="0" L="1">
</C>

...

</S>

</E>

</P>
</A>



How do I merge these 2 documents using the XML task in SSIS? I think I need to extract to remove the <?xml...> line from the 2nd document, but I'm really not sure what to put in the XPathString property. My documents should be the same except for the <S> tags, which will be different. The other elements should be the same. Any help would be much appreciated. Thanks!

View 1 Replies


ADVERTISEMENT

Merge Repliction - Run Stored Procedure When Merge Agent Starts

Jul 23, 2005

I have database on SQL Server 2000 set up with a merge publication.This publication is configured with a number of dynamic filters toreduce the amount of data sent to each client. Each client has ananonymous pull subscription. The merge process can be triggered by thewindows sync manager and my application.To improve performance I have created some helper tables to hold themapping between user login and primary keys of selected entities.For the replicated data to be correct the contents of the helper tablesneeds to be up to date.I need to fire off a stored procedure on the publisher beforereplication starts to verify that this data is up to date. I can notsee any documented way of doing this however I have been experimentingwith some unorthodox systems.Firstly has anyone any ideas?I have been considering adding a trigger to some of the tables used bythe Microsoft replication code - yes I know this is very nasty.My problems arise because executing this stored procedure will causesome data to be updated. In updating data we could create a newgeneration in the database. I must therefore run my stored procedurebefore any the Microsoft code makes any generation checks / updates.Anyone done anything similar, Anyone have any better ideas?Any comments would be gratefully received.

View 1 Replies View Related

Change A Merge Subscriber To Become A Merge Publisher

Aug 16, 2004

Hi,

I'm using merge replication to maintain a backup copy of my main (publisher)MSDE database. A push subscription periodically (1 per minute) updates the backup DB.
It's intended that if the main db goes down then the backup (subscription) db can be configured as a publisher. This must all be performed via scripting.
The initial configuration of the main publisher and subscription is controlled via scripting, which works fine.
The problems occur when I try to configure the subsciber to become a publisher. A script is executed on the subscriber but fails at the point when it's configuring the publisher detail. The error is something like "unable to configure a publication for a database setup as an anonymous subscription".
I'm guessing that there are subscritpion artifacts added to the database which need to be removed before it can be configured as a new publisher.

Please help,
Jez W

View 1 Replies View Related

MERGE INTO

Dec 13, 2007

Hi,
I came to know that MERGE INTO is not supported in SQL Server 2005. Is there any work around for MEREGE INTO in SQL Server 2005, which does not degrade the performance to much extend. I mean is there any other way we can implement the same stuff.

Thanks in Advance
Jiju Jagadish

View 1 Replies View Related

How To Merge Result In One Row

Nov 28, 2006

Hello,Is there a way to merge the result of a query into one row?For example, let say I want the  a list of name of people of 20 year soldMy result will look like that:   NAME1 john2 Mike3 Craig I would like to have the result in one row:     NAME1   John, Mike, CraigIs there a way to do that?Thanks

View 3 Replies View Related

One Way Merge Replication

Feb 14, 2002

Hi everbody,
I setup the Merge Replication , it is working perfectly. But i have one problem now it is updating both ways. I nedd one way. Any body tell me which parameter i have to change.

Thanks in advance

View 1 Replies View Related

Merge 2 Or More Databases

Jun 20, 2002

...
Hi -
.
I need a way (Thru ASP code) to collect data from multiple database(s)..
Currently I have a 'Orders' table in 3 separate databases, would like to merge All to run a Query page.
.
Thanks - Dave

View 1 Replies View Related

Merge Replication

Aug 12, 2002

Hi,

My production box is running on NT4.0,SP6, SQL Server7.0,SP2. We implemented Merge replication. Working fine last 7 months. Last weekend i disabled replication, Successfully removed Distributor and Publishor. After that try add new fileds but won't allowed me. It's give the error message. I Also found Some Conflict_tables found almost 20 tables. All system Tables. Can delete these these tables, if i delete any problem my database.
I added filelds many times but this time i got errors.

Please help me anybody.

View 6 Replies View Related

Merge Replication

Jul 31, 2000

I have just installed replication on our production server to Merge Replicate with a Laptop server that will travel from time to time. I have now noticed that we cannot add or change any fields or attributes on the tables which are being replicated (which are all tables in the DB). This is a problem because we are changing and adding columns all of the time. Is there a way around this issue like shutting down the replication service or something? I have been unsuccessful in finding a way around this other than removing replication while we make changes.

Thank you in advance for any help!

View 1 Replies View Related

Merge Agent Log

Dec 14, 2000

Does anyone know why i can't see all sessions of past synchronisations
in EM ->Agents->MergeAgents->properties (Filter All Sessions)
I only see the last 2 or 3 and all older ones are deletet.
Are there better possibilities to see what was going on?
Thanx in advance

Gert

View 1 Replies View Related

Merge Replication

Jan 22, 2001

I have implemented a Merger replication on our development server and I get a fillowing error when I try to update one of the table in publisher.
"Transaction cannot start while in firehose mode"

What does this mean.

Thank You,
John

View 1 Replies View Related

Merge Replication

Dec 19, 2000

Hi,
I read some where that replication has two types conflict resolution, 1. row based and 2. Column based...
If I am right...
Can any one point me how to find out this option and how to set it up....

Thanks,

Mohammed.

View 1 Replies View Related

Merge Replication

Sep 16, 1999

Hi all,

I have a merge replication going between 4 servers. The problem is when ever I do some BCP transfer to one of the tables in one of the servers. It puts the data in that table. But that Data does not get replicated to any other server like it should.

Please Advice on what to do. Is there any option I am forgetting to set or something.

Thank you for all your time in advance.
Aziz

View 3 Replies View Related

Merge DTS Packages

Jan 30, 2003

I have 14 DTS packages with same connection name in all of them.

each DTS has atleast 7 transformation task.

Is there anyway I can merge all the DTS packages to one single DTS package?

View 2 Replies View Related

Merge Replication

Sep 12, 2003

I have successfully tried merge replication on single server with 2 databases.
now i want to do the same with different servers,
when i create pull subcription on server 2 which user account should I use?
it is giving log in failure
i tried using windows admin account and also the 'sa' account.

please help me out
thanks

View 1 Replies View Related

Merge Replication (Again)

Feb 23, 2004

Hi All,

I have posted this earlier and I am re-posting it simplifying what I had said.

The scenario is:

I have two sql server database instances with the same database schema and all. However, both of them have different data. I have not set them for replication at all. Now, I want to do merge replication between them such that the data between them could be syncronized.

When I do pull merge subscription I have two choices -
1.Bringing schema and data to subscriber from publisher

2.Not bringing the schema and data from publisher to subscriber.

Obviously, I chose the second choice. But upon syncronizing I dont see any data from publisher coming to subscriber and vice-versa. If I add new data to publisher and do syncronization, I can see ONLY the new data created after the replication setup in subscriber. If I add new data to subscriber and do syncronization then the new data is removed from subscriber and not propagated to publisher.

Is there any way I can make this work??

Niben

View 10 Replies View Related

Merge Replication

Jan 2, 2007

Hi,

I have just set up Merge replication, I have two servers, server A and server B, the merge replication worked successfully but I don't quite sure which databases should or should not replicated? If not, what other methods should I use?

I would really appreciated any comments or advice out there!

-whitebelt

View 14 Replies View Related

Merge Replication

Mar 21, 2002

I had set up merge replication. I got these error messages where replications starts "Column names in each table must be unique. Column name 'PubID' in table 'bonflict_DBName_PHP_Data_Publications' is specified more than once "

PHP_Data_Publications table defind as:

CREATE TABLE [dbo].[PHP_Data_Publications] (
[PHP_Pub_ID] [uniqueidentifier] NOT NULL ,
[PHP_Data_ID] [uniqueidentifier] NOT NULL ,
[PubID] [uniqueidentifier] NOT NULL ,
[UserID] [uniqueidentifier] NOT NULL ,
[Username] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Publication] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Pub_Year] [datetime] NULL ,
[Pub_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[PHP_Data_Publications] WITH NOCHECK ADD
CONSTRAINT [DF__PHP_Data___rowgu__01E91FA0] DEFAULT (newid()) FOR [rowguid]
GO

CREATE UNIQUE INDEX [index_1466488303] ON [dbo].[PHP_Data_Publications]([rowguid]) ON [PRIMARY]
GO


Thanks,

Chanthol

View 3 Replies View Related

Merge Replication ???

Oct 11, 2001

Hi

Is it possible to modify or add new fields in sql 2000 when the instance
became publisher ? I tried it several times but it failed. I access microsoft website but i did not help.

Thanks
Pheckz

View 3 Replies View Related

One Way Merge Replication

Oct 12, 2001

Hi everbody,

Anybody tell me about implementation of oneway merge replication.
Thanks

View 2 Replies View Related

One Way Merge Replication

Feb 5, 2001

Hi everyone

SQL Server BOL says merge replication can be done in only one direction. But my understanding is Merge replication happens in both ways between publisher and subscriber.

How can i allow data movement from only wince sql ce subscribers and not from publisher running sql 2000 and win 2k.

Please reply immediately bcoz i require a solution which has to be implemented very soon.

Thanks in advance

Satheesh

View 1 Replies View Related

Not Sure If This Would Be A Merge Or An Update...

Dec 28, 2004

Hi, I feel like this should be fairly simple but I just can't seem to get it! I basically want to update multiple records using a sub-query.

I have two tables: objects and temp1. Both have identical column names: Un_ID and SerialNum (one has serial numbers while the other has mostly Null values for the serial numbers). I want to update the SerialNum column in "objects" with the SerialNum column from temp1. The two tables can be linked by un_id's.

Here is my update statement:
UPDATE Objects
SET SerialNumber =
(SELECT SerialNumber
FROM temp1)
WHERE (objects.Un_ID = temp1.un_id)
The error I receive says "column prefix "temp1" does not match a table name or alias name used in the query".

I think the step I am missing is actually liking the two tables in the update statement. Can anyone help?

Thanks in advance!!

View 2 Replies View Related

Merge Replication

Jun 29, 2004

hi,
in merge replication,i make a request subscriber with a priority 25.00,when i update the same date,it always choose the update from the publishing server,why????how does it work???
thx inadvance

View 1 Replies View Related

Merge Replication

Oct 5, 2004

I am using merge replication at remote connected via ISDN Dialup line. I got following error and replication fail.


publisher - PRSTGINDSQLIND
agent - PRSTGINDSQLIND-pml-pml-192.168.100.50SQLDWS-4
publication - pml
subsctription - 192.168.100.50SQLDWS:pml
error - The process could not deliver the snapshot to the Subscriber.
Agent Merge replication provider -2147201001
Agent 192.168.100.50sqldws 20037
ODBC 192.168.100.50sqldws


Agent - PRSTGINDSQLIND-pmst-pmst-192.168.100.50SQLDWS-3
error - The subscription to publication 'pmst' is invalid.
last command {call sp_MSgetreplicainfo(?,?,?,?,?,?,?)}


Thanking You

R.Mall

View 2 Replies View Related

Merge Replication Using SQL-DMO

Jan 4, 2005

I am in a process of learning Replication in MSDE, especially Merge Replication

Server runs on MS-XP Professional
--------------------------------------
I have a sample Access project 'ReplTest' which has only table with only 2 columns.
DatabaseName:ReplTestDB
Table Name :TestTable
MSDE Instance Name:SVRMYINSTANCE

Now I would like to know how I can configure this database for merge replication
using SQL-DMO

Laptop runs on MS-XP Professional
--------------------------------------
I have another access project which is running on computer 2 and connected to the
ReplicaTest database.

MSDE Instance Name:LPTMYINSTANCE

My task is, when I am disconnected from server I would like to have a local copy of
the database to work with and then, when reconnected, need synchronization with the
server database and continue working from server database.

How to write this replication process from scratch using SQL-DMO objects in both Server computer
and Laptop computer.

I dont have enterprise manager in both computers since they use only MSDE

Can anyone help me?

Thanks in advance

JP

View 7 Replies View Related

Merge Replication

Jan 18, 2006

Hi,
I have a problem when doing merge replication. I need to have a identity column on both the publisher and subscriber, eg id. When the publisher is down, my app will now reference to the subscriber and insert into the subscriber. However when the publisher is up, the app will reference to publisher and start to insert into the publisher. This will cause conflict in the id. Also, i need the id to be in running order, therefore i cant use range for publisher and subscriber. Anyone have idea how to solve this problem?



Aaron
:(

View 2 Replies View Related

Merge Replication

Mar 7, 2006

Hello,

I am having a problem getting my merge replication to work out. I am wanting to make it where the merge happens on demand. I have tried to run replmerg through cmd prompt and I get the error 'The subscription to publication [namehere] has expired or does not exist.' I have had no problems running the merge agent within Enterprise Manager. I have thought of running windows sync manager but I do not want my people to have to type a password in everytime they need to sync. I am running the whole replication process through FTP. I am in desperate need of help. Anything would be great!

Thanks

View 4 Replies View Related

Merge Two Tables

Mar 22, 2006

Hello, I need your expert help:

I have two tables (ship2005 and ship2006) all with same structure
Sold_to
Week
Year
Units
Dollars
Style

I have to merge them together, and add some other columns from other tables
Custmstr (director) and stylemstr (style) based on Sold_to

In the format so I’m able to see 2005 week, 2006 week, 2005 unit, 2006 unit, 2005 dollars, 2006 dollars and so on.

This one is working, but forever…

where Custmstr.Sold_to *= ship2005.Sold_to
and Custmstr.Sold_to *= ship2006.Sold_To
and stylmstr.style_num *= ship2005.style_number
and stylmstr.style_num *= ship2006.style_number

And another thing: how can I populate the Year column for both?

Thank you very much

View 4 Replies View Related

Merge Replication

Sep 14, 2006

Is it possible to setup a server as both a Publisher and Subscriber of the same database in a Merge Replication setup?

View 2 Replies View Related

How To Merge Records Together

Jul 2, 2014

If I have a table similar to below

ID Field1 Field2 Field3
01 Red
01 Green
01 Blue
02 Blue
02 Yellow
02 Red

How would I merge the records together to appear as below

ID Field1 Field2 Field3
01 Red Green Blue
02 Blue Red Yellow

Note there will never be 2 Field1's populated for the same ID and also there are many columns so ideally I dont want to have to reference field1 field 2 etc.

View 10 Replies View Related

Merge Statement

Dec 28, 2003

Hello,
I have two tables: Orders and Appoitment. Each order can have up to 2 appointments. Now, I need a SELECT statement that gives me this:

ORDER APPT
1 appt1 appt2
2 appt1 appt2

and not this:

ORDER APPT
1 appt1
1 appt2
2 appt1
2 appt2

In other words, I want to merge the two appointments for each order. I tried using the merge statement but it does not work. Tried to google but saw nothing. My database is SQL server. Please help. Thanks

View 3 Replies View Related

Merge Replication

Jan 3, 2004

Hi Everybody

I have a problem with Merge Replication with this error message'The subscription to publication 'GsAdmin' is invalid.'.

Pleaese help me because I don't know what to do.

Thankyou

View 1 Replies View Related

Merge Replication

Mar 30, 2004

Can you merge replicate data from SQL Server 7.0 to SQL Server 2000?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved