Timestamp And Bi-directional Replication

Sep 27, 1999

The docs state that a timestamp column is required for bi-directional
replication. I am not syncing the databases since they are too big and
it is a new project so I can guarantee at start that there will be two
exact copies of data. The data is being converted from a FoxPro db to
sqlserver.


The question is:
How do you design the timestamp columns for partioned bi-directional
replication? Does the publisher get the timestamp and the subscriber get
a binary(8)? Since there are two publishers is a distinct timestamp and
binary pair required for each server? See below...

Server: REP1 REP2
Table: tblTest tblTest
Columns: col1... col1...
tsREP1 timestamp tsREP1 binary(8)
tsREP2 binary(8) tsREP2 timestamp

Do the binary(8) columns need to be removed from the articles? Can
anyone explain how the timestamp is used to stop loop back? Is the loop
back check done on the Publisher or Subscriber?

Thanks,
Norman

View 1 Replies


ADVERTISEMENT

Bi-directional Replication

Nov 18, 1999

SQL Version 7.0

I have set up bi-directional replication between two databases on one table that has the structure of

Table Name : tblTrade

id : int (identity)
TicketNo : int (globally assigned via a sp - therefore always unique)
Location : int (On Server 1 defaults to 1) ---|PRIMARY
(On Server 2 defaults to 2) ---|KEY
.General Trade Fields...

Hence when a trade is entered into Server1 the Location defaults to 1 and is then replicated via an horizontal partition filter on the Location field. And similar for Server2.

Now Inserts work fine. However when a the following operations occur

DELETE - A DELETE against a record on Server1 results in ALL records being deleted from Server2

UPDATE - An UPDATE operation against a record on Server1 then ALL records get updated with the UPDATE SET clause.

The same happens with Updates on Server2 replicated to Server1.

Now it looks like the WHERE clause is missing from the replicated statements.

WHAT IS GOING ON, AND DOES ANYONE HAVE AN IDEA OF HOW TO GET AROUND THIS OR SET UP REPLICATION TO WORK PROPERLY

Regards

Steve

View 1 Replies View Related

Bi-directional Replication On 2 Servers With 2 Different DBs

Jan 14, 2000

Server_1 contains DB_A and DB_B. Server_2 contains DB_A and DB_B.
Can replication be setup where Server_1 DB_A (publisher) publishes to Server_2
DB_A (subscriber) and Server_2 DB_B (publisher) publishes to Server_1 DB_B (subscriber)? The environment is NT 4 (sp3) and SQL 6.5 (sp5a). Thanks in advance.

View 1 Replies View Related

SQL Server 7 Bi-directional Replication

Nov 12, 1999

Hi All

I am trying to set up bi-directional replication (between two domains) on a simple test table prior to installing it on my Live system. The table structure is along the lines of

id int (Primary Key)
name varchar(50)
location int

I use the Location field and the filter for the Publication. i.e. 1 = Server1 and 2 = Server2

Well I set the replication up on Server1 to Server2 and test the subscription and everything replicates perfectly. Note : When I set the Server2 subscription to Server1 I recreate the structure of the table on Server2

After performing a few replicated INSERTS into the table on Server1 and they have replicated through to Server2. I set Pub/Sub on Server2 to Server1. NOTE : on the setup of the subscription I select the option that the schema and data on the target table is correct.

As soon as I enter a line into the table on Server2 the replication monitor errors on Server2 with the message that the insert stored procedure for the replication cannot be found, indicating that they have not been created.

WHAT AM I DOING WRONG FOR THE SET UP OF BI-DIRECTIONAL REPLICATION??????

Thanks

Steve

View 2 Replies View Related

Bi-directional Transaction Replication

Feb 28, 2006

Besides loopback detection, is there anything else that is needed to prevent the replication command from sending back to the source. Cos i am having problem with the subscriber B sending back the replication to A in the form of B as the publisher and A as the subscriber.


:confused:

View 3 Replies View Related

Bi-directional Transaction Replication

Aug 25, 2005

Two Servers,1st 2nddatabase a -------> after replication a'b' <------- after replication bon 1st server a is replicated to 2ndon 2nd server b is replicated to 1stI tried with merge replication it is working fine.But if i tried to usetransactional replication it give some error like "accessviolation".Using tansactional replication is it possible.plz help me toslove this problem.Regards,Senthil prabu R

View 1 Replies View Related

Bidirectional Bi-directional Replication

Oct 24, 2007

Following setup s1<--- p1<-->p2 ---->s2 (bidirectional replication between publishers as each one have its own subscriber)
What are the disadvantages of this solution if only one publisher gets written to at the time.
How about schema changes (would I need to stop all activity on p1 & p2 similar to p2p replication) ?
Would changes get republished to s1 & s2 ?
Are identities the only problem when instead on p1 as main server I start using p2 ?
Thank you.

View 4 Replies View Related

Bi Directional Transactional Replication And Subscriber Name

Oct 19, 2004

Hi,
I am trying to setup bi-directional transactional replication between 2 SQL Servers,
I add the subscription on both the servers using the code below.

EXEC sp_addsubscription @publication = N'test',
@article = N'all', @subscriber = 'AnyServer',
@destination_db = N'test', @sync_type = N'none',
@status = N'active', @update_mode = N'read only',
@loopback_detection = 'true'
GO

I have defined 'AnyServer' on both the servers using cliconfg
(Server1's AnyServer pointed towards Server2 and Server2's AnyServer pointed towards Server1, I need to do that because there is a restriction to run the same code on both the servers),

After inserting a record on server1 in the 'test' database, the changes successfully transfers to the server2, then server2 sends it back to server1 and server1 generates the error of

"Violation of PRIMARY KEY constraint 'PK_Table1'. Cannot insert duplicate key in object 'Table1'."

It seems as if loop detection is failing if I keep the same subscriber name on both sides.

It runs fine when I change the subscriber name in the subscription (@subscriber = 'Server2' for server1 and @subscriber = 'Server1' for server2).

Can anybody explains this behavior to me?

View 2 Replies View Related

Replication Timestamp

Feb 24, 2006

Hi,
from the url--- http://support.microsoft.com/default.aspx?scid=kb;en-us;820675 I did the steps to implement the replication. However, i did not include a timestamp column in the tables. Is it important as to what would happen if i did not include this? I have the rowguidcol though. I thought this could would help to identify the various row.
Help pls?

:confused:

View 1 Replies View Related

Replication Problem With Timestamp Field

Nov 13, 1998

I am trying to replicate tables in a sql server 6.5 which contain the timestamp field. An error occurs and it shuts the replication task off and it says it cannot update the timestamp field. If I choose vertical partitioning and do not replicate the timestamp field then an error occurs that insert value list does not match column list. Is it the case that the subscriber cannot have this field in the table?
Besides deleting the timestamp field from the table completely, is there another solution or am I forgetting to set something?

View 2 Replies View Related

How Can I Maintain Timestamp Column In Replication Environment

May 27, 2008

Hi Friends



I have transactional replication,
The publisher DB contains table call Courser with timestamp column, this column values are unique for the publisher DB

The subscriber DB also contains same copy of data in publisher DB Course table, but the timestamp column values are different.

So my problem is how can I keep this two tables (Course) identically, (same timestamp column vales in both table)

NOTE: Publisher and Subscriber DB reside under two different SQL server instance

Thanks and regards
IndikaD (Virtusa cop SL)

View 2 Replies View Related

Error While Converting Oracle Timestamp To Sql Server Timestamp (datetime) - Invalid Date Format

Jun 19, 2007

I am populating oracle source in Sql Server Destination. after few rows it fails it displays this error:

[OLE DB Destination [16]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description:
"Invalid date format".



I used this script component using the following code in between the adapters, However after 9,500 rows it failed again giving the same above error:








To convert Oracle timestamp to Sql Server timestamp

If Row.CALCULATEDETADATECUST_IsNull = False Then

If IsDate(DateSerial(Row.CALCULATEDETADATECUST.Year, Row.CALCULATEDETADATECUST.Month, Row.CALCULATEDETADATECUST.Day)) Then

dt = Row.CALCULATEDETADATECUST

Row.CALCULATEDETADATECUSTD = dt

End If

End If



I don't know if my code is right . Please inform, how i can achieve this.

View 6 Replies View Related

Transact SQL :: Query To Display Avg Values For Each Timestamp And Count Of Timestamp

Jun 23, 2015

date        time         s-sitename TimeTaken(Seconds)
6/8/2015 10:56:26 TestSite 100
6/8/2015 10:56:26 TestSite 500
6/8/2015 10:56:26 TestSite 800
6/9/2015 11:56:26 TestSite 700
6/9/2015 11:56:26 TestSite 200
6/12/2015 12:56:26 TestSite 700

I have a table with above values, I am looking for a sql query to find AvgTimeTaken at different time stamps and total count of each time stamp

Output
date        time         s-sitename TimeTaken(Seconds) Count_of_Request
6/8/2015 10:56:26 TestSite 1400                  3
6/9/2015 11:56:26 TestSite 900                   2
6/12/2015 12:56:26 TestSite 700                   1

View 5 Replies View Related

Do All Conversations Have To Be Bi-directional?

Mar 20, 2008

From a service broker newbie...

Most of the examples I've found and played with demonstrate two way conversation. A sender initiates a call, and gets a message back.

My Requirements doesn't really need two way communication. I have a scenario where triggers on two different tables result in modifications to a third table, and I don't want the triggers to deadlock each other, so an asynchronous queueing mechanism seems like the perfect solution...

But I can't seem to make it work one way.

I can get one message through, and then all subsequent messages hang up in the transmission queue with the very informative "One or more messages could not be delivered to the local service targeted by this dialog."

I'm thinking all the examples work the way they do because you have to notify the transmitter that the message was
received by sending a message back... and by not doing this I'm stuck in the first conversation. I was thinking that by doing END CONVERSATION <Msg Handle> in the stored procedure bound to the receiver's queue was doing that.

Do I have to communicate bi-directionally always? I guess this is a safety feature but I trust MSMQ to deliver messages...

Thx

View 3 Replies View Related

Recommended Stretagy For Bi-Directional SQL DB Synchronization

Jul 23, 2005

Hi,Our company is an independent Voice applications solution provider withnumber clients using our suite. We have a CT application suite which isrunning with Application Server and SQL Server 7 / 2000 as DB Enginesat the back end.The SQL server has two databases configured:Logging Database - Massive updates every second, the data growsrapidly,Configuration Database - Generally small-sized and updatedoccasionally.Now we want to have the reslience implemented on the server. We have tosynchronize the two databases 'real-timely' and in 'efficient'manner, so that if Primary server or its Databases gets unavailable,the users are seamlessly switched over to the Secondry server that willhave its own set of data updated and well synchronized.Typically, it can be explained as follows:1. We will have 2 database servers A - Primary (acting as publisher)and B - Secondary (acting as subscriber). Our application will beinitially connected to A.2. When A becomes unavailable (for whatever reason), the applicationwill fail-over to B.3. All the users will be switched to server B and the updates are beingdone accordingly without being replicated on Server A temporarily.4. When A is back on-line, A needs to be brought up-to-date with Bautomatically (In other words, I shouldn't have to manually export allthe data from B to A ).Our requirements are:- The system should support Bi-directional Synchronizationbetween both the servers for their set of databases (the logging andconfiguration).- There will be constant and heavy activity in LoggingDatabase, thus if one server gets down the data should be logged andmaintained as it is on second server and on fail-back no data-lossshould occur with minimum latency time.- There could be a scenario when a server fails-over for aweek's time, there will be constant logging each second! Once itfails-back the system should rapidly synchronize the data withoutnoticeable delay among the two server database sets.- The system should also work fine if certain amount ofrecords are purged over a time period.Our concern is, observing the above scenario, how any of your SQLserver replication strategy can help us achieve the requirements.ThanksJohn

View 4 Replies View Related

20,000 Ft. Directional Question About Technologies And Capabilities

Nov 20, 2006



Greetings,

My desire is to have my primary db in FL and an online hot standby in both my MI and CA offices. The hardware is in place, as well as T1 size pipes. The solution I'm looking for would have all databases online in case of hardware / environmental failure although the application would only be pointing at the primary (or designated) database server. We have another 3rd party solution available, but I'd like to stay native SQL if possible.

Is replication the way to go?

Does one-to-many work?

Can all the db's be online and available while replicating?

Can I catch up if switched to one of the other db's temporarily?

note:This is 100% SQL 2005.

Thanks -- sorry for the newbie-flavor of the question, but I'm sure a gazillion people have already been down this decision branch.



Dan Ribar

View 5 Replies View Related

Get Row Timestamp With No Timestamp Column

Jul 10, 2007

For starters, please feel free to move this if it is in the wrong forum.



The issue I have is this. I have been asked to delete all information from a table that was inserted before May 12 this year. The issue is that when the DB was created, whoever designedd it neglected to add a timestamp column for the user data table (the one I need to purge). Does SQL, by default, happen to store insert times? Would it be something that might hide ina log file somewhere?

View 4 Replies View Related

Timestamp

Apr 2, 2007

how to insert a value into table where the fieldname uses a datatype timestamp.(asp.net2.0)

View 1 Replies View Related

Db Timestamp

Jun 6, 2007

I have a timestamp in a date field of a table I have but when run it does not enter the date automatically and all I get is system.byte[] display where the dtae and time should be, how can i get it so this field places the date in automatically.???

View 1 Replies View Related

Timestamp

Jun 20, 2007

I am retrieving data from a database, and have been noticing some really strange timestamps.  Has anyone ever seen a timestamp that looks like this: 16777215Karls 

View 1 Replies View Related

SQL TimeStamp Help

Jul 12, 2004

Hello,

I just started using SQL and i don't really know too much syntax.

I have an ASP page that is inserting data into a table called YellowAlerts.
The first field in this table is AlertDate. I thought I read somewhere that there is a timestamp feature. If anyone could help me out that would be great.

Thanks.

View 2 Replies View Related

TIMESTAMP --- HELP

Jul 6, 2000

How can I add a timestamp column to a table that will let me know when
a record was inserted? (perhaps by setting a default to that column?)

For some reason, @@currenttimestamp gives me
some binary garbage.

Please help with any suggestions.

View 3 Replies View Related

TimeStamp

Aug 23, 1999

How do I "disable" the timestamp so that when I copy my data into a new
database it will use the timestamp from the last time the table was effected?

Thanks,

Tracy

View 1 Replies View Related

Timestamp

Jun 2, 1999

Hi All,

I believe that all created tables have got by default a timestamp field.
I tried to find out how to read this field with a Transact-SQL statement.
And so I don't know the syntax, is anyone can help me ?

Thanks,

Herve

View 2 Replies View Related

Timestamp

Feb 10, 2005

If i have a table with a 3 fields and one of them has a timestamp as a field type and I want to do an insert or update what is the value I am inserting for the column timestamp.

Help appreciated

View 5 Replies View Related

Timestamp

Sep 23, 2006

hello I put a time stamp in one of my column and it says binary data in the field. How do i make that binary data turn into a real date and time. If this is possible how do I separate the date from the time in the results or would I have to do this myself. Also, I need to sort the results by date can this be done?

Sorry for the stupid questions my sql book (sql demystified) does not elaborate. Thanks

View 2 Replies View Related

About The Timestamp

Sep 4, 2006

hello,
m new to sql server.can any one tell me is it possible to insert only time value in timestamp datatype.
i have table which have datatype datetime.and i have to insert only time.i can't change the datatype datetime to any other one.p
plz any one can suggest me the solution..

Regards,
Sonal.

View 8 Replies View Related

TimeStamp

Feb 12, 2008

Hello I'm not a SQL Expert but i'm using it for a few months. Now i need to use a variable that everytime that is called to a select into it gives the timestamp (or Stamp) to put on a specific field. The problem is that i need this variable not in bd conotation (like 2007-02-12 12:00:44:33) but like this 2007021212004433. Can someone help me? Thanks in advance.

View 5 Replies View Related

TImeStamp Or Not

Jul 20, 2005

Is there any reason to have a TimeStamp column onto a table that has aPrimaryKey when using SQL Server and an Access front end?I read that doing so will always eliminate that write conflict error.But I notice that when pulling a recordset of 10K records, it takes 3Xless time if I delete the timestamp column on the table before runningthe SP.lq

View 2 Replies View Related

Timestamp

Jul 20, 2005

Is there any chance to get the content of a timestamp field?I am trying to get the content via Visual Objects and I am receiving onlynothing.Not NIL but "".Is it possible to get any useful information out of this field in anylanguage?(btw I know that the MS-Timestamp is not a timeformat)THXJens

View 1 Replies View Related

TimeStamp

Jul 20, 2005

Is there any reason at all to use a timestamp column in a table havinga primarykey column???lq

View 2 Replies View Related

Timestamp

Nov 29, 2007

Hi there,



When inserting into a table with a timestamp column without explicitly setting the column_list you get the following.

ie.



insert into Table_A

select *

from Table_B



Cannot insert a non-null value into a timestamp column. Use INSERT with a column list or with a default of NULL for the timestamp column.



I was wondering if there's a way to overcome this without specifying the column list?



Thanks.

View 3 Replies View Related

Timestamp Database

Dec 10, 2007

HI every one
I have a timestamp column in my database. I want to use this column to get current changes but i am not able to get desired results when i use to compare that field in C#.
 Thanks in advance
 Take Care
ALLAH HAFIZ

View 1 Replies View Related







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