显示标签为“merge”的博文。显示所有博文
显示标签为“merge”的博文。显示所有博文

2012年3月26日星期一

Flat Files having Only Column Names in One file and the Rows in the other

Sorry if this question had already been answered previously. I was unable search the forum on this topic. How will I merge these and then configure the first row as Column names (As this helps to map to the destination column names automatically)

As far as I know, you can't. Why would you? A quick mapping exercise, name the columns etc, it not that much of a job...

You might do it by merging your files using a DOS command. Google merging text files in dos.|||

Hi Crispin,

Thanks for your reply

Unfortunately, We have hundreds of columns for each of the Flat File Sources among 20 in each Package. Naming them will obviously take ages.

Thanks

Subhash Subramanyam

|||I've had the same situation.

If you specify the file with the column names as the source, it'll do it for you. After that, you give it the files with the actual data in. Once columns are named, you do not need to do anything else with it. Unless the column order changes - in which case, you have a problem...

Otherwise, look at merging the files using DOS.

Another option you could try is to use Data Defractor for text files. Might be overkill for text but works non the less...

2012年3月19日星期一

fixing SQL CE Merge replication

Does anyone know of a way to regenerate the system tables that merge
replication uses? A lot of my users are getting blank system tables which
causes native exceptions when I go to sync or reinitialize. The number of
rows that I would stand to lose if I couldn't regenerate these tables is
really unacceptable. On a side note, how are these tables clearing
themselves? Our program doesn't touch any system tables and the db is
password protected to keep users out of it.
Currently, we are creating a new subscription and then inserting the rows
that are in the old database into the new db. The problem with this is that
it takes over an hour per database.
Something is very wrong here. Your merge replication system tables should
have data in them. Especially msmerge_contents, and msmerge_replinfo.
You should call PSS on this one.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Scott Simons" <Scott.Simons.At.MealMagic.Com.Remove.This> wrote in message
news:8D20ADAA-6607-4AEB-A2FE-AF7E2A33DD93@.microsoft.com...
> Does anyone know of a way to regenerate the system tables that merge
> replication uses? A lot of my users are getting blank system tables which
> causes native exceptions when I go to sync or reinitialize. The number of
> rows that I would stand to lose if I couldn't regenerate these tables is
> really unacceptable. On a side note, how are these tables clearing
> themselves? Our program doesn't touch any system tables and the db is
> password protected to keep users out of it.
> Currently, we are creating a new subscription and then inserting the rows
> that are in the old database into the new db. The problem with this is
that
> it takes over an hour per database.

2012年3月9日星期五

fix merge replication?

I had merge replication setup between 2 servers. I then stopped and
removed replication, made some system changes, then setup replication
again.
But, it turns out all of the data from the publisher hadn't made it to
the subscriber before I removed replication.
Is there a command I can use on the publisher that tells it to look at
all tables and make sure the data between the two machines is
correct/identical. I know I can do a sp_mergedummyupdate, but that
requires I look at all tables and issue the command for each row in
question. I want the system to do it so it can get everything. I don't
want to do the reinitialize because that would take quite a while (the
data is about 1 gig over the internet transfer would be a day or so).
Any other suggestions?
TIA
Darin
*** Sent via Developersdex http://www.codecomments.com ***
Darin,
you could drop the subscription, use redgate's datacompare to synchronize
the data then add the subscriber as a nosync one.
Alternatively you could try sp_addtabletocontents.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I don't know if I did this correctly. I have a table on the distributor
that has 99000 records, on the subscriber there are only 98000. I did:
exec sp_addtabletocontents 'GLDistribution'
It sat for a while and then said it was successfull. But, the Enterprise
manager still says there is no data to merge, and the subscriber still
only has 98000 records.
Darin
*** Sent via Developersdex http://www.codecomments.com ***
|||Darin,
I'd use a linked server to join the 2 tables based on guid. Make it a Left
Outer Join so you can find the publisher records not on the subscriber. As
there are only 1000 of these, you could then do a dummy update on each one
(use a cursor, or have query analyser create 1000 proc calls and run the
resulting script).
This still leaves the worrying issue of how the records got there in the
first place without firing the merge triggers. Check for bulk inserts or fast
loads in DTS which are the normal culprits.
Cheers,
Paul Ibison, SQL Server MVP
"Darin" wrote:

> I don't know if I did this correctly. I have a table on the distributor
> that has 99000 records, on the subscriber there are only 98000. I did:
> exec sp_addtabletocontents 'GLDistribution'
> It sat for a while and then said it was successfull. But, the Enterprise
> manager still says there is no data to merge, and the subscriber still
> only has 98000 records.
> Darin
> *** Sent via Developersdex http://www.codecomments.com ***
>

2012年2月26日星期日

First few attempts to synchronize a merge subscribtion fail

Hello everybody!

I have a publisher running SQL 2005 and subscribers running SQL EXPRESS in a merge replication. The subscriptions are pull subscriptions using web synchronization. Every time I do a new release of the database schema on publisher and drop/recreate replication I seem to have a problem.

When a subscriber tries to synchronize first time after this (the datbase on subscriber is dropped/re-create prior to this syncronization) it always results in a error saying something about "unrecognized or invalid response" after sitting there for some time. Several subsequesnt tries give "another job for this subscriber is already running on publisher", and finaly after a few minutes it synchronizes correctly and from this point on everything works perfectly until the next release. This happens with every single subscriber.

As far as I understand, what is happening is that when the merge agent connects to the publisher from the subscriber via web replication the publisher kicks off a job to generate initial dynamic snapshot for this subscriber. This is taking long time. During this time the web request times out, which results in the first error I see. When I try to connect several mre times, the job is still running, which gets me the subsequesnt errors. And finally when creating of the initial dynamic snapshot is finished, I can run the synchronization successfully.

The question is: Is there anything I can do on the publisher in automated manner prior to the first synchroniztion that would help me top resolve this problem? My guess would be that if I run jobs

dyn_PUBLISHER-DATABASE-PUBLICATION-num__SUBSCRIBER_anothernum for each subscriber and wait until they've finished before starting sinchronization from the subscriber, it would solve my problem. How ever I'm not sure how to run these jobs in automateed manner (because their name may differ) and how can I make sure that all the jobs are finished.

There may be other way to achive what I want also, please let me know what you think.

EDIT:

Also using this method http://technet.microsoft.com/en-us/library/ms151260.aspx I guess underneath, it starts all the same jobs that I mentioned above, but then again, this is neither automatic nor there is an apparent way to tell when all theses job are finished. What I want to do is to run a script and be sure that once the script has finished all the snapshots are there and I can start synchronizing from the subscribers without fear of failure.

Anyone?

If anithing is not clear in my explanation above, I can clarify, just let me know what

2012年2月24日星期五

Firewall in Replication

Hi,
We are using SQL Server 2000. We need to setup merge replication between
server A & B using TCP/IP.
These servers are behind a firewall. The connection
between these servers can be done only using IP (class C)
How to configure this.
rgds,
Soura
Basically with SQL 2000 you need to allow inbound connections on port 1433
and 21 from the device doing the pull. Download the snapshot using ftp. If
this is not possible upgrade to SQL 2005 and do web synchronizations.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:134C38E0-CAAF-44C6-AD2B-1D525DB5BB0D@.microsoft.com...
> Hi,
> We are using SQL Server 2000. We need to setup merge replication between
> server A & B using TCP/IP.
> These servers are behind a firewall. The connection
> between these servers can be done only using IP (class C)
> How to configure this.
> rgds,
> Soura
>
>

2012年2月19日星期日

firehosemode

HI
I am trying to design merge replication.
step1:configure sqlservr1 as publisher and distributor and published pubs
database.
step2:from sqlserver2 i tried to pull the data using pull
subscription.everything works fine.
step3:again i decided to disabled publishing then start disabling step by
step finally i disabled sqlserver1 as publisher and distributor.
step4:i went to pubs database and start entering data in column mode some
tables allowing data but some tables raising errors saying that errors#
(transaction cannot start in firhosemode).
errors#(data entered is inconsistent value check datatype)
Can anyone help should be appreciated.
Message posted via http://www.droptable.com
Are you updating the tables using Enterprise Manager? Check
http://support.microsoft.com/default...;en-us;237398.
Adrian
"pardhi via droptable.com" <forum@.nospam.droptable.com> wrote in message
news:b7beba92b262474fb634526f72c156c4@.droptable.co m...
> HI
> I am trying to design merge replication.
> step1:configure sqlservr1 as publisher and distributor and published pubs
> database.
> step2:from sqlserver2 i tried to pull the data using pull
> subscription.everything works fine.
> step3:again i decided to disabled publishing then start disabling step by
> step finally i disabled sqlserver1 as publisher and distributor.
> step4:i went to pubs database and start entering data in column mode some
> tables allowing data but some tables raising errors saying that errors#
> (transaction cannot start in firhosemode).
> errors#(data entered is inconsistent value check datatype)
> Can anyone help should be appreciated.
> --
> Message posted via http://www.droptable.com